Finding dwarf2 abbrev_offsets after multi-object ld -r
Alexandre Oliva
aoliva@redhat.com
Wed Aug 8 04:16:00 GMT 2001
This problem was first reported to me on mn10300-elf: after linking
together with -r a couple of object files with debugging info, the
linker would fail when loading the debugging information of this
object file, when attempting to find out the line number in which an
error that was about to be reported occurred.
The problem is that, on targets with RELA relocations, when multiple
object files are linked together into a single one, the abbrev offsets
of the comp units other than the first are non-zero, but this is not
reflected in the debugging info section data, only in its relocations,
that point to .debug_abbrev plus the offset. Because we failed to
take the relocation into account, we always attempted to load the
abbrev table of the first translation unit, which would often fail to
make sense to other translation units.
These patches fix the problem in bfd and readelf, so that they now
load the correct abbrev table for each comp unit. They were approved
by Nick Clifton. I'm checking them in.
More information about the Binutils
mailing list