8 # Expected: Undefined symbol in liba.so resolve to symbol in program.
17 int a() { return b(); }
21 compile_lib
-o liba.so liba.c
25 cat > program.c
<< EOI
38 liba = dlopen("./liba.so", RTLD_NOW | RTLD_GLOBAL);
40 /* Fails expectedly. */
41 /* fprintf(stderr, "Error opening liba.so: %s\n", dlerror()); */
45 a = (int (*)())dlsym(liba, "a");
47 fprintf(stderr, "Error getting symbol a: %s\n", dlerror());
56 compile_program_dl
-o program program.c
59 test_run_ok .
/program
1