From: Roland McGrath Date: Tue, 20 Dec 2011 18:55:01 +0000 (-0800) Subject: Fix .eh_frame decoding in the absence of any DWARF. X-Git-Tag: elfutils-0.153~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a065c4b6e743968751c74f3100fc1c6af89db483;p=thirdparty%2Felfutils.git Fix .eh_frame decoding in the absence of any DWARF. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8cfa98609..bef7f9437 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-20 Roland McGrath + + * readelf.c (print_debug): Initialize DUMMY_DBG.elf. + Reported by Karel Klic . + 2011-11-05 Roland McGrath * ar.c (deterministic_output): New flag variable. diff --git a/src/readelf.c b/src/readelf.c index 69b2abbe8..c706918ae 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)