summaryrefslogtreecommitdiff
path: root/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/WasmObjectWriter.cpp')
-rw-r--r--lib/MC/WasmObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/WasmObjectWriter.cpp b/lib/MC/WasmObjectWriter.cpp
index 159cc3b4def2a..6444046a30d79 100644
--- a/lib/MC/WasmObjectWriter.cpp
+++ b/lib/MC/WasmObjectWriter.cpp
@@ -1105,7 +1105,7 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm,
encodeULEB128(wasm::WASM_SEC_CODE, getStream());
- encodeULEB128(CodeRelocations.size(), getStream());
+ encodeULEB128(CodeRelocations.size() + TypeIndexFixups.size(), getStream());
WriteRelocations(CodeRelocations, getStream(), SymbolIndices);
WriteTypeRelocations(TypeIndexFixups, TypeIndexFixupTypes, getStream());