summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/binutils/testsuite/binutils-all/testprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/binutils/testsuite/binutils-all/testprog.c')
-rw-r--r--binutils-2.25/binutils/testsuite/binutils-all/testprog.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/binutils-2.25/binutils/testsuite/binutils-all/testprog.c b/binutils-2.25/binutils/testsuite/binutils-all/testprog.c
new file mode 100644
index 00000000..6ead98e7
--- /dev/null
+++ b/binutils-2.25/binutils/testsuite/binutils-all/testprog.c
@@ -0,0 +1,31 @@
+/* This program is used to test objcopy, readelf and strip. */
+
+extern int strcmp (char *, const char *);
+extern int printf (const char *, ...);
+
+int common;
+int global = 1;
+static int local = 2;
+static char string[] = "string";
+
+int
+fn (void)
+{
+ return 3;
+}
+
+int
+main (void)
+{
+ if (common != 0
+ || global != 1
+ || local != 2
+ || strcmp (string, "string") != 0)
+ {
+ printf ("failed\n");
+ return 1;
+ }
+
+ printf ("ok\n");
+ return 0;
+}