Add test for elf-hash and packed relocations
This adds CTS test for system libraries to support
workaround for http://b/24465209: some apps require
a subset of system libs to have elf-hash and not to
use packed relocations.
Bug: http://b/32917341
Bug: http://b/24465209
Test: bionic-unit-tests --gtest_filter=Dl*:dl*
Change-Id: Ia0bc28506b1f1f97d4cf902d73b0769e2815fed3
diff --git a/libdl/Android.bp b/libdl/Android.bp
index e9b79d7..a0aeeff 100644
--- a/libdl/Android.bp
+++ b/libdl/Android.bp
@@ -21,6 +21,7 @@
arch: {
arm: {
version_script: "libdl.arm.map",
+ ldflags: ["-Wl,--hash-style=both"],
},
arm64: {
version_script: "libdl.arm64.map",
@@ -32,7 +33,10 @@
version_script: "libdl.mips64.map",
},
x86: {
- ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
+ ldflags: [
+ "-Wl,--exclude-libs=libgcc_eh.a",
+ "-Wl,--hash-style=both",
+ ],
version_script: "libdl.x86.map",
},
x86_64: {