This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Elf .file symbols in reverse order
- From: pocmatos at gmail dot com (Paulo J. Matos)
- To: binutils at sources dot redhat dot com
- Date: Mon, 22 Nov 2010 11:54:43 +0000
- Subject: Elf .file symbols in reverse order
Hello,
I am using 2.18 and I have noticed a quite counterintuitive situation
with .file elf directives.
If I have an asm file starting with:
,----
| .file "/home/pm18/bugs/b89833/test.asm"
| .file "/home/pm18/bugs/b89833/test.c"
`----
Once the file is assembled and I use objdump -t, the symbol table shows
them in reverse order:
,----
| SYMBOL TABLE:
| 00000000 l df *ABS* 00000000 /home/pm18/bugs/b89833/test.c
| 00000000 l df *ABS* 00000000 /home/pm18/bugs/b89833/test.asm
`----
I am wondering what is doing this to the symbols.
The interesting thing, and the reason why I noticed it, is that the dwarf
information is being set to assume that the file is test.c which is the
last directive, however, when elf_find_symbol searches for a symbol it
will return test.asm, due to the order in which the file symbols are
sorted in the symbol table.
Any ideas?
Cheers,
--
PMatos