diff options
author | Andy Wingo <wingo@igalia.com> | 2021-01-05 11:05:18 +0100 |
---|---|---|
committer | Andy Wingo <wingo@igalia.com> | 2021-01-19 09:32:45 +0100 |
commit | 418df4a6ab35d343cc0f2608c90a73dd9b8d0ab1 (patch) | |
tree | f3d6011995253f49392ff11db261b3e65910fd4b /llvm/lib/MC/WasmObjectWriter.cpp | |
parent | b86e7ae66cb988dda33445c29fa64f93e7ca9c3c (diff) | |
download | llvm-418df4a6ab35d343cc0f2608c90a73dd9b8d0ab1.zip llvm-418df4a6ab35d343cc0f2608c90a73dd9b8d0ab1.tar.gz llvm-418df4a6ab35d343cc0f2608c90a73dd9b8d0ab1.tar.bz2 |
[WebAssembly] call_indirect issues table number relocs
This patch changes to make call_indirect explicitly refer to the
corresponding function table, residualizing TABLE_NUMBER relocs against
it.
With this change, wasm-ld now sees all references to tables, and can
link multiple tables.
Differential Revision: https://reviews.llvm.org/D90948
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index b2d94dc..70a5e503 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -405,13 +405,6 @@ void WasmObjectWriter::writeHeader(const MCAssembler &Asm) { void WasmObjectWriter::executePostLayoutBinding(MCAssembler &Asm, const MCAsmLayout &Layout) { - // As a stopgap measure until call_indirect instructions start explicitly - // referencing the indirect function table via TABLE_NUMBER relocs, ensure - // that the indirect function table import makes it to the output if anything - // in the compilation unit has caused it to be present. - if (auto *Sym = Asm.getContext().lookupSymbol("__indirect_function_table")) - Asm.registerSymbol(*Sym); - // Build a map of sections to the function that defines them, for use // in recordRelocation. for (const MCSymbol &S : Asm.symbols()) { |