]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
string: Use asm alias instead of symbol redirections for stpcpy and mempcpy
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 15 Mar 2022 11:41:43 +0000 (08:41 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 Oct 2025 16:36:29 +0000 (13:36 -0300)
Commit 939da411433 added symbols redirections to handle ISO C
namespace, however clang do not support to redeclare the function
prototype.

This patch replaces the symbol redirections by direct asm aliases, as
done to handle libcall generation done by compiler on some loop
optimizations.

Checked on all affected ABIs.

include/string.h

index c26ca0927ca7b5dcda935f6e5bce5a495ed78e96..2ea212a401b1c3e1cc44346d5d9417cc472972e4 100644 (file)
@@ -188,8 +188,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,