aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2021-01-15 15:50:22 -0800
committerDerek Schuff <dschuff@chromium.org>2021-01-15 15:50:22 -0800
commite65b9b04cdeff17fbcdae8d2bb268da832e4a267 (patch)
tree0f57c58c3838028e1baef96782d0feaa82ee4573 /llvm/lib/MC/WasmObjectWriter.cpp
parenta1500105ee6074f992f376c916dcfa3a54acb717 (diff)
downloadllvm-e65b9b04cdeff17fbcdae8d2bb268da832e4a267.zip
llvm-e65b9b04cdeff17fbcdae8d2bb268da832e4a267.tar.gz
llvm-e65b9b04cdeff17fbcdae8d2bb268da832e4a267.tar.bz2
Revert "[WebAssembly] MC layer writes table symbols to object files"
This reverts commit e9f1ed2306b1b3aedcb1acef2b50e252a77a04b9. Reverting because it depends on 38dfce706f
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp11
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;