[lld] [lld][WebAssembly] Fix TLS-relative relocations when linking without shared memory (PR #116136)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 10:19:05 PST 2024


================
@@ -514,7 +514,10 @@ void GlobalSection::writeBody() {
     } else {
----------------
sbc100 wrote:

No since in that case we do the addition with `__tls_base` as part of the const expression.  i.e. its don't for us at instantiation time.

So I guess there are 3 ways this addition can happen:

1. At instantiation time via extended const
2. As part of __wasm_apply_global_tls_relocs at runtime
3. At static link time via `getVA(absolute=true)`

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


More information about the llvm-commits mailing list