This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Symbol versions for inlined symbols
- From: Mike Hearn <mike at plan99 dot net>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 30 Jul 2005 21:33:45 +0100
- Subject: Symbol versions for inlined symbols
Hi,
One problem with the parallel C++ ABI versioning (which makes it not so
useful) is that symbols in the libstdc++ namespaces are put into the
generated binary if you use the STL. Those generated symbols are *not*
symbol versioned so conflicts can still occur.
This is registered in bugzilla and has been for a while, with no sign of a
fix. So I thought I'd look at it.
Would an acceptable solution be to have a new attribute that set the
symbol version for inlined functions. That way, the STL headers could be
annotated like so:
class XXX
{
int STD_VERSION std::whatever() { return 4; }
}
An alternative approach would be to have the linker assigned inlined
symbols the same version tag as whatever the same symbol in libstdc++ has,
but I'm not sure how I'd implement this.
Does anybody have insight?
thanks -mike