[lld] [RISCV][LLD] Zcmt RISC-V extension in lld (PR #183450)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 00:26:19 PDT 2026


LukeZhuang wrote:

> > Why is `__jvt_base$` not STV_HIDDEN?
> 
> That's a good question, I think we just haven't thought about the visibility carefully yet. The only usage of this symbol is the startup code. The CRT loads this symbol into the CSR called `jvt`, like:
> 
> ```
> auipc a0, %pcrel_hi(__jvt_base$)
> addi a0, a0, %pcrel_lo(1b)
> csrw jvt, a0
> ```
> 
> It should be nothing to do with dynamic loader or dynamic libraries. (And the main application scenario for Zcmt is embedded systems, usually does not need to care much about dynamic things). So yes I agree that it should be non-preemptible.

@MaskRay updated

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


More information about the llvm-commits mailing list