aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-31 15:18:02 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:41 -0300
commit8c0ae678b6ca61f5590856de38ee9652ab886376 (patch)
treed9fb734fce356dda872a0fb0697ad4b5ef1e8edb
parentc7fbd2d41ba5acc69c5fe10af5dfce2821eb8b36 (diff)
downloadglibc-8c0ae678b6ca61f5590856de38ee9652ab886376.zip
glibc-8c0ae678b6ca61f5590856de38ee9652ab886376.tar.gz
glibc-8c0ae678b6ca61f5590856de38ee9652ab886376.tar.bz2
string: mempcy and stpcpy builtins internally
-rw-r--r--include/string.h8
1 files 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,