aboutsummaryrefslogtreecommitdiff
path: root/elf/reldep4.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-05-22 23:55:23 +0000
committerUlrich Drepper <drepper@redhat.com>2001-05-22 23:55:23 +0000
commit1826d7933b56601f98be8740b5a3c5c07ad00e65 (patch)
treebac05098c70c0ba2a9ba7c279efa518bb722e442 /elf/reldep4.c
parent80d9c5f0b121a46467a0fc4eab587c055d79e583 (diff)
downloadglibc-1826d7933b56601f98be8740b5a3c5c07ad00e65.tar
glibc-1826d7933b56601f98be8740b5a3c5c07ad00e65.tar.gz
glibc-1826d7933b56601f98be8740b5a3c5c07ad00e65.tar.bz2
glibc-1826d7933b56601f98be8740b5a3c5c07ad00e65.zip
Update.
2001-05-22 Jakub Jelinek <jakub@redhat.com> * elf/dl-close.c (_dl_close): Save imap->l_reldeps, not map->l_reldeps. * elf/Makefile (distribute): Add reldep4mod[1234].c. (tests): Add reldep4. (modules-names): Add reldep4mod[1234]. (reldep4mod1.so, reldep4mod2.so, reldep4, reldep4.out): New rules. * elf/reldep4.c: New file. * elf/reldep4mod1.c: Likewise. * elf/reldep4mod2.c: Likewise. * elf/reldep4mod3.c: Likewise. * elf/reldep4mod4.c: Likewise.
Diffstat (limited to 'elf/reldep4.c')
-rw-r--r--elf/reldep4.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/elf/reldep4.c b/elf/reldep4.c
new file mode 100644
index 0000000000..e8ab6d23de
--- /dev/null
+++ b/elf/reldep4.c
@@ -0,0 +1,40 @@
+#include <dlfcn.h>
+#include <mcheck.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main()
+{
+ int i;
+ void *h1, *h2;
+
+ mtrace ();
+
+ for (i = 0; i < 3; i++)
+ {
+ h1 = dlopen ("reldep4mod1.so", RTLD_NOW | RTLD_GLOBAL);
+ if (h1 == NULL)
+ {
+ printf ("cannot open reldep4mod1.so: %s\n", dlerror ());
+ exit (1);
+ }
+ h2 = dlopen ("reldep4mod2.so", RTLD_NOW | RTLD_GLOBAL);
+ if (h2 == NULL)
+ {
+ printf ("cannot open reldep4mod2.so: %s\n", dlerror ());
+ exit (1);
+ }
+ if (dlclose (h1) != 0)
+ {
+ printf ("closing h1 failed: %s\n", dlerror ());
+ exit (1);
+ }
+ if (dlclose (h2) != 0)
+ {
+ printf ("closing h2 failed: %s\n", dlerror ());
+ exit (1);
+ }
+ }
+ return 0;
+}