diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-31 15:18:02 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-09 16:36:05 -0300 |
commit | f182c5acdd6eb6e989fa251c1cf5055309065061 (patch) | |
tree | 6f4a4ae4a3b6c3fb45e7c56d10113d67728f1291 | |
parent | b4e3ef166b0db77ca9818f579156ebee93434c35 (diff) | |
download | glibc-f182c5acdd6eb6e989fa251c1cf5055309065061.tar.gz |
string: mempcy and stpcpy builtins internally
-rw-r--r-- | include/string.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/string.h b/include/string.h index d6e352e214..d7a133f4e7 100644 --- a/include/string.h +++ b/include/string.h @@ -174,13 +174,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, |