]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - dlfcn/bug-atexit3.c
2.5-18.1
[thirdparty/glibc.git] / dlfcn / bug-atexit3.c
diff --git a/dlfcn/bug-atexit3.c b/dlfcn/bug-atexit3.c
new file mode 100644 (file)
index 0000000..897eca8
--- /dev/null
@@ -0,0 +1,18 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  void *handle = dlopen ("$ORIGIN/bug-atexit3-lib.so", RTLD_LAZY);
+  if (handle == NULL)
+    {
+      printf ("dlopen failed: %s\n", dlerror ());
+      return 1;
+    }
+  dlclose (handle);
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"