dwarf2_find_nearest_line
Alan Modra
amodra@bigpond.net.au
Thu Sep 23 12:36:00 GMT 2004
Continuing http://sources.redhat.com/ml/binutils/2004-08/msg00095.html
I'd say _bfd_dwarf2_find_nearest_line is quite broken when it is trying
to work on relocatable object files. VMAs for all sections are zero in
relocatable files, thus the "address" that comp_unit_contains_address
tests is just a section offset. In the powerpc64 testcase above, the
undef4.o(.toc+0x8) reference results in comp_unit_contains_address
looking for an "address" of 8, which happens to match debug info for
the text section. That's how we get a wrong reference to
/src/tmp/undef1.c:5.
So, what happens if we are linking an object file with many text
sections, for example when using -ffunction-sections? Total confusion,
I think..
Of course, if we're using _bfd_dwarf2_find_nearest_line to output
error messages for the linker, we have the final section VMAs available.
However, bfd_simple_get_relocated_section_contents seems to go out of
it's way to zero input section vmas. Why?
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list