diff options
author | emaste <emaste@FreeBSD.org> | 2014-12-30 03:25:42 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2014-12-30 03:25:42 +0000 |
commit | 89ea4550747416014ce82e32c69b6ec6cf136ca9 (patch) | |
tree | de2207a7e901c24da6991f0a9fdabd4926d15e40 /contrib/elftoolchain/libdwarf | |
parent | d0bbd70dc2f2666cb58cdff7cffb7438a14f66ff (diff) | |
download | FreeBSD-src-89ea4550747416014ce82e32c69b6ec6cf136ca9.zip FreeBSD-src-89ea4550747416014ce82e32c69b6ec6cf136ca9.tar.gz |
Update elftoolchain to upstream rev 3136
This fixes two strip(1) issues found during ports exp-run and adds a
string hash implementation which significantly speeds up certain
operations on objects with large numbers of symbols.
This also improves libdwarf handling for stripped objects with
.eh_frame or .debug_frame (but not other debug) sections.
PR: 196107
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/elftoolchain/libdwarf')
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf_abbrev.c | 6 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf_info.c | 5 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf_init.c | 9 |
3 files changed, 9 insertions, 11 deletions
diff --git a/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c b/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c index f4a395d..abcc2fd 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c @@ -27,7 +27,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_abbrev.c 2070 2011-10-27 03:05:32Z jkoshy $"); +ELFTC_VCSID("$Id: libdwarf_abbrev.c 3136 2014-12-24 16:04:38Z kaiwang27 $"); int _dwarf_abbrev_add(Dwarf_CU cu, uint64_t entry, uint64_t tag, uint8_t children, @@ -180,7 +180,9 @@ _dwarf_abbrev_find(Dwarf_CU cu, uint64_t entry, Dwarf_Abbrev *abp, /* Load and search the abbrev table. */ ds = _dwarf_find_section(cu->cu_dbg, ".debug_abbrev"); - assert(ds != NULL); + if (ds == NULL) + return (DW_DLE_NO_ENTRY); + offset = cu->cu_abbrev_offset_cur; while (offset < ds->ds_size) { ret = _dwarf_abbrev_parse(cu->cu_dbg, cu, &offset, &ab, error); diff --git a/contrib/elftoolchain/libdwarf/libdwarf_info.c b/contrib/elftoolchain/libdwarf/libdwarf_info.c index 261bee6..7476593 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_info.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_info.c @@ -27,7 +27,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_info.c 3041 2014-05-18 15:11:03Z kaiwang27 $"); +ELFTC_VCSID("$Id: libdwarf_info.c 3136 2014-12-24 16:04:38Z kaiwang27 $"); int _dwarf_info_first_cu(Dwarf_Debug dbg, Dwarf_Error *error) @@ -153,7 +153,8 @@ _dwarf_info_load(Dwarf_Debug dbg, Dwarf_Bool load_all, Dwarf_Bool is_info, return (ret); offset = dbg->dbg_info_off; ds = dbg->dbg_info_sec; - assert(ds != NULL); + if (ds == NULL) + return (DW_DLE_NO_ENTRY); } else { if (dbg->dbg_types_loaded) return (ret); diff --git a/contrib/elftoolchain/libdwarf/libdwarf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_init.c index 8e3fbbe..b85c87c 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_init.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_init.c @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_init.c 3061 2014-06-02 00:42:41Z kaiwang27 $"); +ELFTC_VCSID("$Id: libdwarf_init.c 3136 2014-12-24 16:04:38Z kaiwang27 $"); static int _dwarf_consumer_init(Dwarf_Debug dbg, Dwarf_Error *error) @@ -93,12 +93,7 @@ _dwarf_consumer_init(Dwarf_Debug dbg, Dwarf_Error *error) } dbg->dbg_section[cnt].ds_name = NULL; - if (_dwarf_find_section(dbg, ".debug_abbrev") == NULL || - ((dbg->dbg_info_sec = _dwarf_find_section(dbg, ".debug_info")) == - NULL)) { - DWARF_SET_ERROR(dbg, error, DW_DLE_DEBUG_INFO_NULL); - return (DW_DLE_DEBUG_INFO_NULL); - } + dbg->dbg_info_sec = _dwarf_find_section(dbg, ".debug_info"); /* Try to find the optional DWARF4 .debug_types section. */ dbg->dbg_types_sec = _dwarf_find_next_types_section(dbg, NULL); |