libdw: Skip imported compiler_units in libdw_visit_scopes walking DIE tree
authorMark Wielaard <mark@klomp.org>
Fri, 8 May 2020 10:18:41 +0000 (12:18 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 8 May 2020 16:50:16 +0000 (18:50 +0200)
commita8493c12a707390fb8307fe60fe83e1aed960f89
treee447cb704dc63c212ab6fa3946da143e33991105
parente1db5cdc9f230f8de4df1a0f38dca69b283ee57a
libdw: Skip imported compiler_units in libdw_visit_scopes walking DIE tree

Some gcc -flto versions imported other top-level compile units,
skip those. Otherwise we'll visit various DIE trees multiple times.

Note in the testcase that with newer GCC versions function foo is
fully inlined and does appear only once (as declared, but not as
separate subprogram).

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/libdw_visit_scopes.c
tests/ChangeLog
tests/Makefile.am
tests/run-allfcts.sh
tests/testfile-lto-gcc8.bz2 [new file with mode: 0755]
tests/testfile-lto-gcc9.bz2 [new file with mode: 0755]