Removed dlsym handle != NULL check for lp64
* Removed unnecessary NULL check in dlsym
* Fixed dlsym_failure test to account for
correct RTLD_DEFAULT value
* Added temporary check for legacy RTLD_DEFAULT
value for non-yet-recompiled binaries
Bug: 15146875
Change-Id: I089fa673762629f5724b6e4fbca019d9cfc39905
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index 434e38f..3459a56 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -101,6 +101,8 @@
void* sym;
+ // lp64 RTLD_DEFAULT=(void*)0
+#if !defined(__LP64__)
// NULL handle.
sym = dlsym(NULL, "test");
ASSERT_TRUE(sym == NULL);
@@ -109,6 +111,7 @@
#else
ASSERT_SUBSTR("undefined symbol: test", dlerror()); // glibc isn't specific about the failure.
#endif
+#endif // !defined(__LP64__)
// NULL symbol name.
#if defined(__BIONIC__)