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

Jinyang He via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 23:29:32 PDT 2024


================
@@ -744,6 +784,70 @@ void LoongArch::relocate(uint8_t *loc, const Relocation &rel,
   }
 }
 
+static bool relaxable(ArrayRef<Relocation> relocs, size_t i) {
+  return i + 1 != relocs.size() && relocs[i + 1].type == R_LARCH_RELAX;
----------------
MQ-mengqing wrote:

Should be equivalent with "<" in many scenario. The "<=" is something wrong, please ignore.

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


More information about the llvm-commits mailing list