summaryrefslogtreecommitdiffstats
path: root/libdw
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2018-06-27 14:41:22 +0200
committerMark Wielaard <mark@klomp.org>2018-06-29 12:12:21 +0200
commitc7a83bf05734e2c20d621678d0f3214475404c55 (patch)
tree0e1c9b894bf8872a6c69dd6b25a88fbfc7a53a3f /libdw
parent67a0b8c971ce84874450bf2a7ac98c081402b718 (diff)
libdw: Allow .debug_frame only Dwarf.
.debug_frame is useful independent from the other .debug sections. Add a simplified variant of the addrcfi testcase dwarfcfi. dwarfcfi only uses dwarf_frame calls and no dwfl helpers. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw')
-rw-r--r--libdw/ChangeLog5
-rw-r--r--libdw/dwarf_begin_elf.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 0ae12724..1e86e682 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-27 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_begin_elf.c (check_section): Allow a single .debug_frame
+ section.
+
2018-06-26 Mark Wielaard <mark@klomp.org>
* libdw.h (dwarf_getscn_info): Remove.
diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
index e1542c75..184a6dc9 100644
--- a/libdw/dwarf_begin_elf.c
+++ b/libdw/dwarf_begin_elf.c
@@ -209,7 +209,8 @@ valid_p (Dwarf *result)
Require at least one section that can be read "standalone". */
if (likely (result != NULL)
&& unlikely (result->sectiondata[IDX_debug_info] == NULL
- && result->sectiondata[IDX_debug_line] == NULL))
+ && result->sectiondata[IDX_debug_line] == NULL
+ && result->sectiondata[IDX_debug_frame] == NULL))
{
Dwarf_Sig8_Hash_free (&result->sig8_hash);
__libdw_seterrno (DWARF_E_NO_DWARF);