Fix gcc+arm builds

gcc requires unique names of symbols for .symver

Bug: http://b/26391427
Change-Id: I6392e34a45a37245fd4e53fb54243be73f443313
diff --git a/libc/arch-arm/bionic/__aeabi.c b/libc/arch-arm/bionic/__aeabi.c
index e4c85d9..098c553 100644
--- a/libc/arch-arm/bionic/__aeabi.c
+++ b/libc/arch-arm/bionic/__aeabi.c
@@ -55,9 +55,13 @@
     return __cxa_atexit(destructor, object, dso_handle);
 }
 
+int __attribute__((weak))
+__aeabi_atexit_impl2(void *object, void (*destructor) (void *), void *dso_handle) {
+    return __cxa_atexit(destructor, object, dso_handle);
+}
 
-void __attribute__((weak))
-__aeabi_memcpy8_impl(void *dest, const void *src, size_t n) {
+
+void __attribute__((weak)) __aeabi_memcpy8_impl(void *dest, const void *src, size_t n) {
     memcpy(dest, src, n);
 }
 
@@ -69,6 +73,18 @@
     memcpy(dest, src, n);
 }
 
+void __attribute__((weak)) __aeabi_memcpy8_impl2(void *dest, const void *src, size_t n) {
+    memcpy(dest, src, n);
+}
+
+void __attribute__((weak)) __aeabi_memcpy4_impl2(void *dest, const void *src, size_t n) {
+    memcpy(dest, src, n);
+}
+
+void __attribute__((weak)) __aeabi_memcpy_impl2(void *dest, const void *src, size_t n) {
+    memcpy(dest, src, n);
+}
+
 
 void __attribute__((weak)) __aeabi_memmove8_impl(void *dest, const void *src, size_t n) {
     memmove(dest, src, n);
@@ -82,6 +98,18 @@
     memmove(dest, src, n);
 }
 
+void __attribute__((weak)) __aeabi_memmove8_impl2(void *dest, const void *src, size_t n) {
+    memmove(dest, src, n);
+}
+
+void __attribute__((weak)) __aeabi_memmove4_impl2(void *dest, const void *src, size_t n) {
+    memmove(dest, src, n);
+}
+
+void __attribute__((weak)) __aeabi_memmove_impl2(void *dest, const void *src, size_t n) {
+    memmove(dest, src, n);
+}
+
 /*
  * __aeabi_memset has the order of its second and third arguments reversed.
  *  This allows __aeabi_memclr to tail-call __aeabi_memset
@@ -99,6 +127,18 @@
     memset(dest, c, n);
 }
 
+void __attribute__((weak)) __aeabi_memset8_impl2(void *dest, size_t n, int c) {
+    memset(dest, c, n);
+}
+
+void __attribute__((weak)) __aeabi_memset4_impl2(void *dest, size_t n, int c) {
+    memset(dest, c, n);
+}
+
+void __attribute__((weak)) __aeabi_memset_impl2(void *dest, size_t n, int c) {
+    memset(dest, c, n);
+}
+
 
 void __attribute__((weak)) __aeabi_memclr8_impl(void *dest, size_t n) {
     __aeabi_memset8_impl(dest, n, 0);
@@ -112,9 +152,21 @@
     __aeabi_memset_impl(dest, n, 0);
 }
 
+void __attribute__((weak)) __aeabi_memclr8_impl2(void *dest, size_t n) {
+    __aeabi_memset8_impl(dest, n, 0);
+}
+
+void __attribute__((weak)) __aeabi_memclr4_impl2(void *dest, size_t n) {
+    __aeabi_memset4_impl(dest, n, 0);
+}
+
+void __attribute__((weak)) __aeabi_memclr_impl2(void *dest, size_t n) {
+    __aeabi_memset_impl(dest, n, 0);
+}
+
 #define __AEABI_SYMVERS(fn_name) \
 __asm__(".symver " #fn_name "_impl, " #fn_name "@@LIBC"); \
-__asm__(".symver " #fn_name "_impl, " #fn_name "@LIBC_PRIVATE")
+__asm__(".symver " #fn_name "_impl2, " #fn_name "@LIBC_PRIVATE")
 
 __AEABI_SYMVERS(__aeabi_atexit);
 __AEABI_SYMVERS(__aeabi_memcpy8);