This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]