about summary refs log tree commit diff
path: root/sysdeps/arm/armv7
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-12-09 15:22:53 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:40 -0300
commited04c874cfecd25c2c1449f39aa66390ae6ccf9d (patch)
tree878dcaae48e8e17bf028c9dec662cc9d818901de /sysdeps/arm/armv7
parent0f9ceb0c3e2b52081cf2ac3deb236dad9aa545b1 (diff)
downloadglibc-ed04c874cfecd25c2c1449f39aa66390ae6ccf9d.tar.gz
glibc-ed04c874cfecd25c2c1449f39aa66390ae6ccf9d.tar.xz
glibc-ed04c874cfecd25c2c1449f39aa66390ae6ccf9d.zip
arm: Fix clang multi-arch build with ld.bfd
clang binds autogenerated memcpy/memset/memchr calls to the hidden
internal symbols, different than gcc that binds without hidden
attribute.  And this triggers an linker issue with bfd:

  ld: BFD (GNU Binutils for Ubuntu) 2.38 assertion fail
  ../../bfd/elf32-arm.c:4286

Similar to other architectures, bind internal memcpy and memcpy
symbols to the generic interface instead.
Diffstat (limited to 'sysdeps/arm/armv7')
-rw-r--r--sysdeps/arm/armv7/multiarch/memchr.c2
-rw-r--r--sysdeps/arm/armv7/multiarch/memchr_noneon.S4
-rw-r--r--sysdeps/arm/armv7/multiarch/memcpy.c2
-rw-r--r--sysdeps/arm/armv7/multiarch/memcpy_arm.S4
4 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/arm/armv7/multiarch/memchr.c b/sysdeps/arm/armv7/multiarch/memchr.c
index cd5d53bc03..17e710b413 100644
--- a/sysdeps/arm/armv7/multiarch/memchr.c
+++ b/sysdeps/arm/armv7/multiarch/memchr.c
@@ -30,6 +30,4 @@
 # include "ifunc-memchr.h"
 
 arm_libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR);
-
-arm_libc_ifunc_hidden_def (__redirect_memchr, memchr);
 #endif
diff --git a/sysdeps/arm/armv7/multiarch/memchr_noneon.S b/sysdeps/arm/armv7/multiarch/memchr_noneon.S
index b1fb54018d..982b9f2789 100644
--- a/sysdeps/arm/armv7/multiarch/memchr_noneon.S
+++ b/sysdeps/arm/armv7/multiarch/memchr_noneon.S
@@ -3,3 +3,7 @@
 #define libc_hidden_builtin_def(name)
 
 #include <sysdeps/arm/armv6t2/memchr.S>
+
+#if IS_IN (libc) && !defined (__ARM_NEON__)
+strong_alias (__memchr_noneon, __GI_memchr)
+#endif
diff --git a/sysdeps/arm/armv7/multiarch/memcpy.c b/sysdeps/arm/armv7/multiarch/memcpy.c
index 86f30522aa..50d1ca8cd4 100644
--- a/sysdeps/arm/armv7/multiarch/memcpy.c
+++ b/sysdeps/arm/armv7/multiarch/memcpy.c
@@ -30,6 +30,4 @@
 # include "ifunc-memcpy.h"
 
 arm_libc_ifunc_redirected (__redirect_memcpy, memcpy, IFUNC_SELECTOR);
-
-arm_libc_ifunc_hidden_def (__redirect_memcpy, memcpy);
 #endif
diff --git a/sysdeps/arm/armv7/multiarch/memcpy_arm.S b/sysdeps/arm/armv7/multiarch/memcpy_arm.S
index e4a9a68c42..d71493fdb3 100644
--- a/sysdeps/arm/armv7/multiarch/memcpy_arm.S
+++ b/sysdeps/arm/armv7/multiarch/memcpy_arm.S
@@ -8,3 +8,7 @@
 strong_alias (__memcpy_arm, __aeabi_memcpy)
 strong_alias (__memcpy_arm, __aeabi_memcpy4)
 strong_alias (__memcpy_arm, __aeabi_memcpy8)
+
+#if IS_IN (libc) && !defined (__ARM_NEON__)
+strong_alias (__memcpy_arm, __GI_memcpy)
+#endif