[lld] [lld][LoongArch] Relax R_LARCH_PCALA_HI20 and R_LARCH_PCALA_LO12 (PR #112696)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 10:00:06 PST 2024
================
@@ -737,6 +737,17 @@ uint64_t InputSectionBase::getRelocTargetVA(Ctx &ctx, const Relocation &r,
int64_t a = r.addend;
switch (r.expr) {
case R_ABS:
+ // pcalau12i,addi.[wd] => pcaddi
+ // With relaxation applied, the relocation type of the third
+ // reloc entry which corresponds to the addi.[wd] insn is converted
+ // from R_LARCH_PCALA_LO12 to R_LARCH_PCREL20_S2.
+ if (r.type == R_LARCH_PCREL20_S2) {
----------------
ywgrit wrote:
How about now? @MaskRay @jrtc27
https://github.com/llvm/llvm-project/pull/112696
More information about the llvm-commits
mailing list