[PATCH] D92215: [WebAssembly] MC layer writes table symbols to object files
Andy Wingo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 04:16:12 PST 2021
wingo added inline comments.
================
Comment at: llvm/lib/MC/WasmObjectWriter.cpp:523
+ // The linker won't be able to make the connection between TABLE_INDEX
+ // relocs and the specific table symbol, so explicitly prevent GC from
+ // eliding the symbol. In the future we may want to define a new kind of
----------------
sbc100 wrote:
> I thought the plan was to include this table symbol in a new TABLE_NUMBER reloc to go along with the TABLE_INDEX reloc? Then each call_indirect could have up to two different relocations.
The problem isn't the `call_indirect`, which has a `TABLE_NUMBER` reloc, and doesn't reach this case. This code is for function pointers, which don't record which table they are against. It ensures that there is an `__indirect_function_table` if there are function pointers, even if there is never any `call_indirect`. Does that make sense?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92215/new/
https://reviews.llvm.org/D92215
More information about the llvm-commits
mailing list