summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libdwfl/ChangeLog4
-rw-r--r--libdwfl/link_map.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 5b876d33..48f26651 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-05 Roland McGrath <[email protected]>
+
+ * link_map.c (report_r_debug): Skip entries with l_ld==0.
+
2009-09-04 Roland McGrath <[email protected]>
* image-header.c (__libdw_image_header): Fix tranposed comparison.
diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c
index 2d4d75f1..7938f85e 100644
--- a/libdwfl/link_map.c
+++ b/libdwfl/link_map.c
@@ -346,6 +346,11 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata,
GElf_Addr l_ld = addrs[2];
next = addrs[3];
+ /* If a clobbered or truncated memory image has no useful pointer,
+ just skip this element. */
+ if (l_ld == 0)
+ continue;
+
/* Fetch the string at the l_name address. */
const char *name = NULL;
if (buffer != NULL