summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfweak/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elfweak/main.c')
-rw-r--r--ld/testsuite/ld-elfweak/main.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elfweak/main.c b/ld/testsuite/ld-elfweak/main.c
new file mode 100644
index 0000000..5ea170c
--- /dev/null
+++ b/ld/testsuite/ld-elfweak/main.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+
+#pragma weak foo
+
+extern void foo ();
+extern void foobar ();
+
+void
+foo ()
+{
+ printf ("weak foo\n");
+}
+
+int
+main ()
+{
+ foobar ();
+ return 0;
+}