Always process TLS relocs using general code path
This is important for enabling the error about unsupported TLS
relocations to local symbols. The fast path tends to skip this error,
because it fails during lookup_symbol(). Add a test for this error.
I didn't see a performance regression in the linker_relocation
benchmark.
Bug: http://b/226978634
Test: m bionic-unit-tests
Change-Id: Ibef9bde2973cf8c2d420ecc9e8fe2c69a5097ce2
diff --git a/tests/Android.bp b/tests/Android.bp
index 3061142..48149c7 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -295,6 +295,29 @@
},
}
+cc_prebuilt_test_library_shared {
+ name: "libtest_invalid-local-tls",
+ strip: {
+ none: true,
+ },
+ check_elf_files: false,
+ relative_install_path: "bionic-loader-test-libs/prebuilt-elf-files",
+ arch: {
+ arm: {
+ srcs: ["prebuilt-elf-files/arm/libtest_invalid-local-tls.so"],
+ },
+ arm64: {
+ srcs: ["prebuilt-elf-files/arm64/libtest_invalid-local-tls.so"],
+ },
+ x86: {
+ srcs: ["prebuilt-elf-files/x86/libtest_invalid-local-tls.so"],
+ },
+ x86_64: {
+ srcs: ["prebuilt-elf-files/x86_64/libtest_invalid-local-tls.so"],
+ },
+ },
+}
+
// -----------------------------------------------------------------------------
// All standard tests.
// -----------------------------------------------------------------------------
@@ -994,6 +1017,7 @@
"libtest_init_fini_order_root",
"libtest_init_fini_order_root2",
"libtest_invalid-empty_shdr_table",
+ "libtest_invalid-local-tls",
"libtest_invalid-rw_load_segment",
"libtest_invalid-textrels",
"libtest_invalid-textrels2",