From: Thomas Weißschuh Date: Sat, 18 Apr 2026 10:31:54 +0000 (+0200) Subject: tools/nolibc: avoid call to wcslen() in _start_c() inserted by clang X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c6826ee7d04f489ad6fcf46ae6dd595fe9c6295;p=thirdparty%2Fkernel%2Flinux.git tools/nolibc: avoid call to wcslen() in _start_c() inserted by clang Clang may convert the loop to find _auxv into a call to wcslen() which is missing on nolibc. -fsanitize needs to be disabled for this to happen. Use the same pattern as in the nolibc strlen() implementation to avoid the function call generation. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://patch.msgid.link/20260418-nolibc-wcslen-v1-1-671271b8ea63@weissschuh.net --- diff --git a/tools/include/nolibc/crt.h b/tools/include/nolibc/crt.h index d8ce91fd2e3b1..f38590a05adf0 100644 --- a/tools/include/nolibc/crt.h +++ b/tools/include/nolibc/crt.h @@ -89,7 +89,7 @@ void _start_c(long *sp) /* find _auxv */ for (auxv = (void *)envp; *auxv++;) - ; + __asm__(""); _auxv = auxv; #ifndef NOLIBC_IGNORE_ERRNO