From: Roland McGrath Date: Thu, 5 Nov 2009 19:34:08 +0000 (-0800) Subject: Ignore link_map entries with l_ld==0. X-Git-Tag: elfutils-0.144~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdb48e066a4cd6bd487ff8f53a8f8d5bc221a1a8;p=thirdparty%2Felfutils.git Ignore link_map entries with l_ld==0. --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 5b876d338..48f266513 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,7 @@ +2009-11-05 Roland McGrath + + * link_map.c (report_r_debug): Skip entries with l_ld==0. + 2009-09-04 Roland McGrath * image-header.c (__libdw_image_header): Fix tranposed comparison. diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c index 2d4d75f1a..7938f85e5 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