Fix dlclose for libraries with thread_local dtors
Introduce new flag to mark soinfo as TLS_NODELETE when
there are thread_local dtors associated with dso_handle
belonging to it.
Test: bionic-unit-tests --gtest_filter=dl*
Test: bionic-unit-tests-glibc --gtest_filter=dl*
Bug: https://github.com/android-ndk/ndk/issues/360
Change-Id: I724ef89fc899788f95c47e6372c38b3313f18fed
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index e45eb6e..61a837f 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -636,6 +636,16 @@
}
// -----------------------------------------------------------------------------
+// Library with non-trivial thread_local variable to test dlclose()
+// -----------------------------------------------------------------------------
+cc_test_library {
+ name: "libtest_thread_local_dtor",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["thread_local_dtor.cpp"],
+}
+
+
+// -----------------------------------------------------------------------------
// Tool to use to align the shared libraries in a zip file.
// -----------------------------------------------------------------------------
cc_binary_host {