libdwfl: Allow partial relocations also for debug files.
authorMark Wielaard <mark@klomp.org>
Sun, 27 May 2018 12:05:21 +0000 (14:05 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 29 May 2018 10:10:41 +0000 (12:10 +0200)
commit263dbe8ca17f66baa184f489530eb92afa15adfe
tree884183a7ca5c66199170b7d784e60b7c7dced8a9
parent7372ccf49a83d4eb38b39fe227345d53c8219254
libdwfl: Allow partial relocations also for debug files.

__libdwfl_relocate is called for get_dwarf and get_elf. We allow not all
relocations to be resolved for Elf files, but required all relocations
(in the debug sections) to be fully resoled in Dwarf files. This used to
mostly work out with .o ET_REL files when the main Elf was gotten before
the Dwarf. But with .dwo files, we (readelf) might open the .o file just
for the (skeleton) Dwarf. In this case it could happen not all relocations
in the debug sections could be resolved (.debug_info and .debug_addr might
contain referenes to undefined symbols). So allow partial relocations
also for debug files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdwfl/ChangeLog
libdwfl/relocate.c