[PATCH] Allow memset local PLT reference for RISC-V.

Florian Weimer fweimer@redhat.com
Mon Jun 29 17:13:14 GMT 2020

* Andreas Schwab:

> On Jun 29 2020, Alistair Francis wrote:
>> There is also a PLT memset in libc_pic.a
>>  1bc:   009aa023                sw      s1,0(s5)
>>           memset (result->__data, '\0',
>>  1c0:   865e                    mv      a2,s7
>>  1c2:   4581                    li      a1,0
>>  1c4:   008a8513                addi    a0,s5,8
>>  1c8:   00000097                auipc   ra,0x0
>>                         1c8: R_RISCV_CALL_PLT   __GI_memset
>>                         1c8: R_RISCV_RELAX      *ABS*
>>  1cc:   000080e7                jalr    ra # 1c8 <.LVL39+0x14>
> That will be relaxed by the linker.

But so far, the guidance has been *not* to rely on linker relaxation.

And as the __twalk_r shows, RISC-V actually has real local calls which
don't need linker relaxation.  So I still think something is very
unusual with this target.


More information about the Libc-alpha mailing list