]> git.feebdaed.xyz Git - 0xmirror/glibc.git/commitdiff
stdlib: Avoid strlen plt with clang
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 17 Dec 2025 17:51:53 +0000 (14:51 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 19 Dec 2025 16:23:06 +0000 (13:23 -0300)
The clang-21 LoopIdiomRecognizePass replaces some loops in
__xpg_basename with a strlen call.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/generic/symbol-hacks.h

index 58398d33a5f81001c8cb6b7180b33d3fdb07cad9..0d728cce9154781be7848eee706d22d309690b12 100644 (file)
@@ -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