--- /dev/null
+//------------------------------------------------------------------------------\r
+//\r
+// Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
+//\r
+// This program and the accompanying materials are licensed and made\r
+// available under the terms and conditions of the BSD License which\r
+// accompanies this distribution. The full text of the license may be\r
+// found at http://opensource.org/licenses/bsd-license.php\r
+//\r
+// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR\r
+// IMPLIED.\r
+//\r
+//------------------------------------------------------------------------------\r
+\r
+typedef __SIZE_TYPE__ size_t;\r
+\r
+static __attribute__((__used__))\r
+void *__memcpy(void *dest, const void *src, size_t n)\r
+{\r
+ unsigned char *d = dest;\r
+ unsigned char const *s = src;\r
+\r
+ while (n--)\r
+ *d++ = *s++;\r
+\r
+ return dest;\r
+}\r
+\r
+__attribute__((__alias__("__memcpy")))\r
+void *memcpy(void *dest, const void *src, size_t n);\r
+\r
+#ifdef __arm__\r
+\r
+__attribute__((__alias__("__memcpy")))\r
+void __aeabi_memcpy(void *dest, const void *src, size_t n);\r
+\r
+__attribute__((__alias__("__memcpy")))\r
+void __aeabi_memcpy4(void *dest, const void *src, size_t n);\r
+\r
+__attribute__((__alias__("__memcpy")))\r
+void __aeabi_memcpy8(void *dest, const void *src, size_t n);\r
+\r
+#endif\r