blob: 5291d81faa48dd56b11d271ba1e718011e7ce462 [file] [log] [blame]
Evgenii Stepanov68650822015-06-10 13:38:39 -07001#include <dlfcn.h>
2extern "C" void *dlopen_b() {
Dmitriy Ivanov7d09a8c2015-06-23 13:44:18 -07003 // TODO (dimitry): this is to work around http://b/20049306
4 // remove once it is fixed
5 static int dummy = 0;
6
Evgenii Stepanov68650822015-06-10 13:38:39 -07007 // This is not supposed to succeed. Even though this library has DT_RUNPATH
8 // for libtest_dt_runpath_x.so, it is not taked into account for dlopen.
9 void *handle = dlopen("libtest_dt_runpath_x.so", RTLD_NOW);
Dmitriy Ivanov7d09a8c2015-06-23 13:44:18 -070010 if (handle != nullptr) {
11 dummy++;
12 return handle;
13 }
14 return nullptr;
Evgenii Stepanov68650822015-06-10 13:38:39 -070015}