summaryrefslogtreecommitdiffstats
path: root/libdwfl/link_map.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-11-05 11:34:08 -0800
committerRoland McGrath <[email protected]>2009-11-05 11:34:08 -0800
commitcdb48e066a4cd6bd487ff8f53a8f8d5bc221a1a8 (patch)
tree115d16642082d572c443aabefe8bd8d698cabe5f /libdwfl/link_map.c
parent9ca7bc4cb83845372375398006ec04e3f7df1235 (diff)
Ignore link_map entries with l_ld==0.
Diffstat (limited to 'libdwfl/link_map.c')
-rw-r--r--libdwfl/link_map.c5
1 files changed, 5 insertions, 0 deletions
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