Updated to fedora-glibc-20090409T1422
[glibc/history.git] / elf / reldep4.c
blobba12e7d9c4dc31477e0906d5151423ee6702e548
1 #include <dlfcn.h>
2 #include <mcheck.h>
3 #include <stdio.h>
4 #include <stdlib.h>
6 int
7 main (void)
9 int i;
10 void *h1, *h2;
12 mtrace ();
14 for (i = 0; i < 3; i++)
16 h1 = dlopen ("reldep4mod1.so", RTLD_NOW | RTLD_GLOBAL);
17 if (h1 == NULL)
19 printf ("cannot open reldep4mod1.so: %s\n", dlerror ());
20 exit (1);
22 h2 = dlopen ("reldep4mod2.so", RTLD_NOW | RTLD_GLOBAL);
23 if (h2 == NULL)
25 printf ("cannot open reldep4mod2.so: %s\n", dlerror ());
26 exit (1);
28 if (dlclose (h1) != 0)
30 printf ("closing h1 failed: %s\n", dlerror ());
31 exit (1);
33 if (dlclose (h2) != 0)
35 printf ("closing h2 failed: %s\n", dlerror ());
36 exit (1);
39 return 0;