]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Make sure to get .eh_frame_hdr with .eh_frame in getcfi_shdr users/mark/try-getcfi_shdr
authorMark Wielaard <mark@klomp.org>
Fri, 5 Dec 2025 15:13:32 +0000 (16:13 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 5 Dec 2025 15:24:52 +0000 (16:24 +0100)
commit80d5a2dbed072e8133a6394dbe204617317e857c
tree486d1b6110020d39d99bc038cc8d33dafe6469de
parentad03019f927c620f0ff09bbbf49a293be08391e9
libdw: Make sure to get .eh_frame_hdr with .eh_frame in getcfi_shdr

If we find a .eh_frame section we want to make sure to also get the
search table section .eh_frame_hdr. Otherwise lookups will be very
slow. Only create a Dwarf_CFI without a search table as a last resort.

* libdw/dwarf_getcfi_elf.c (getcfi_shdr): Keep iterating
        through the shdrs till both .eh_frame and .eh_frame_hdr are
        found. Check both aren't SHT_NOBITS.

Suggested-by: Shimin Guo <shimin.guo@skydio.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/dwarf_getcfi_elf.c