powerpc64 linux dot symbols

Alan Modra amodra@bigpond.net.au
Tue Aug 10 13:34:00 GMT 2004


On Tue, Aug 10, 2004 at 10:53:30AM +0000, Joseph S. Myers wrote:
> On Tue, 10 Aug 2004, Alan Modra wrote:
> 
> > This is the gcc part of my patch to binutils+gcc to remove use of "dot"
> > symbols on PowerPC64 Linux function entry points.  The main reason for
> > making this change is to remove a user visible PowerPC64 ELF wart:
> > Functions called names like "data" and "dynamic" won't compile, since
> > the associated dot symbols, ".data" and ".dynamic" clash with ELF
> > section names.  A secondary reason is that reducing the number of global
> 
> This (names in user namespace that have caused problems; not necessarily 
> just "data" and "dynamic", if there are or have been other such names on 
> this or other platforms) seems like something that should have a testcase 
> added.

The list of names is enormous.  It's not just commonly used ELF section
names (minus the dot), but also commonly used local labels.  So for
example, with the current ppc64 compiler you'll run into trouble with
function called "L0", "L1", ..., "LC0", "LCTOC0", "LCFI0", etc.  (grep
the GCC source for ASM_GENERATE_INTERNAL_LABEL!)

We do already have one test, gcc.dg/debug/20020327-1.c, currently
disabled for powerpc64.  Which reminds me:  I probably should have the
preprocessor define something so testsuites can cope with differently
generated code.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Gcc-patches mailing list