[lld] [lld][LoongArch] Support the R_LARCH_CALL36 relocation type (PR #73346)
WÁNG Xuěruì via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 04:52:24 PST 2023
================
@@ -590,6 +591,24 @@ void LoongArch::relocate(uint8_t *loc, const Relocation &rel,
write32le(loc, setD10k16(read32le(loc), val >> 2));
return;
+ case R_LARCH_CALL36: {
+ // This relocation is designed for the adjancent pcaddu18i+jirl pair that
+ // are patched in one time. Because of sign extension of these insns'
+ // immediate fields, the relocation range is [-128G - 0x20000, +128G -
+ // 0x20000) (of course must be 4-bytes aligned).
----------------
xen0n wrote:
```suggestion
// 0x20000) (of course must be 4-byte aligned).
```
https://github.com/llvm/llvm-project/pull/73346
More information about the llvm-commits
mailing list