2015-06-10 20:38:39 +00:00
|
|
|
#include <dlfcn.h>
|
|
|
|
extern "C" void *dlopen_b() {
|
2015-06-23 20:44:18 +00:00
|
|
|
// TODO (dimitry): this is to work around http://b/20049306
|
|
|
|
// remove once it is fixed
|
|
|
|
static int dummy = 0;
|
|
|
|
|
2015-10-02 01:41:57 +00:00
|
|
|
// This is supposed to succeed because this library has DT_RUNPATH
|
|
|
|
// for libtest_dt_runpath_x.so which should be taken into account
|
|
|
|
// by dlopen.
|
2015-06-10 20:38:39 +00:00
|
|
|
void *handle = dlopen("libtest_dt_runpath_x.so", RTLD_NOW);
|
2015-06-23 20:44:18 +00:00
|
|
|
if (handle != nullptr) {
|
|
|
|
dummy++;
|
|
|
|
return handle;
|
|
|
|
}
|
|
|
|
return nullptr;
|
2015-06-10 20:38:39 +00:00
|
|
|
}
|