diff options
author | Mark Wielaard <mark@klomp.org> | 2020-06-11 23:16:21 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2020-06-11 23:16:21 +0200 |
commit | 50a6eeef7d87623faa65126dc3d16c2a8e613aea (patch) | |
tree | 19a35135efaac56c49a30316c6572c7b4d6ec4aa /libdw/libdw_visit_scopes.c | |
parent | 49f13584d60322578c19b6118393ab04236ca7bf (diff) | |
parent | a2bc0214a5615551d89cef8d160bdbaafd5f1a83 (diff) |
Merge tag 'elfutils-0.180' into mjw/RH-DTSdts-0.180
elfutils 0.180 release
Diffstat (limited to 'libdw/libdw_visit_scopes.c')
-rw-r--r-- | libdw/libdw_visit_scopes.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdw/libdw_visit_scopes.c b/libdw/libdw_visit_scopes.c index eb892e10..7dfa5f6b 100644 --- a/libdw/libdw_visit_scopes.c +++ b/libdw/libdw_visit_scopes.c @@ -125,8 +125,12 @@ walk_children (struct walk_children_state *state) Dwarf_Attribute *attr = INTUSE(dwarf_attr) (&state->child.die, DW_AT_import, &attr_mem); + /* Some gcc -flto versions imported other top-level compile units, + skip those. */ if (INTUSE(dwarf_formref_die) (attr, &state->child.die) != NULL - && INTUSE(dwarf_child) (&state->child.die, &state->child.die) == 0) + && INTUSE(dwarf_tag) (&state->child.die) != DW_TAG_compile_unit + && (INTUSE(dwarf_child) (&state->child.die, &state->child.die) + == 0)) { /* Checks the given DIE hasn't been imported yet to prevent cycles. */ |