[PATCH] D102985: [lld][ELF][SPARC] Fix GOT-relative relocations
LemonBoy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 20 11:27:55 PDT 2021
LemonBoy added a comment.
In D102985#2829310 <https://reviews.llvm.org/D102985#2829310>, @jrtc27 wrote:
> In D102985#2829308 <https://reviews.llvm.org/D102985#2829308>, @LemonBoy wrote:
>
>> In D102985#2829305 <https://reviews.llvm.org/D102985#2829305>, @jrtc27 wrote:
>>
>>> Ok, so you need R_RELAX_GOT_OFF to match R_RELAX_GOT_PC?
>>
>> A relocation that behaves as `R_GOT_OFF` or, when it's possible to relax it, as a `R_GOTREL`.
>
> Yes, the R_GOT_OFF version of what R_RELAX_GOT_PC is to R_GOT_PC (e.g. `movq foo at GOTPCREL(%rip), %rax` -> `leaq foo(%rip), %rax`, where the latter means `leaq foo at PCREL(%rip)` but that's implied by the `%rip` base).
Oh. Yes, that's the idea. At the moment I'm treating all of them as `R_GOT_OFF` but, as explained above, that's not working for every binary.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102985/new/
https://reviews.llvm.org/D102985
More information about the llvm-commits
mailing list