aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/dl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf/dl2.c')
-rw-r--r--ld/testsuite/ld-elf/dl2.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/dl2.c b/ld/testsuite/ld-elf/dl2.c
new file mode 100644
index 0000000..b5cd927
--- /dev/null
+++ b/ld/testsuite/ld-elf/dl2.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+int foo;
+
+extern void xxx (void);
+
+void
+bar (int x)
+{
+ if (foo == 1)
+ printf ("OK1\n");
+ else if (foo == 0)
+ printf ("OK2\n");
+ foo = -1;
+ xxx ();
+}