summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-srec/sr1.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-srec/sr1.c')
-rw-r--r--ld/testsuite/ld-srec/sr1.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/ld/testsuite/ld-srec/sr1.c b/ld/testsuite/ld-srec/sr1.c
new file mode 100644
index 0000000..d7de977
--- /dev/null
+++ b/ld/testsuite/ld-srec/sr1.c
@@ -0,0 +1,25 @@
+/* This file is compiled and linked into the S-record format. */
+
+extern int e1;
+extern int e2;
+int i;
+int j = 1;
+static int k;
+static int l = 1;
+static char ab[] = "This is a string constant";
+
+extern int fn1 ();
+extern int fn2 ();
+
+int
+main ()
+{
+ fn1 (ab);
+ fn2 ("static string constant");
+ return e1 + e2 + i + j + k + l;
+}
+
+void
+__main ()
+{
+}