[lld] [LLD][AArch64] Handle R_AARCH64_TLS_DTPREL64 in non-alloc sections (PR #183962)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 06:50:31 PDT 2026


smithp35 wrote:

> Thanks @smithp35 for clearing the things. I feel could keep preemptible check(also Aarch64) and let debugger handle that case with dynamic symbol table. GDB is doing it so LLDB can also do it in future.
> 
> Or maybe as in [#146572 (comment)](https://github.com/llvm/llvm-project/pull/146572#discussion_r2908799310) it is being point out that it is not a very common user case to override TLS variables so emit in all cases and let debuggers handle it in whichever way it can/want.
> 
> WDTY? Which approach to choose.
> 
> (And sorry it created a noise when this discussion should be on LLVM side patch.)

Given that there are cases when the compiler can't know at compile time if the linker will put a symbol in the dynamic symbol table (exporting symbols from executables only when shared-libraries reference them), I think it would be best to keep it simple and always use the `DW_OP_form_tls_address`  .

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


More information about the llvm-commits mailing list