summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-04-25 17:13:23 +0000
committerSam Clegg <sbc@chromium.org>2017-04-25 17:13:23 +0000
commit03b1923725fc3c44920f197c084bd7bfdbddd9d1 (patch)
tree5cb00aec7ca0c6aac6a60e11f965fd12224f875e /llvm/lib
parent7fb391fea3af9d4f0f970e2bf4b16cead76dc3b0 (diff)
downloadbcm5719-llvm-03b1923725fc3c44920f197c084bd7bfdbddd9d1.tar.gz
bcm5719-llvm-03b1923725fc3c44920f197c084bd7bfdbddd9d1.zip
[WebAssembly] Fix relocation count in wasm binaries with call_indirect
Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32459 llvm-svn: 301331
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 159cc3b4def..6444046a30d 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud