summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-plugin/lto-12c.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-plugin/lto-12c.c')
-rw-r--r--ld/testsuite/ld-plugin/lto-12c.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/lto-12c.c b/ld/testsuite/ld-plugin/lto-12c.c
new file mode 100644
index 0000000..ecd1bd4
--- /dev/null
+++ b/ld/testsuite/ld-plugin/lto-12c.c
@@ -0,0 +1,15 @@
+#include <string.h>
+
+extern int value;
+
+void *memcpy(void *dest, const void *src, size_t n)
+{
+ char *d = (char *) dest;
+ const char *s = (const char *) src;
+
+ while (n--)
+ *d++ = *s++;
+
+ value = 1;
+ return dest;
+}