Optimize x86-64 pthread_cond_wait.
[glibc.git] / elf / tst-unique1.c
blob9b7996cd964ff7fb97a1558724252d155666d44f
1 #include <config.h>
2 #include <dlfcn.h>
3 #include <stdio.h>
5 static int
6 do_test (void)
8 #ifdef HAVE_ASM_UNIQUE_OBJECT
9 void *h1 = dlopen ("tst-unique1mod1.so", RTLD_LAZY);
10 if (h1 == NULL)
12 puts ("cannot load tst-unique1mod1");
13 return 1;
15 int *(*f1) (void) = dlsym (h1, "f");
16 if (f1 == NULL)
18 puts ("cannot locate f in tst-unique1mod1");
19 return 1;
21 void *h2 = dlopen ("tst-unique1mod2.so", RTLD_LAZY);
22 if (h2 == NULL)
24 puts ("cannot load tst-unique1mod2");
25 return 1;
27 int (*f2) (int *) = dlsym (h2, "f");
28 if (f2 == NULL)
30 puts ("cannot locate f in tst-unique1mod2");
31 return 1;
33 return f2 (f1 ());
34 #else
35 return 0;
36 #endif
39 #define TEST_FUNCTION do_test ()
40 #include "../test-skeleton.c"