about summary refs log tree commit diff
path: root/REORG.TODO/elf/tst-unique2.c
diff options
context:
space:
mode:
Diffstat (limited to 'REORG.TODO/elf/tst-unique2.c')
-rw-r--r--REORG.TODO/elf/tst-unique2.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/REORG.TODO/elf/tst-unique2.c b/REORG.TODO/elf/tst-unique2.c
new file mode 100644
index 0000000000..e0173b7bcc
--- /dev/null
+++ b/REORG.TODO/elf/tst-unique2.c
@@ -0,0 +1,27 @@
+#include <config.h>
+#include <dlfcn.h>
+#include <stdio.h>
+
+extern int var;
+
+static int
+do_test (void)
+{
+  var = 1;
+
+  void *h = dlopen ("tst-unique2mod2.so", RTLD_LAZY);
+  if (h == NULL)
+    {
+      puts ("cannot load tst-unique2mod2");
+      return 1;
+    }
+  int (*f) (int *) = dlsym (h, "f");
+  if (f == NULL)
+    {
+      puts ("cannot locate f in tst-unique2mod2");
+      return 1;
+    }
+  return f (&var);
+}
+
+#include <support/test-driver.c>