aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/readelf.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dc345a04..83d58607 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2020-04-17 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug): Check .gnu.debuglto_ prefix.
+
2020-04-16 Mark Wielaard <mark@klomp.org>
* elflint.c (check_sections): Mask out SHF_EXCLUDE from processor
diff --git a/src/readelf.c b/src/readelf.c
index cbb519d1..685d0b17 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -11253,7 +11253,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
if (strcmp (name, ".debug_info") == 0
|| strcmp (name, ".debug_info.dwo") == 0
|| strcmp (name, ".zdebug_info") == 0
- || strcmp (name, ".zdebug_info.dwo") == 0)
+ || strcmp (name, ".zdebug_info.dwo") == 0
+ || strcmp (name, ".gnu.debuglto_.debug_info") == 0)
{
print_debug_info_section (dwflmod, ebl, ehdr,
scn, shdr, dbg);
@@ -11339,7 +11340,11 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
dbglen - 1) == 0
&& (scnlen == dbglen + 1
|| (scnlen == dbglen + 5
- && strstr (name, ".dwo") == name + dbglen + 1))))
+ && strstr (name, ".dwo") == name + dbglen + 1)))
+ || (scnlen > 14 /* .gnu.debuglto_ prefix. */
+ && strncmp (name, ".gnu.debuglto_", 14) == 0
+ && strcmp (&name[14], debug_sections[n].name) == 0)
+)
{
if ((print_debug_sections | implicit_debug_sections)
& debug_sections[n].bitmask)