This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas rearranging elf file symbols
On Fri, Oct 08, 2004 at 03:23:19PM +0930, Alan Modra wrote:
> the correct file. You can't do better for globals of course, since
> global symbols are placed after local symbols, losing any association
> you might infer from the symbol ordering.
Actually, you can't do much about local symbols either. The ELF gABI
says:
STT_FILE
Conventionally, the symbol's name gives the name of the source file
associated with the object file. A file symbol has STB_LOCAL
binding, its section index is SHN_ABS, and it precedes the other
STB_LOCAL symbols for the file, if it is present.
>From that wording you could also infer that there should only be one
file symbol, that of the main source file.
--
Alan Modra
IBM OzLabs - Linux Technology Centre