1 #include <dlfcn.h>
2 
3 // Work around for http://b/20049306, which isn't going to be fixed.
4 int defeat_sibling_call_optimization = 0;
5 
dlopen_b()6 extern "C" void* dlopen_b() {
7   // This is supposed to succeed because this library has DT_RUNPATH
8   // for libtest_dt_runpath_x.so which should be taken into account
9   // by dlopen.
10   void *handle = dlopen("libtest_dt_runpath_x.so", RTLD_NOW);
11   if (handle != nullptr) {
12     defeat_sibling_call_optimization++;
13     return handle;
14   }
15   return nullptr;
16 }
17