summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2011-12-20 10:55:01 -0800
committerRoland McGrath <roland@hack.frob.com>2011-12-20 10:55:09 -0800
commita065c4b6e743968751c74f3100fc1c6af89db483 (patch)
tree5c4b0ac07181a52efede557c7d1e13509b471776
parent01fef9d502eb1e21ac7b7e8ec9451dc96c72f7ed (diff)
downloadelfutils-a065c4b6e743968751c74f3100fc1c6af89db483.tar.gz
Fix .eh_frame decoding in the absence of any DWARF.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/readelf.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8cfa9860..bef7f943 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-20 Roland McGrath <roland@hack.frob.com>
+
+ * readelf.c (print_debug): Initialize DUMMY_DBG.elf.
+ Reported by Karel Klic <kklic@redhat.com>.
+
2011-11-05 Roland McGrath <roland@hack.frob.com>
* ar.c (deterministic_output): New flag variable.
diff --git a/src/readelf.c b/src/readelf.c
index 69b2abbe..c706918a 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -7288,7 +7288,11 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
/* Before we start the real work get a debug context descriptor. */
Dwarf_Addr dwbias;
Dwarf *dbg = dwfl_module_getdwarf (dwflmod, &dwbias);
- Dwarf dummy_dbg = { .other_byte_order = MY_ELFDATA != ehdr->e_ident[EI_DATA] };
+ Dwarf dummy_dbg =
+ {
+ .elf = ebl->elf,
+ .other_byte_order = MY_ELFDATA != ehdr->e_ident[EI_DATA]
+ };
if (dbg == NULL)
{
if ((print_debug_sections & ~section_exception) != 0)