diff --git a/lld/ELF/Arch/RISCV.cpp b/lld/ELF/Arch/RISCV.cpp index 4d8989a21b501..7e864574ccea9 100644 --- a/lld/ELF/Arch/RISCV.cpp +++ b/lld/ELF/Arch/RISCV.cpp @@ -902,6 +902,9 @@ bool RISCV::relaxOnce(int pass) const { if (ctx.arg.relocatable) return false; + if (pass == 29) + return false; + if (pass == 0) initSymbolAnchors(ctx);