summaryrefslogtreecommitdiff
path: root/src/wasm-linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-linker.cpp')
-rw-r--r--src/wasm-linker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp
index d8bae7558..1f06c6ec2 100644
--- a/src/wasm-linker.cpp
+++ b/src/wasm-linker.cpp
@@ -83,7 +83,7 @@ void Linker::layout() {
// Update the segments with their addresses now that they have been allocated.
for (const auto& seg : out.segments) {
Address address = staticAddresses[seg.first];
- out.wasm.memory.segments[seg.second].offset = address;
+ out.wasm.memory.segments[seg.second].offset = out.wasm.allocator.alloc<Const>()->set(Literal(uint32_t(address)));
segmentsByAddress[address] = seg.second;
}