Reject .so files using ELF TLS.

Bug: http://b/74361956
Test: ran tests

(cherry picked from commit 9724e93c196d0dbaa0e60bf45c29971a22da50c9)

Change-Id: I287c926951c337aacd2246940a1e6474e4c661e1
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index 46f5097..84f525d 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -1080,6 +1080,13 @@
   ASSERT_SUBSTR("libsysv-hash-table-library.so", dlinfo.dli_fname);
 }
 
+TEST(dlfcn, dlopen_library_with_ELF_TLS) {
+  dlerror(); // Clear any pending errors.
+  void* handle = dlopen("libelf-tls-library.so", RTLD_NOW);
+  ASSERT_TRUE(handle == nullptr);
+  ASSERT_SUBSTR("unsupported ELF TLS", dlerror());
+}
+
 TEST(dlfcn, dlopen_bad_flags) {
   dlerror(); // Clear any pending errors.
   void* handle;