Commit Graph

6 Commits

Author SHA1 Message Date
Logan Chien 8abf06faa4 Exclude system shared libs from fix suggestion am: 751a987bcc
Original change: https://android-review.googlesource.com/c/platform/build/+/1190333

Change-Id: Ie9ff04af02f76aa0aafd934aa1cb8d13b041bdd0
2020-09-28 04:13:26 +00:00
Stephen Hines 7f5d326ce2 Fix ordering of checks based on llvm-readobj output.
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
2020-09-22 20:54:21 -07:00
Logan Chien 751a987bcc Exclude system shared libs from fix suggestion
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
2020-09-22 18:55:11 +08:00
Yo Chiang 1237c1f577 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Test: TH
Change-Id: I2a93e520120fa52a190a445b4d4c417c299b9727
2020-07-29 01:20:01 +08:00
Logan Chien 99cdf5385d Update check_elf_file.py for clang-r353983
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
2019-03-20 15:24:00 +08:00
Logan Chien 0e53d887d6 Add prebuilt ELF binaries checker
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
2019-01-21 21:35:01 +08:00