]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Ignore link_map entries with l_ld==0.
authorRoland McGrath <roland@redhat.com>
Thu, 5 Nov 2009 19:34:08 +0000 (11:34 -0800)
committerRoland McGrath <roland@redhat.com>
Thu, 5 Nov 2009 19:34:08 +0000 (11:34 -0800)
libdwfl/ChangeLog
libdwfl/link_map.c

index 5b876d338782e61a352ba8809bda6d10d4c1ae7c..48f266513c51ca672b24019e184334fd39135977 100644 (file)
@@ -1,3 +1,7 @@
+2009-11-05  Roland McGrath  <roland@redhat.com>
+
+       * link_map.c (report_r_debug): Skip entries with l_ld==0.
+
 2009-09-04  Roland McGrath  <roland@redhat.com>
 
        * image-header.c (__libdw_image_header): Fix tranposed comparison.
index 2d4d75f1a85837c14e2358502514b51eda03bc19..7938f85e5694cba3e7298873ac79d30126350ceb 100644 (file)
@@ -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