mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
1826d7933b
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.
41 lines
709 B
C
41 lines
709 B
C
#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;
|
|
}
|