Re: [PATCH] tools/nolibc: avoid call to wcslen() in _start_c() inserted by clang
From: Willy Tarreau
Date: Sun Apr 19 2026 - 11:32:51 EST
On Sat, Apr 18, 2026 at 12:31:54PM +0200, Thomas Weißschuh wrote:
> 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 <linux@xxxxxxxxxxxxxx>
Compilers are always full of surprises!
Acked-by: Willy Tarreau <w@xxxxxx>
Willy