aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maennich <maennich@google.com>2019-02-06 12:53:57 +0000
committerKarthik Ramakrishnan <karthikmr@google.com>2019-10-23 01:48:46 +0000
commit1dd80b28b32e0a316aae0274fb4ed8c6d55ee470 (patch)
tree7fed2e62bab1bb3f7e5d1dea7335dd0e102afe90
parent015e95e9fec2d569717aaf31158b9ade6fc78949 (diff)
downloadlinux-kselftest-pie-vts-dev.tar.gz
x86 tests: address test failures caused by Text Relocationspie-vts-dev
Starting with API level 23, binaries must not contain text relocations. (see https://android.googlesource.com/platform/bionic/+/master/ android-changes-for-ndk-developers.md #Text-Relocations-Enforced-for-API-level-23) Soong creates build rules in a way that non-static binaries are linked with -pie (see cs/android/build/soong/cc/binary.go?l=278). That causes the toolchain to generate text relocations, which violate the above requirement. Hence, marking the test executables as static and removing all occurrences of `-Wl,-z,notext` as they are now obsolete. Tests might still fail with this patch applied, but for a different reason. Bug: 123864125 Fixes: 118999928 Test: run vts-kernel -m VtsKernelLinuxKselftest Change-Id: If2e44691223685cb1059f656a2499a74deb1e496 Signed-off-by: Matthias Maennich <maennich@google.com> (cherry picked from commit 4a58c555e911a3bc14959353b7a32a94d6e76749)
-rw-r--r--Android.bp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 6cf8cf1129ff..758417c25e13 100644
--- a/Android.bp
+++ b/Android.bp
@@ -320,7 +320,7 @@ cc_test {
}
}
-// x86 test
+// x86 tests
cc_test {
name: "kselftest_x86_tests",
relative_install_path: "linux-kselftest/x86",
@@ -355,6 +355,7 @@ cc_test {
"-pthread",
],
c_std: "gnu99",
+ static_executable: true,
defaults: ["kselftest_defaults"],
}
@@ -422,6 +423,7 @@ cc_test {
"-pthread",
],
c_std: "gnu99",
+ static_executable: true,
test_per_src: false,
defaults: ["kselftest_defaults"],
enabled: false,