[lld] [RISCV] Disable gp relaxation if part of object unreachable (PR #72655)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 09:20:31 PST 2023


================
@@ -651,6 +651,20 @@ static void relaxHi20Lo12(const InputSection &sec, size_t i, uint64_t loc,
   if (!isInt<12>(r.sym->getVA(r.addend) - gp->getVA()))
     return;
 
+  // The symbol may be accessed in multiple pieces. We need to make sure that
----------------
MaskRay wrote:

The symbol may be accessed in multiple pieces with different addends. 

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


More information about the llvm-commits mailing list