[lld] [WebAssembly] Generate a call to __wasm_apply_global_tls_relocs in __wasm_init_memory (PR #149832)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 00:40:46 PDT 2025
================
@@ -1366,6 +1366,15 @@ void Writer::createInitMemoryFunction() {
writeUleb128(os, s->index, "segment index immediate");
writeU8(os, 0, "memory index immediate");
}
+
+ // After initializing the TLS segment, we also need to apply TLS
+ // relocations in the same way __wasm_init_tls does.
+ if (ctx.arg.sharedMemory && s->isTLS() &&
----------------
Arshia001 wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/149832
More information about the llvm-commits
mailing list