8 # Expected: dlsym(RTLD_NEXT) finds symbol in order liba.so, libb.so, libd.so
20 compile_lib
-o libd.so libd.c
31 *(void**)&nextA = dlsym(RTLD_NEXT, "a");
32 return (nextA != 0 ? nextA() : 0) + 2;
37 compile_lib_dl
-o libb.so libb.c .
/libd.so
47 *(void**)&nextA = dlsym(RTLD_NEXT, "a");
48 return (nextA != 0 ? nextA() : 0) + 4;
53 compile_lib_dl
-o liba.so liba.c .
/libb.so
57 cat > program.c
<< EOI
64 *(void**)&nextA = dlsym(RTLD_NEXT, "a");
65 return (nextA != 0 ? nextA() : 0) + 8;
76 compile_program_dl
-o program program.c .
/liba.so
79 test_run_ok .
/program
15