Check exiting with dlmopen'ed DSO still loaded.
authordrepper <drepper>
Wed, 27 Oct 2004 21:16:25 +0000 (21:16 +0000)
committerdrepper <drepper>
Wed, 27 Oct 2004 21:16:25 +0000 (21:16 +0000)
elf/tst-dlmopen3.c [new file with mode: 0644]

diff --git a/elf/tst-dlmopen3.c b/elf/tst-dlmopen3.c
new file mode 100644 (file)
index 0000000..da951ca
--- /dev/null
@@ -0,0 +1,23 @@
+#include <dlfcn.h>
+#include <stdio.h>
+#include <gnu/lib-names.h>
+
+
+static int
+do_test (void)
+{
+  void *h = dlmopen (LM_ID_NEWLM, "$ORIGIN/tst-dlmopen1mod.so", RTLD_LAZY);
+  if (h == NULL)
+    {
+      printf ("cannot get handle for %s: %s\n",
+             "tst-dlmopen1mod.so", dlerror ());
+      return 1;
+    }
+
+  /* Do not unload.  */
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"