Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 1 | #include <dlfcn.h> |
| 2 | extern "C" void *dlopen_b() { |
Dmitriy Ivanov | 7d09a8c | 2015-06-23 13:44:18 -0700 | [diff] [blame] | 3 | // TODO (dimitry): this is to work around http://b/20049306 |
| 4 | // remove once it is fixed |
| 5 | static int dummy = 0; |
| 6 | |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 7 | // 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 Ivanov | 7d09a8c | 2015-06-23 13:44:18 -0700 | [diff] [blame] | 10 | if (handle != nullptr) { |
| 11 | dummy++; |
| 12 | return handle; |
| 13 | } |
| 14 | return nullptr; |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 15 | } |