This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gas rearranging elf file symbols
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Wed, 06 Oct 2004 10:31:30 +0200
- Subject: gas rearranging elf file symbols
After enabling elf_find_function to actually report a filename if any
can be found, it became immediately obvious that gas prevents this from
being fully functional. This is because gas (a) emits all the file
symbols (resulting from # <line> "<filename>", .file, or .appfile) in a
block and (b) inverts the sequence in which they were encountered. With
this, associating a local symbol with its (pseudo-)source file name is
impossible.
Is anyone able to explain why this works the way it does currently?
This may have been inherited from COFF (where a comment says reordering
is done intentionally), but it would seem wrong there, too.
Thanks, Jan