Updated mangling specs
Jim Dehnert
dehnert at baalbek.engr.sgi.com
Tue Feb 15 00:26:55 UTC 2000
> From: Jason Merrill <jason at cygnus.com>
>
> Christophe de Dinechin <ddd at cup.hp.com> writes:
>
> > One issue that is not covered by your initial proposal is the
> > mangling of static data inside functions. In particular:
> >
> > - Mangling of static data in inline functions or templates
> > - Mangling of strings constants in inline functions
>
> True, though we decided last week that these can be handled by simply
> adding a sequence number to the name of the function.
Of course, we will have to be very careful about the specification of
this so that everyone gets the same sequence number... Maybe we should
include a little redundancy (the name as in gcc, a type prefix, etc.)
so that mistakes are clear? But I guess that still won't produce link
errors...
> > Also, to allow cross-.o file inlining, you need to extend that to
> > any function (not only those explicitly marked inline.) Strictly
> > speaking, this is outside the ABI, but unless there are strong
> > reasons not to, I'd advocate mangling any static data, regardless of
> > whether the function is tagged inline or not.
>
> We should mangle the static data for any function that may be inlined;
> which functions those are depends on the compiler.
I don't think that we can or should require that the static data
always have mangled symbols emitted -- that should be the responsibility
of an implementation that chooses to inline routines not declared
inline. However, once the compiler chooses to emit them, it should use
the defined mangling for inline routines.
Jim
- Jim Dehnert dehnert at sgi.com
(650)933-4272
More information about the cxx-abi-dev
mailing list