Fix dlsym(handle_of_main_executable, ...)
According to man dlopen(3) and posix docs in the case when si is handle
of the main executable we need to search not only in the executable and its
dependencies but also in all libraries loaded with RTLD_GLOBAL.
see also: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlopen.html
Bug: http://b/21528224
Bug: http://b/17512583
Bug: https://code.google.com/p/android/issues/detail?id=173822
Change-Id: Ib2801367ba48b6f3704da89a6d9f5e6911430013
diff --git a/tests/libs/Android.mk b/tests/libs/Android.mk
index 15fa55c..a5ef622 100644
--- a/tests/libs/Android.mk
+++ b/tests/libs/Android.mk
@@ -405,6 +405,14 @@
include $(LOCAL_PATH)/Android.build.testlib.mk
# -----------------------------------------------------------------------------
+# Empty library
+# -----------------------------------------------------------------------------
+libtest_empty_src_files := empty.cpp
+
+module := libtest_empty
+include $(LOCAL_PATH)/Android.build.testlib.mk
+
+# -----------------------------------------------------------------------------
# Library with weak undefined function
# -----------------------------------------------------------------------------
libtest_dlopen_weak_undefined_func_src_files := \