[PATCH 1/2] RISC-V: Don't overwrite got entry to zero for IRELATIVE/RELATIVE relocation
Fangrui Song
maskray@sourceware.org
Fri Sep 5 06:57:00 GMT 2025
On Thu, Sep 4, 2025 at 1:45 AM Nelson Chu <nelson@rivosinc.com> wrote:
>
> Committed after fixing the typo, thanks.
>
> Nelson
(I am not familiar with the code) I am confused by the description
"Even the final result is corrent since we encode the relocation into
r_addend, so glibc won't need to get the content of got entry when
resolving relative
relocation, it still werid that finish_dynamic_symbol cleans what we
fill in the relocate_section."
Note, for R_RISCV_RELATIVE relocated entries, the content should
ideally remain as zero to improve compression.
Only when --apply-dynamic-relocs is specified (only implemented for
aarch64 https://sourceware.org/bugzilla/show_bug.cgi?id=25891) should
the RELATIVE-relocated content be changed to the RELATIVE addend.
> On Mon, Aug 25, 2025 at 9:41 AM Nelson Chu <nelson@rivosinc.com> wrote:
>>
>> My fault... Should be "correct"... Thanks
>>
>> Nelson
>>
>> On Sun, Aug 24, 2025 at 12:14 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>>>
>>> On Aug 21 2025, Nelson Chu wrote:
>>>
>>> > Even the final result is corrent since we encode the relocation into r_addend,
>>>
>>> Current? Correct?
>>>
>>> --
>>> Andreas Schwab, schwab@linux-m68k.org
>>> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
>>> "And now for something completely different."
More information about the Binutils
mailing list