[PATCH v2 1/4] riscv: Add multiarch scaffolding for str*/mem* routines

Jeff Law jeffreyalaw@gmail.com
Fri Oct 17 15:12:13 GMT 2025



On 10/13/25 9:17 AM, Yao Zihong wrote:
>> So I think you need a dl-symbol-redir-ifunc file to handle static
>> initialization.   Otherwise you can get an infinite loop during symbol
>> resolution.  The testsuite will trip this issue which raises the
>> question, how was this tested? I would expect to see a few tests hang.
> 
> At least memset triggers a hang in elf/tst-tls1-static-non-pie.
> My earlier testing focused on the string routines and didn’t include the elf
> subsuite, so I missed this case. My bad.
It happens.  I'm very much looking forward to the day when we have 
better performing hardware and developers aren't so heavily incentivized 
to run subsets of the testsuite.

So far the only redirects I've needed were for memset and memcpy, which 
was a bit of a surprise.  I kind of expected to see strlen and strcpy 
trip over the same problem, but they haven't in my testing.



> 
>> As I mentioned in the V1 patch, this probably should be using the same
>> mechansisms as ifunc-impl-list rather than querying out of hwcaps.  That
>> was also the consensus at the RISC-V BOF last week -- don't use hwcaps
>> use the probing interface.
> 
> Good to know, thanks for the clarification.
> The next version will switch to using hwprobe as suggested.
Thanks.

jeff


More information about the Libc-alpha mailing list