Support DT_RUNPATH in the linker.

Only $ORIGIN substitution is supported, but not linux-specific $LIB
or $PLATFORM.

Change-Id: I5814a016c7c91afba080230a547a863686e7c2b9
diff --git a/tests/libs/dlopen_b.cpp b/tests/libs/dlopen_b.cpp
new file mode 100644
index 0000000..34f2881
--- /dev/null
+++ b/tests/libs/dlopen_b.cpp
@@ -0,0 +1,7 @@
+#include <dlfcn.h>
+extern "C" void *dlopen_b() {
+  // This is not supposed to succeed. Even though this library has DT_RUNPATH
+  // for libtest_dt_runpath_x.so, it is not taked into account for dlopen.
+  void *handle = dlopen("libtest_dt_runpath_x.so", RTLD_NOW);
+  return handle;
+}