]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: dwarf_elf_begin should use either plain, dwo or lto DWARF sections.
authorMark Wielaard <mark@klomp.org>
Mon, 8 Nov 2021 08:27:51 +0000 (09:27 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 9 Nov 2021 17:28:00 +0000 (18:28 +0100)
commit5b21e70216b853065fa2fef34273db5f7dcdc88b
tree8b879a48628c114a3b409bbedcced19caafb8db2
parent039f427a3574ec75985c755108399a2bb37c2c86
libdw: dwarf_elf_begin should use either plain, dwo or lto DWARF sections.

When opening an ELF file that contained a mix of plain, dwo or lto .debug
sections the result could be confusing. Add a check to pick just the plain
.debug sections, or the .dwo sections or the .gnu.debuglto_.debug sections
(in that order of preference). That way there is always a consistent set.

https://sourceware.org/bugzilla/show_bug.cgi?id=27367

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_begin_elf.c
libdw/libdwP.h
tests/ChangeLog
tests/Makefile.am
tests/run-readelf-fat-lto.sh [new file with mode: 0755]
tests/testfile-dwarf5-fat-lto.o.bz2 [new file with mode: 0644]