mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-06 06:37:31 +00:00
Location expressions might occasionally be of length 0. E.g. a reason for that are thread local variables that do not exactly have a location to refer to. Compilers/Linkers may choose an empty location description. E.g. see the dwarfdump output for the added testcase based on libandroid.so (from AOSP). $ dwarfdump libandroid.so|egrep -B9 "gChoreographerE$" LOCAL_SYMBOLS: < 1><0x00000022> DW_TAG_namespace DW_AT_name android < 2><0x00000027> DW_TAG_variable DW_AT_name gChoreographer DW_AT_type <0x00000b65> DW_AT_decl_file 0x00000003 .../choreographer.cpp DW_AT_decl_line 0x00000059 DW_AT_location len 0x0000: : DW_AT_linkage_name _ZN7androidL14gChoreographerE The DW_AT_location is properly read by elfutils' dwarf_location(), but is not useful for us to proceed with. Hence early exit on this. * src/abg-dwarf-reader.cc (die_location_expr): Ignore zero length location expressions. * tests/data/Makefile.am: Add new test files. * tests/data/test-read-dwarf/test-libandroid.so: New test file. * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise. * tests/test-read-dwarf.cc: Add new test case. Reported-by: Dan Albert <danalbert@google.com> Reviewed-by: Giuliano Procida <gprocida@google.com> Cc: Mark Wielaard <mark@klomp.org> Signed-off-by: Matthias Maennich <maennich@google.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
data | ||
lib | ||
.gitignore | ||
Makefile.am | ||
mockfedabipkgdiff.in | ||
print-diff-tree.cc | ||
runtestcanonicalizetypes.sh.in | ||
runtestdefaultsupprs.py.in | ||
runtestdefaultsupprspy3.sh.in | ||
runtestfedabipkgdiff.py.in | ||
runtestfedabipkgdiffpy3.sh.in | ||
test-abicompat.cc | ||
test-abidiff-exit.cc | ||
test-abidiff.cc | ||
test-alt-dwarf-file.cc | ||
test-annotate.cc | ||
test-core-diff.cc | ||
test-cxx-compat.cc | ||
test-diff2.cc | ||
test-diff-dwarf-abixml.cc | ||
test-diff-dwarf.cc | ||
test-diff-filter.cc | ||
test-diff-pkg.cc | ||
test-diff-suppr.cc | ||
test-dot.cc | ||
test-elf-helpers.cc | ||
test-ini.cc | ||
test-ir-walker.cc | ||
test-kmi-whitelist.cc | ||
test-lookup-syms.cc | ||
test-read-dwarf.cc | ||
test-read-write.cc | ||
test-svg.cc | ||
test-symtab.cc | ||
test-tools-utils.cc | ||
test-types-stability.cc | ||
test-utils.cc | ||
test-utils.h | ||
test-valgrind-suppressions.supp | ||
test-write-read-archive.cc | ||
update-test-output.py |