x86: Move abilist files out of nptl/ subdirectories.
[glibc.git] / elf / unload8.c
blobf984a38098f49f7cdc4e1894ee120165aeb23f67
1 #include <dlfcn.h>
2 #include <stdio.h>
4 int
5 main (void)
7 void *h = dlopen ("$ORIGIN/unload8mod1.so", RTLD_LAZY);
8 if (h == NULL)
10 puts ("dlopen unload8mod1.so failed");
11 return 1;
14 void *h2 = dlopen ("$ORIGIN/unload8mod1x.so", RTLD_LAZY);
15 if (h2 == NULL)
17 puts ("dlopen unload8mod1x.so failed");
18 return 1;
20 dlclose (h2);
22 int (*mod1) (void) = dlsym (h, "mod1");
23 if (mod1 == NULL)
25 puts ("dlsym failed");
26 return 1;
29 mod1 ();
30 dlclose (h);
32 return 0;