aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-15 08:41:43 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-09 10:29:17 -0300
commit0f01a551a9d114c929261df8263eda2462786229 (patch)
treeeb3123ac997230be295888c1bee26ee13669b836 /sysdeps/unix
parentbe123324b425662215bb39e76fc0b32977bd78a1 (diff)
downloadglibc-0f01a551a9d114c929261df8263eda2462786229.tar
glibc-0f01a551a9d114c929261df8263eda2462786229.tar.gz
glibc-0f01a551a9d114c929261df8263eda2462786229.tar.bz2
glibc-0f01a551a9d114c929261df8263eda2462786229.zip
string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
Commit 939da411433 added symbols redirections to handle ISO C namespace, however some compiler does not support to redeclare the function prototype. Moving these defintions to exported header it not a good practice (it exposes a internal implementation and it would require to add macros to define it only internally). Instead this patch replaces the symbol redirections by direct asm aliases, as done to handle libcall generation done by compiler on some loop optimizations. The only issue is sparc binutils generates an extra __mempcpy plt not called anywhere in the code, which indicates a binutils issue (this is added in the localplt.data for now). Checked on all affected ABIs.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data3
2 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data
index b5fc6d9c3a..327276d9c2 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data
@@ -17,4 +17,7 @@ libc.so: calloc
libc.so: free
libc.so: malloc
libc.so: realloc
+# Unreferenced PLT created by the symbols aliases used to redirect
+# the compiler generated mempcpy/stpcyp calls done by builtin usage.
+libc.so: __mempcpy
libm.so: matherr
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 15c0f8ccf7..e7ab61dcbe 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -17,4 +17,7 @@ libc.so: calloc
libc.so: free
libc.so: malloc
libc.so: realloc
+# Unreferenced PLT created by the symbols aliases used to redirect
+# the compiler generated mempcpy/stpcyp calls done by builtin usage.
+libc.so: __mempcpy
libm.so: matherr