From 8c0ae678b6ca61f5590856de38ee9652ab886376 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 31 Mar 2022 15:18:02 -0300 Subject: string: mempcy and stpcpy builtins internally --- include/string.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/string.h b/include/string.h index 082865c..2a4788e 100644 --- a/include/string.h +++ b/include/string.h @@ -175,13 +175,17 @@ extern __typeof (strnlen) strnlen attribute_hidden; extern __typeof (strsep) strsep attribute_hidden; #endif -#if (!IS_IN (libc) || !defined SHARED) \ - && !defined NO_MEMPCPY_STPCPY_REDIRECT +#if IS_IN (libc) && !defined NO_MEMPCPY_STPCPY_REDIRECT /* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call __mempcpy and __stpcpy if not inlined. */ +# ifdef SHARED +__asm__ ("mempcpy = __GI_mempcpy"); +__asm__ ("stpcpy = __GI_stpcpy"); +# else __asm__ ("mempcpy = __mempcpy"); __asm__ ("stpcpy = __stpcpy"); #endif +#endif extern void *__memcpy_chk (void *__restrict __dest, const void *__restrict __src, size_t __len, -- cgit v1.1