2015-06-10 22:38:39 +02:00
|
|
|
#include <dlfcn.h>
|
|
|
|
extern "C" void *dlopen_b() {
|
2015-06-23 22:44:18 +02:00
|
|
|
// TODO (dimitry): this is to work around http://b/20049306
|
|
|
|
// remove once it is fixed
|
|
|
|
static int dummy = 0;
|
|
|
|
|
2015-10-02 03:41:57 +02: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 22:38:39 +02:00
|
|
|
void *handle = dlopen("libtest_dt_runpath_x.so", RTLD_NOW);
|
2015-06-23 22:44:18 +02:00
|
|
|
if (handle != nullptr) {
|
|
|
|
dummy++;
|
|
|
|
return handle;
|
|
|
|
}
|
|
|
|
return nullptr;
|
2015-06-10 22:38:39 +02:00
|
|
|
}
|