16 h1
= dlopen ("testobj1.so", RTLD_LAZY
);
18 error (EXIT_FAILURE
, 0, "while loading `%s': %s", "testobj1.so",
21 h2
= dlopen ("testobj1_1.so", RTLD_LAZY
);
23 error (EXIT_FAILURE
, 0, "while loading `%s': %s", "testobj1_1.so",
26 fp1
= dlsym (h1
, "obj1func1");
28 error (EXIT_FAILURE
, 0, "getting `obj1func1' in `%s': %s",
29 "testobj1.so", dlerror ());
31 fp2
= dlsym (h2
, "obj1func1");
33 error (EXIT_FAILURE
, 0, "getting `obj1func1' in `%s': %s",
34 "testobj1_1.so", dlerror ());
38 printf ("fp1(10) = %d\nfp2(10) = %d\n", res1
, res2
);
40 return res1
!= 42 || res2
!= 72;