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

Andreas Schwab schwab@suse.de
Tue Dec 3 10:47:01 GMT 2024


On Dez 03 2024, Yangyu Chen wrote:

> 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.

Then how did it work before?

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


More information about the Libc-alpha mailing list