[lld] [lld][LoongArch] Relax R_LARCH_PCALA_HI20 and R_LARCH_PCALA_LO12 (PR #112696)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 21:12:19 PDT 2024


================
@@ -782,6 +886,10 @@ static bool relax(Ctx &ctx, InputSection &sec) {
       }
       break;
     }
+    case R_LARCH_PCALA_HI20:
+      if (isPair(relocs, i) && relocs[i + 2].type == R_LARCH_PCALA_LO12)
----------------
ywgrit wrote:

> i+2 causes overflow?

isPair will check this.

https://github.com/llvm/llvm-project/pull/112696


More information about the llvm-commits mailing list