]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
include/string.h: Also redirect calls if not inlined in libpthread
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 7 Jan 2025 01:36:55 +0000 (02:36 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 7 Jan 2025 19:53:18 +0000 (20:53 +0100)
htl's pt-alloc.c calls __mempcpy, which is #defined to
__builtin_mempcpy, but which does not happen to get inlined (the size is
dynamic), and then gcc emits a reference to mempcpy, thus violating
symbol exposition standard. We thus also have to redirect such
references to __mempcpy too.

include/string.h

index 1f6aef9f93bd97a2503e6f7b72b650211c0ca74f..b9c41b0eea8c86e8ab4ca35f9ccb732d36575e59 100644 (file)
@@ -175,7 +175,7 @@ extern __typeof (strnlen) strnlen attribute_hidden;
 extern __typeof (strsep) strsep attribute_hidden;
 #endif
 
-#if IS_IN (libc) && !defined SHARED \
+#if (IS_IN (libc) || IS_IN (libpthread)) && !defined SHARED \
   && !defined NO_MEMPCPY_STPCPY_REDIRECT
 /* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call
    __mempcpy and __stpcpy if not inlined.  */