An ELF error during find_symtab might be incomplete shdrs or string table
from ELF images read through elf_from_memory. The phdrs and dynsym should
always be complete.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2014-12-19 Mark Wielaard <mjw@redhat.com>
+
+ * dwfl_module_getdwarf.c (find_symtab): Always try find_dynsym last.
+
2014-12-19 Mark Wielaard <mjw@redhat.com>
* elf-from-memory.c (handle_segment): Remove palign sanity check.
{
elferr:
mod->symerr = DWFL_E (LIBELF, elf_errno ());
- goto aux_cleanup;
+ goto aux_cleanup; /* This cleans up some more and tries find_dynsym. */
}
/* Cache the data; MOD->syments and MOD->first_global were set above. */
mod->aux_syments = 0;
elf_end (mod->aux_sym.elf);
mod->aux_sym.elf = NULL;
+ /* We thought we had something through shdrs, but it failed...
+ Last ditch, look for dynamic symbols without section headers. */
+ find_dynsym (mod);
return;
}