When setting up the module and searching for an ELF file with a correct
build_id __libdwfl_relocate_value will be called for an ET_REL file in
__libdwfl_find_elf_build_id but mod->e_type is not yet setup in that case
because the Dwfl_Module isn't yet complete (the build-id could mismatch).
This can happen when using the dwfl_linux_kernel_find_elf callback when
it searches for the ELF file matching a kernel module.
+2013-07-02 Mark Wielaard <mjw@redhat.com>
+
+ * relocate.c (__libdwfl_relocate_value): Remove mod->e_type assert.
+
2013-06-05 Mark Wielaard <mjw@redhat.com>
* link_map.c (report_r_debug): Always call release_buffer after
__libdwfl_relocate_value (Dwfl_Module *mod, Elf *elf, size_t *shstrndx,
Elf32_Word shndx, GElf_Addr *value)
{
- assert (mod->e_type == ET_REL);
-
Elf_Scn *refscn = elf_getscn (elf, shndx);
GElf_Shdr refshdr_mem, *refshdr = gelf_getshdr (refscn, &refshdr_mem);
if (refshdr == NULL)