1 /* Test case for bug in dlsym accessing dependency objects' symbols. */
13 /* open lib1.so, which has the unresolved test symbol and a DT_NEEDED
14 on lib2.so, which provides the symbol */
15 if ((handle
= dlopen("bug-dlsym1-lib1.so", RTLD_NOW
)) == NULL
) {
16 printf("dlopen(\"bug-dlsym1-lib1.so\"): %s\n", dlerror());
20 if ((c
= dlsym(handle
, "dlopen_test_variable")) == NULL
) {
21 printf("dlsym(handle, \"dlopen_test_variable\"): %s\n", dlerror());
25 (void) dlclose(handle
);