1 /* Test case for bug in dlsym accessing dependency objects' symbols. */
13 setenv ("LD_LIBRARY_PATH", "/home/roland/build/tls-libc/dlfcn", 1);
15 /* open lib1.so, which has the unresolved test symbol and a DT_NEEDED
16 on lib2.so, which provides the symbol */
17 if ((handle
= dlopen("bug-dlsym1-lib1.so", RTLD_NOW
)) == NULL
) {
18 printf("dlopen(\"bug-dlsym1-lib1.so\"): %s\n", dlerror());
22 if ((c
= dlsym(handle
, "dlopen_test_variable")) == NULL
) {
23 printf("dlsym(handle, \"dlopen_test_variable\"): %s\n", dlerror());
27 (void) dlclose(handle
);