[PATCH v5 13/18] riscv: Add RVV strlen for multiarch and non-multiarch

H.J. Lu hjl.tools@gmail.com
Sun May 10 12:09:17 GMT 2026


On Sun, May 10, 2026 at 5:49 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> This breaks statically linked programs when any tunable env var is set,
> because __tunables_init calls strlen, which jumps to the uninitialized
> PLT.

Please add

asm ("strlen = __strlen_generic");

to sysdeps/riscv/multiarch/dl-symbol-redir-ifunc.h.

> $ echo 'int main() { return 0; }' > main.c
> $ gcc -static main.c -o main
> $ MALLOC_CHECK_=3 ./main
>
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."



-- 
H.J.


More information about the Libc-alpha mailing list