Remove duplicate entries.
[glibc/history.git] / elf / tst-global1.c
blob1611b51b67b3642bb793579a15684206574dc74d
1 #include <dlfcn.h>
2 #include <stdio.h>
4 int
5 main (void)
7 void *h1 = dlopen ("$ORIGIN/testobj6.so", RTLD_GLOBAL|RTLD_LAZY);
8 if (h1 == NULL)
10 puts ("cannot open testobj6");
11 return 1;
14 void *h2 = dlopen ("$ORIGIN/testobj2.so",
15 RTLD_GLOBAL|RTLD_DEEPBIND|RTLD_LAZY);
16 if (h2 == NULL)
18 puts ("cannot open testobj2");
19 return 1;
22 dlclose (h1);
24 void (*f) (void) = dlsym (h2, "p");
25 if (f == NULL)
27 puts ("cannot find p");
28 return 1;
31 f ();
33 dlclose (h2);
35 return 0;