Merge "Enable dlsym_df_1_global test for arm/arm64"
diff --git a/tests/Android.mk b/tests/Android.mk
index c942375..cd65c10 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -295,9 +295,7 @@
 # which bionic does not support. Reenable this once this question is resolved.
 bionic-unit-tests_clang_target := false
 
-ifneq ($(filter $(TARGET_ARCH),arm arm64),$(TARGET_ARCH))
 bionic-unit-tests_shared_libraries_target += libdl_test_df_1_global
-endif
 
 module := bionic-unit-tests
 module_tag := optional
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index 1023644..6b1f109 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -626,7 +626,6 @@
 }
 
 TEST(dlfcn, dlsym_df_1_global) {
-#if !defined(__arm__) && !defined(__aarch64__)
   void* handle = dlopen("libtest_dlsym_df_1_global.so", RTLD_NOW);
   ASSERT_TRUE(handle != nullptr) << dlerror();
   int (*get_answer)();
@@ -634,9 +633,6 @@
   ASSERT_TRUE(get_answer != nullptr) << dlerror();
   ASSERT_EQ(42, get_answer());
   ASSERT_EQ(0, dlclose(handle));
-#else
-  GTEST_LOG_(INFO) << "This test does nothing on arm/arm64 (to be reenabled once b/18137520 or b/18130452 are fixed).\n";
-#endif
 }
 
 TEST(dlfcn, dlopen_failure) {
diff --git a/tests/libs/Android.mk b/tests/libs/Android.mk
index 3d5b060..cd6709a 100644
--- a/tests/libs/Android.mk
+++ b/tests/libs/Android.mk
@@ -348,17 +348,13 @@
 # Library with DF_1_GLOBAL
 # -----------------------------------------------------------------------------
 libdl_test_df_1_global_src_files := dl_df_1_global.cpp
-libdl_test_df_1_global_ldflags := -fuse-ld=bfd -Wl,-z,global
+libdl_test_df_1_global_ldflags := -Wl,-z,global
+# TODO (dimitry): host ld.gold does not yet support -z global
+# remove this line once it is updated.
+libdl_test_df_1_global_ldflags_host := -fuse-ld=bfd
+
 module := libdl_test_df_1_global
-# TODO: re-enable arm once b/18137520 or b/18130452 are fixed
-ifeq ($(filter $(TARGET_ARCH),arm arm64),)
 include $(LOCAL_PATH)/Android.build.testlib.mk
-else
-# build it for host only
-build_target := SHARED_LIBRARY
-build_type := host
-include $(TEST_PATH)/Android.build.mk
-endif
 
 # -----------------------------------------------------------------------------
 # Library using symbol from libdl_test_df_1_global