summaryrefslogtreecommitdiff
path: root/elf/unload6mod1.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/unload6mod1.c')
-rw-r--r--elf/unload6mod1.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/elf/unload6mod1.c b/elf/unload6mod1.c
new file mode 100644
index 0000000000..24f2e5a19a
--- /dev/null
+++ b/elf/unload6mod1.c
@@ -0,0 +1,16 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+int
+foo (int i)
+{
+ void *h = dlopen ("unload6mod2.so", RTLD_LAZY);
+ if (h == NULL)
+ {
+ puts ("dlopen unload6mod2.so failed");
+ return 1;
+ }
+
+ dlclose (h);
+ return i + 8;
+}