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

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 13:46:06 PST 2024


================
@@ -514,7 +514,10 @@ void GlobalSection::writeBody() {
     } else {
       WasmInitExpr initExpr;
       if (auto *d = dyn_cast<DefinedData>(sym))
-        initExpr = intConst(d->getVA(), is64);
+        // In the sharedMemory case `__wasm_apply_global_tls_relocs` is used
+        // to set the final value of this globel, but in the non-shared case
----------------
dschuff wrote:

```suggestion
        // to set the final value of this global, but in the non-shared case
```

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


More information about the llvm-commits mailing list