`lib` is already a string and doesn't need to be decoded.
Bug: 258395719
Test: On internal master: build/soong/soong_ui.bash --make-mode --bazel-mode-staging TARGET_PRODUCT=aosp_coral TARGET_BUILD_VARIANT=userdebug droid dist device-tests platform_tests
Change-Id: I83ff35339bea9f01c61d953e251788e0894005dc
Also, create a python_binary_host so that it runs using the hermetic
python toolchain.
Test: m check-elf-files
Bug: 203436762
Change-Id: I964342a27f6b6c9dcdbbe910d4dc6c9ec00c2213
Upstream llvm-readobj no longer accepts single dash prefix for long
options. Changed to double dash.
Also let the script to raise exception if rc is non-zero, to avoid
getting confusing error later in the program.
Test: build
Bug: 197230471
Change-Id: I364f51322904431d430549f79af58f455f47e028
llvm-readobj has reordered some of its output, causing issues when
checking for DT_SONAME and other fields.
Bug: http://b/169195129
Test: m for a failing target
Change-Id: Ifbc120b703ec47b52e77c2baf0e4d080960e9ef9
This commit removes system shared libs (e.g. libc, libdl, or libm) from
the prebuilt ELF check fix suggestion.
Bug: 141925662
Test: Write a bad Android.mk module and check fix suggestions
Change-Id: I4a827d07b24a976c1910b814126790abbeccc793
This commit updates how `check_elf_file.py` parses the symbol name
because the `llvm-readobj` (from clang-r353983) does not print "@" if
the symbol is not versioned.
See also. https://reviews.llvm.org/D56319
Bug: 128959554
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I0dee5e505225e57750a2c86cf0d25a151c218eb1
This commit introduces a prebuilt ELF binaries checker. The checker
will check:
1. Whether all DT_NEEDED shared libraries are specified in
`shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES` (Android.mk).
2. Whether all undefined symbols in the prebuilt binary can be resolved
to defined symbols exported by its dependencies.
This ensures that prebuilt binaries won't silently become ABI
incompatible.
To check the prebuilt binaries, all of the dependencies must be
specified in `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES`
(Android.mk).
If your prebuilt binaries cannot be checked for some reason, you may add
the following property to Android.bp:
check_elf_files: false,
Or, add the following setting to Android.mk:
LOCAL_CHECK_ELF_FILES := false
Bug: 119084334
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I523d3083f22fd4053c096d26f61f8375800281c8