Fix bionic-unit-tests-glibc

Also add another test for dlsym(RTLD_NEXT, ..)

Bug: http://b/33106624
Test: run bionic-unit-tests-glibc and bionic-unit-tests
Change-Id: I340165d66bf2360b0e3273d3561a08cb5e7bd025
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index fe0d6ab..4cd991a 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -411,6 +411,24 @@
 }
 
 // -----------------------------------------------------------------------------
+// Check that RTLD_NEXT of a libc symbol works in dlopened library
+// -----------------------------------------------------------------------------
+cc_test_library {
+    name: "libtest_check_rtld_next_from_library",
+    defaults: ["bionic_testlib_defaults"],
+    srcs: ["check_rtld_next_from_library.cpp"],
+
+    target: {
+        android: {
+            shared_libs: ["libdl"],
+        },
+        host: {
+            host_ldlibs: ["-ldl"],
+        },
+    },
+}
+
+// -----------------------------------------------------------------------------
 // Library with constructor that calls dlopen() b/7941716
 // -----------------------------------------------------------------------------
 cc_test_library {