public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2024-04-17 20:06 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:06 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5e40fc59009c7247b974d161ba50da4c237b66a6
commit 5e40fc59009c7247b974d161ba50da4c237b66a6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data | 3 +++
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 3b4c6007d7..082865caad 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2024-04-02 15:52 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:52 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54c56fb6716cf641a6a3d05a0daf017233c255a1
commit 54c56fb6716cf641a6a3d05a0daf017233c255a1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data | 3 +++
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 3b4c6007d7..082865caad 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2024-02-09 17:31 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:31 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f01a551a9d114c929261df8263eda2462786229
commit 0f01a551a9d114c929261df8263eda2462786229
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data | 3 +++
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 3b4c6007d7..082865caad 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2024-02-07 14:06 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:06 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=72170b200a13688e37d3d14c648e3ce70d5ba8b8
commit 72170b200a13688e37d3d14c648e3ce70d5ba8b8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data | 3 +++
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 3b4c6007d7..082865caad 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2024-01-29 17:56 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:56 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2af4720de0c0e7580a0aed48edc85a7b496ad2d4
commit 2af4720de0c0e7580a0aed48edc85a7b496ad2d4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 86d1fa4abe..27f4e6e563 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2023-12-21 18:53 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:53 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e48d42817486f2a755bc87981a10da5b6b0783a6
commit e48d42817486f2a755bc87981a10da5b6b0783a6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 86d1fa4abe..27f4e6e563 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2023-09-28 17:51 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:51 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=73fc2358d76908e448d74178728e154ea2e39218
commit 73fc2358d76908e448d74178728e154ea2e39218
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 86d1fa4abe..27f4e6e563 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2023-08-30 12:36 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:36 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9a0fffedba777d58ff811042a762ddda0e94b748
commit 9a0fffedba777d58ff811042a762ddda0e94b748
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 86d1fa4abe..27f4e6e563 100644
--- a/include/string.h
+++ b/include/string.h
@@ -179,8 +179,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2023-02-09 19:48 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:48 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=265a0626b9e73970497e050f184fa5804451cacf
commit 265a0626b9e73970497e050f184fa5804451cacf
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index a9120ff37c..d6e352e214 100644
--- a/include/string.h
+++ b/include/string.h
@@ -178,8 +178,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-10-28 17:41 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:41 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=147b34c631865ddc470058f295df52038ae628dd
commit 147b34c631865ddc470058f295df52038ae628dd
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-10-04 12:59 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:59 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=44883f257b6ac4c5899fd3288d474a1dcf46027c
commit 44883f257b6ac4c5899fd3288d474a1dcf46027c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-06-09 21:20 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:20 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4e4e1058418e9996474bc44c4b8356ebd2519d07
commit 4e4e1058418e9996474bc44c4b8356ebd2519d07
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-06-09 13:17 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:17 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4e4e1058418e9996474bc44c4b8356ebd2519d07
commit 4e4e1058418e9996474bc44c4b8356ebd2519d07
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-06-03 14:06 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:06 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d48f5b10441ac08cb4b2a7807221e07d1f50c728
commit d48f5b10441ac08cb4b2a7807221e07d1f50c728
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-05-13 14:20 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:20 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b60019c1e9fbf259bea9f80e794375392553ba3d
commit b60019c1e9fbf259bea9f80e794375392553ba3d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-05-12 19:34 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:34 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1cc186a85b7ef753b73e3623d5431187e4f46eda
commit 1cc186a85b7ef753b73e3623d5431187e4f46eda
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-05-10 18:24 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:24 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=aaa7bfc0f918f048b9fb4d39efc3a561946f84e6
commit aaa7bfc0f918f048b9fb4d39efc3a561946f84e6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-04-29 14:04 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:04 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=48391c8199797f86b1e90c2969f3e4d5346f1b8d
commit 48391c8199797f86b1e90c2969f3e4d5346f1b8d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-04-04 12:54 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:54 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=07c0ba705d7b5cb0bead046c6ecaecca94b3aae9
commit 07c0ba705d7b5cb0bead046c6ecaecca94b3aae9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-03-31 19:07 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:07 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e6be57d8917963fbffaa2c3408c2fad1c2eabc79
commit e6be57d8917963fbffaa2c3408c2fad1c2eabc79
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-03-29 20:30 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:30 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c8a136dad6330f552f50f8a682680921683f2e1c
commit c8a136dad6330f552f50f8a682680921683f2e1c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
* [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
@ 2022-03-16 18:04 Adhemerval Zanella
0 siblings, 0 replies; 22+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 18:04 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=efbcc58742191e45a1425856e05a229fae9ff924
commit efbcc58742191e45a1425856e05a229fae9ff924
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 15 08:41:43 2022 -0300
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 most of affected ABIs.
Diff:
---
include/string.h | 4 ++--
sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/string.h b/include/string.h
index 21f641a413..44c4049053 100644
--- a/include/string.h
+++ b/include/string.h
@@ -176,8 +176,8 @@ extern __typeof (strsep) strsep attribute_hidden;
&& !defined NO_MEMPCPY_STPCPY_REDIRECT
/* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
__mempcpy and __stpcpy if not inlined. */
-extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
-extern __typeof (stpcpy) stpcpy __asm__ ("__stpcpy");
+__asm__ ("mempcpy = __mempcpy");
+__asm__ ("stpcpy = __stpcpy");
#endif
extern void *__memcpy_chk (void *__restrict __dest,
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
index 6a216f3a5a..21a5fe65ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data
@@ -16,6 +16,9 @@ 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
# The TLS-enabled version of these functions is interposed from libc.so.
ld.so: _dl_signal_error
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-04-17 20:06 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 20:06 [glibc/azanella/clang] string: Use asm alias instead of symbol redirections for stpcpy and mempcpy Adhemerval Zanella
-- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:52 Adhemerval Zanella
2024-02-09 17:31 Adhemerval Zanella
2024-02-07 14:06 Adhemerval Zanella
2024-01-29 17:56 Adhemerval Zanella
2023-12-21 18:53 Adhemerval Zanella
2023-09-28 17:51 Adhemerval Zanella
2023-08-30 12:36 Adhemerval Zanella
2023-02-09 19:48 Adhemerval Zanella
2022-10-28 17:41 Adhemerval Zanella
2022-10-04 12:59 Adhemerval Zanella
2022-06-09 21:20 Adhemerval Zanella
2022-06-09 13:17 Adhemerval Zanella
2022-06-03 14:06 Adhemerval Zanella
2022-05-13 14:20 Adhemerval Zanella
2022-05-12 19:34 Adhemerval Zanella
2022-05-10 18:24 Adhemerval Zanella
2022-04-29 14:04 Adhemerval Zanella
2022-04-04 12:54 Adhemerval Zanella
2022-03-31 19:07 Adhemerval Zanella
2022-03-29 20:30 Adhemerval Zanella
2022-03-16 18:04 Adhemerval Zanella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).