[PATCH v3] RISC-V: Fix IFUNC resolver cannot access gp pointer

Yangyu Chen cyy@cyyself.name
Tue Dec 3 10:36:11 GMT 2024



On 12/2/24 18:01, Andreas Schwab wrote:
> On Nov 27 2024, Yangyu Chen wrote:
> 
>> +	asm (
>> +	  "mv gp, %0\n"
>> +	  :
>> +	  : "r" (ref->st_value + l->l_addr)
> 
> Doesn't that apply the relocation a second time if the object is already
> relocated?
> 

No. Because we will use st_value from elf directly. Relocation does not 
change this.



More information about the Libc-alpha mailing list