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

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon May 11 20:10:30 GMT 2026



On 11/05/26 16:49, Peter Bergner wrote:
> On 5/11/26 9:24 AM, Adhemerval Zanella Netto wrote:
>> On 11/05/26 03:25, Peter Bergner wrote:
>>> On 5/10/26 7:09 AM, H.J. Lu wrote:
>>>> Please add
>>>>
>>>> asm ("strlen = __strlen_generic");
>>>>
>>>> to sysdeps/riscv/multiarch/dl-symbol-redir-ifunc.h.
>>>
>>> I'll need to add static builds to my testing matrix.  Thanks to you
>>> and Andreas for pointing this out!  Are there any other known symbols
>>> that need handling like this as well (memcpy and memset already were
>>> handled)?
> 
> I see Andreas already pushed a fix for this.  Thanks Andreas!
> 
> 
>> We already have tests that checks for this, after this patch I noticed:
>>
>> FAIL: elf/tst-env-setuid-static
>> FAIL: elf/tst-tunables
>> FAIL: elf/tst-tunables-enable_secure
> 
> So I'm not sure how I missed this during my testing.  Maybe my compiler
> defaulted to vector being enabled, so skipped this altogether?  I'll keep
> a better eye out for things like this.  It's good to know we do have tests
> that test for this.

I think these issues might depend of the gcc version and how cleaver it
optimizes loops to str/mem calls.  If you compiler with older gcc version
you might not trigger this issue.



More information about the Libc-alpha mailing list