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-02-09 10:29:18 -0300
commitca39dade094f52672ae81f585c8d5398fc943323 (patch)
tree9bbe9add7b75c872558aa668563be7348b47c40f
parentcc520e75eca93e6ae33ef75c046f3c0992439f5a (diff)
downloadglibc-ca39dade094f52672ae81f585c8d5398fc943323.tar
glibc-ca39dade094f52672ae81f585c8d5398fc943323.tar.gz
glibc-ca39dade094f52672ae81f585c8d5398fc943323.tar.bz2
glibc-ca39dade094f52672ae81f585c8d5398fc943323.zip
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 082865caad..2a4788e8c2 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,