diff options
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index b2d94dc..fb41c37 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -519,13 +519,6 @@ void WasmObjectWriter::recordRelocation(MCAssembler &Asm, Sym->setUndefined(); } Sym->setUsedInReloc(); - // Any time we have a TABLE_INDEX relocation against a function symbol, we - // need to ensure that table itself is part of the final output too. In the - // future we may want to define a new kind of reloc against both the - // function and the table, so that the linker can see that the function - // symbol keeps the table alive, but for now manually mark the table as - // live. - Sym->setNoStrip(); Asm.registerSymbol(*Sym); } @@ -1677,6 +1670,10 @@ uint64_t WasmObjectWriter::writeOneObject(MCAssembler &Asm, WS.setIndex(InvalidIndex); continue; } + if (WS.isTable() && WS.getName() == "__indirect_function_table") { + // For the moment, don't emit table symbols -- wasm-ld can't handle them. + continue; + } LLVM_DEBUG(dbgs() << "adding to symtab: " << WS << "\n"); uint32_t Flags = 0; |