[lld] [RISCV][LLD] Zcmt RISC-V extension in lld (PR #183450)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 3 07:03:50 PDT 2026
================
@@ -890,16 +937,44 @@ void elf::initSymbolAnchors(Ctx &ctx) {
}
}
+static bool relaxTableJump(Ctx &ctx, const InputSection &sec, size_t i,
+ uint64_t loc, Relocation &r, uint32_t &remove) {
+ if (!ctx.in.riscvTableJump)
+ return false;
----------------
LukeZhuang wrote:
Sorry I don't see where the caller is already guarded by `ctx.in.riscvTableJump`. For example, if we do not have `--relax-tbljal` option, every other call may enter `relaxTableJump` through `relaxCall`.
In fact I think this behavior is already covered by many other riscv tests with calls. I tried to change that to `assert`, a lot of tests failed.
https://github.com/llvm/llvm-project/pull/183450
More information about the llvm-commits
mailing list