]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Recognize .debug_[ct]u_index sections in dwarf_elf_begin
authorOmar Sandoval <osandov@fb.com>
Wed, 27 Sep 2023 18:20:56 +0000 (11:20 -0700)
committerMark Wielaard <mark@klomp.org>
Wed, 1 Nov 2023 14:26:04 +0000 (15:26 +0100)
commitc112cf0f1975e19a6111f594c0e5c4d2210c0f9a
tree52d4bad2530b83c151a879b06cf87ebf1f86bed6
parent966a5fb6496cf3949004e08aaa5ab6aeb1c0c485
libdw: Recognize .debug_[ct]u_index sections in dwarf_elf_begin

DWARF package (.dwp) files have a .debug_cu_index section and,
optionally, a .debug_tu_index section.  Add them to the list of DWARF
sections.

Unfortunately, it's not that simple: the other debug sections in a dwp
file have names ending with .dwo, which confuses the checks introduced
by commit 5b21e70216b8 ("libdw: dwarf_elf_begin should use either plain,
dwo or lto DWARF sections.").  So, we also have to special case
.debug_cu_index and .debug_tu_index in scn_dwarf_type and check_section
to treat them as TYPE_DWO sections.

Signed-off-by: Omar Sandoval <osandov@fb.com>
libdw/ChangeLog
libdw/dwarf_begin_elf.c
libdw/libdwP.h