summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2014-08-04 15:21:16 +0000
committerDmitriy Ivanov <dimitry@google.com>2014-08-04 16:38:57 +0000
commit1b1966d9448e979d1503a3d8843708bfa8880dc6 (patch)
treeb107082e4add82eae0fe74445b4be4b8e7447684 /tests
parent61833de613990f2fdaf357bb3d854d72a4980890 (diff)
downloadbionic-1b1966d9448e979d1503a3d8843708bfa8880dc6.zip
bionic-1b1966d9448e979d1503a3d8843708bfa8880dc6.tar.gz
bionic-1b1966d9448e979d1503a3d8843708bfa8880dc6.tar.bz2
Revert "Fix dlsym(3) to do breadth first search."
This reverts commit 422106a24d620af4be58e8d92a2e9b7b6167b72d. Change-Id: I9e26a6933d10eb30438b521450f2010997ca5aee
Diffstat (limited to 'tests')
-rw-r--r--tests/dlfcn_test.cpp21
-rw-r--r--tests/libs/Android.mk13
2 files changed, 4 insertions, 30 deletions
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index 9bc2557..f056fb6 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -62,9 +62,10 @@ TEST(dlfcn, dlsym_in_self) {
ASSERT_EQ(0, dlclose(self));
}
-#if defined(__arm__)
-// This seems to be working only for arm.
-// Others platforms optimize LOCAL PROTECTED symbols.
+#if !defined(__LP64__)
+// Current compiler/static linker used for aarch64
+// platform optimizes LOCAL PROTECTED symbol
+// in libtest_local_symbol.so out of existence
TEST(dlfcn, dlsym_local_symbol) {
void* handle = dlopen("libtest_local_symbol.so", RTLD_NOW);
ASSERT_TRUE(handle != NULL);
@@ -77,23 +78,9 @@ TEST(dlfcn, dlsym_local_symbol) {
f = reinterpret_cast<uint32_t (*)(void)>(dlsym(handle, "dlsym_local_symbol_get_taxicab_number_using_dlsym"));
ASSERT_TRUE(f != NULL);
ASSERT_EQ(1729U, f());
- dlclose(handle);
}
#endif
-TEST(dlfcn, dlsym_with_dependencies) {
- void* handle = dlopen("libtest_with_dependency.so", RTLD_NOW);
- ASSERT_TRUE(handle != NULL);
- dlerror();
- // This symbol is in DT_NEEDED library.
- void* sym = dlsym(handle, "getRandomNumber");
- ASSERT_TRUE(sym != NULL);
- int (*fn)(void);
- fn = reinterpret_cast<int (*)(void)>(sym);
- EXPECT_EQ(4, fn());
- dlclose(handle);
-}
-
TEST(dlfcn, dlopen_noload) {
void* handle = dlopen("libtest_simple.so", RTLD_NOW | RTLD_NOLOAD);
ASSERT_TRUE(handle == NULL);
diff --git a/tests/libs/Android.mk b/tests/libs/Android.mk
index 7ed3e7b..a374e48 100644
--- a/tests/libs/Android.mk
+++ b/tests/libs/Android.mk
@@ -102,19 +102,6 @@ build_target := SHARED_LIBRARY
include $(TEST_PATH)/Android.build.mk
# -----------------------------------------------------------------------------
-# Library with dependency used by dlfcn tests
-# -----------------------------------------------------------------------------
-libtest_with_dependency_src_files := \
- dlopen_testlib_simple.cpp
-
-libtest_with_dependency_shared_libraries := libdlext_test
-
-module := libtest_with_dependency
-build_type := target
-build_target := SHARED_LIBRARY
-include $(TEST_PATH)/Android.build.mk
-
-# -----------------------------------------------------------------------------
# Library used to test local symbol lookup
# -----------------------------------------------------------------------------
libtest_local_symbol_src_files := \