By using dwelf_elf_begin instead of elf_begin we automatically get
support for determining the build-id of compressed (kernel) images.
https://sourceware.org/bugzilla/show_bug.cgi?id=26599
Signed-off-by: Mark Wielaard <mark@klomp.org>
+2020-09-15 Mark Wielaard <mark@klomp.org>
+
+ * debuginfod-find.c (main): Use dwelf_elf_begin.
+
2020-07-03 Alice Zhang <alizhang@redhat.com>
* debuginfod-client.c (debuginfod_query_server): Use strncasecmp
}
if (fd >= 0)
{
- elf = elf_begin (fd, ELF_C_READ_MMAP_PRIVATE, NULL);
+ elf = dwelf_elf_begin (fd);
if (elf == NULL)
- fprintf (stderr, "Cannot elf_begin %s: %s\n", build_id, elf_errmsg(-1));
+ fprintf (stderr, "Cannot open as ELF file %s: %s\n", build_id,
+ elf_errmsg (-1));
}
if (elf != NULL)
{