[lld][WebAssembly] -Bsymbolic creates indirect function table if needed
authorAndy Wingo <wingo@igalia.com>
Wed, 3 Mar 2021 10:13:25 +0000 (11:13 +0100)
committerAndy Wingo <wingo@igalia.com>
Thu, 4 Mar 2021 08:28:21 +0000 (09:28 +0100)
commite638d8b2bc27d620ea26fcc730f7cba29ab82349
tree4dd638bdc1e1ad35a6869f249d560ed39ff14030
parentd9e93e8e57fe63babc319cbaf84f1afeccb83696
[lld][WebAssembly] -Bsymbolic creates indirect function table if needed

It can be that while processing relocations, we realize that in the end
we need an indirect function table.  Ensure that one is present, in that
case, to avoid writing invalid object files.

Fixes https://bugs.llvm.org/show_bug.cgi?id=49397.

Differential Revision: https://reviews.llvm.org/D97843
lld/test/wasm/bsymbolic.s
lld/wasm/Driver.cpp
lld/wasm/SymbolTable.cpp
lld/wasm/SymbolTable.h
lld/wasm/SyntheticSections.cpp
lld/wasm/Writer.cpp