diff options
Diffstat (limited to 'lld/wasm/Writer.cpp')
-rw-r--r-- | lld/wasm/Writer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp index 43a8c8de637..7c91eacadab 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp @@ -224,6 +224,9 @@ void Writer::layoutMemory() { log("mem: global base = " + Twine(Config->GlobalBase)); } + if (WasmSym::GlobalBase) + WasmSym::GlobalBase->setVirtualAddress(Config->GlobalBase); + uint32_t DataStart = MemoryPtr; // Arbitrarily set __dso_handle handle to point to the start of the data |