9 # Expected: Undefined symbol in liba.so resolves to symbol in program, not
10 # to symbol in libb.so.
19 int a() { return b(); }
23 compile_lib
-o liba.so liba.c
32 compile_lib
-o libb.so libb.c
36 cat > program.c
<< EOI
50 libb = dlopen("./libb.so", RTLD_NOW | RTLD_GLOBAL);
52 fprintf(stderr, "Error opening libb.so: %s\n", dlerror());
56 liba = dlopen("./liba.so", RTLD_NOW | RTLD_GLOBAL);
58 fprintf(stderr, "Error opening liba.so: %s\n", dlerror());
62 a = (int (*)())dlsym(liba, "a");
64 fprintf(stderr, "Error getting symbol a: %s\n", dlerror());
73 compile_lib_dl
-o program program.c
76 test_run_ok .
/program
1