diff options
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index 6bcec5f..0cf6e31 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -478,6 +478,7 @@ void WasmObjectWriter::recordRelocation(MCAssembler &Asm, // Currently only supported for for metadata sections. // See: test/MC/WebAssembly/blockaddress.ll if (Type == wasm::R_WASM_FUNCTION_OFFSET_I32 || + Type == wasm::R_WASM_FUNCTION_OFFSET_I64 || Type == wasm::R_WASM_SECTION_OFFSET_I32) { if (!FixupSection.getKind().isMetadata()) report_fatal_error("relocations for function or section offsets are " @@ -564,6 +565,7 @@ WasmObjectWriter::getProvisionalValue(const WasmRelocationEntry &RelEntry, assert(WasmIndices.count(RelEntry.Symbol) > 0 && "symbol not found in wasm index space"); return WasmIndices[RelEntry.Symbol]; case wasm::R_WASM_FUNCTION_OFFSET_I32: + case wasm::R_WASM_FUNCTION_OFFSET_I64: case wasm::R_WASM_SECTION_OFFSET_I32: { const auto &Section = static_cast<const MCSectionWasm &>(RelEntry.Symbol->getSection()); @@ -680,6 +682,7 @@ void WasmObjectWriter::applyRelocations( break; case wasm::R_WASM_TABLE_INDEX_I64: case wasm::R_WASM_MEMORY_ADDR_I64: + case wasm::R_WASM_FUNCTION_OFFSET_I64: patchI64(Stream, Value, Offset); break; case wasm::R_WASM_TABLE_INDEX_SLEB: |