Elf .file symbols in reverse order
Paulo J. Matos
pocmatos@gmail.com
Mon Nov 22 11:55:00 GMT 2010
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
More information about the Binutils
mailing list