9 # Expected: Undefined symbol in liba.so resolves to symbol in libb.so.
18 int a() { return b(); }
22 compile_lib
-o liba.so liba.c
31 compile_lib
-o libb.so libb.c
35 cat > program.c
<< EOI
46 liba = dlopen("./liba.so", RTLD_NOW | RTLD_GLOBAL);
48 fprintf(stderr, "Error opening liba.so: %s\n", dlerror());
52 a = (int (*)())dlsym(liba, "a");
54 fprintf(stderr, "Error getting symbol a: %s\n", dlerror());
63 compile_program_dl
-o program program.c .
/libb.so
66 test_run_ok .
/program
1