summaryrefslogtreecommitdiffstats
path: root/libebl/eblopenbackend.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2016-01-15 14:23:11 +0100
committerMark Wielaard <[email protected]>2016-01-15 14:23:11 +0100
commit0cbb42e7e77635ee981b55423e57be976b33fba6 (patch)
treede12c5f0e1b75184b46ad9323bddec8041a58899 /libebl/eblopenbackend.c
parentac26a14751ae608590d00a5dd443e830821eaaeb (diff)
parent9b4bce40709611875754cf4931eb91d394042122 (diff)
Merge tag 'elfutils-0.165' into mjw/RH-DTS
elfutils 0.165 release
Diffstat (limited to 'libebl/eblopenbackend.c')
-rw-r--r--libebl/eblopenbackend.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index d551bda3..5aec99e0 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -261,10 +261,7 @@ fill_defaults (Ebl *result)
/* Find an appropriate backend for the file associated with ELF. */
static Ebl *
-openbackend (elf, emulation, machine)
- Elf *elf;
- const char *emulation;
- GElf_Half machine;
+openbackend (Elf *elf, const char *emulation, GElf_Half machine)
{
Ebl *result;
size_t cnt;
@@ -372,8 +369,7 @@ openbackend (elf, emulation, machine)
/* Find an appropriate backend for the file associated with ELF. */
Ebl *
-ebl_openbackend (elf)
- Elf *elf;
+ebl_openbackend (Elf *elf)
{
GElf_Ehdr ehdr_mem;
GElf_Ehdr *ehdr;
@@ -393,8 +389,7 @@ ebl_openbackend (elf)
/* Find backend without underlying ELF file. */
Ebl *
-ebl_openbackend_machine (machine)
- GElf_Half machine;
+ebl_openbackend_machine (GElf_Half machine)
{
return openbackend (NULL, NULL, machine);
}
@@ -642,7 +637,9 @@ default_debugscn_p (const char *name)
const size_t ndwarf_scn_names = (sizeof (dwarf_scn_names)
/ sizeof (dwarf_scn_names[0]));
for (size_t cnt = 0; cnt < ndwarf_scn_names; ++cnt)
- if (strcmp (name, dwarf_scn_names[cnt]) == 0)
+ if (strcmp (name, dwarf_scn_names[cnt]) == 0
+ || (strncmp (name, ".zdebug", strlen (".zdebug")) == 0
+ && strcmp (&name[2], &dwarf_scn_names[cnt][1]) == 0))
return true;
return false;