]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix .eh_frame decoding in the absence of any DWARF.
authorRoland McGrath <roland@hack.frob.com>
Tue, 20 Dec 2011 18:55:01 +0000 (10:55 -0800)
committerRoland McGrath <roland@hack.frob.com>
Tue, 20 Dec 2011 18:55:09 +0000 (10:55 -0800)
src/ChangeLog
src/readelf.c

index 8cfa98609d729d65d5ca8bb8dd76b1c856b976e1..bef7f94377a259662b80aaed2b01a8b3e67eaa74 100644 (file)
@@ -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.
index 69b2abbe86aef86df567f27782eaf90d96f04e12..c706918ae383fae2c1a2f488704fc4726d006761 100644 (file)
@@ -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)