bionic: Add page size 16KiB compat tests
The test check whether an ELF built for 4KiB max-page-size can be
loaded on a 16KiB page-sized device.
This test is only run on devices with 16KiB base page size.
Bug: 339709616
Test: adb shell setprop bionic.linker.16kb.app_compat.enabled [true|false]
Test: atest bionic-unit-tests
Test: atest CtsBionicTestCases
Change-Id: Ibd8a1c2e2d59bf13d7328377d012430c16b8e76c
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index 35f0f0c..d13ee60 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -48,6 +48,16 @@
}
// -----------------------------------------------------------------------------
+// Test library ELFs for linker page size related tests
+// -----------------------------------------------------------------------------
+cc_test_library {
+ name: "libtest_elf_max_page_size_4kib",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["elf_max_page_size.c"],
+ ldflags: ["-z max-page-size=0x1000"],
+}
+
+// -----------------------------------------------------------------------------
// Libraries and helper binaries for ELF TLS
// -----------------------------------------------------------------------------
cc_test_library {