From: Adhemerval Zanella Date: Wed, 17 Dec 2025 17:51:53 +0000 (-0300) Subject: stdlib: Avoid strlen plt with clang X-Git-Tag: glibc-2.43~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f55bb7e5403b7977ace2f6f0698fd5732720dc;p=thirdparty%2Fglibc.git stdlib: Avoid strlen plt with clang The clang-21 LoopIdiomRecognizePass replaces some loops in __xpg_basename with a strlen call. Reviewed-by: H.J. Lu --- diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h index 58398d33a5..0d728cce91 100644 --- a/sysdeps/generic/symbol-hacks.h +++ b/sysdeps/generic/symbol-hacks.h @@ -20,6 +20,7 @@ asm ("__strcpy_chk = __GI___strcpy_chk"); asm ("strcpy = __GI_strcpy"); asm ("strncpy = __GI_strncpy"); asm ("strcat = __GI_strcat"); +asm ("strlen = __GI_strlen"); /* Some targets do not use __stack_chk_fail_local. In libc.so, redirect __stack_chk_fail to a hidden reference