diff options
| author | Roland McGrath <[email protected]> | 2009-11-05 11:34:08 -0800 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2009-11-05 11:34:08 -0800 |
| commit | cdb48e066a4cd6bd487ff8f53a8f8d5bc221a1a8 (patch) | |
| tree | 115d16642082d572c443aabefe8bd8d698cabe5f | |
| parent | 9ca7bc4cb83845372375398006ec04e3f7df1235 (diff) | |
Ignore link_map entries with l_ld==0.
| -rw-r--r-- | libdwfl/ChangeLog | 4 | ||||
| -rw-r--r-- | libdwfl/link_map.c | 5 |
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 |
