[PATCH] D96770: [lld][WebAssembly] Fix resolveIndirectFunctionTable for relocatable output
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 08:09:45 PST 2021
sbc100 added a comment.
Does this mean the `--relocatable` always produces output with an entry in the symbol table for `__indirect_function_table`? i.e. does the linker always produce non-MVP object files?
================
Comment at: lld/wasm/Driver.cpp:832
- if (config->importTable) {
+ if (config->importTable || (config->relocatable && existing)) {
if (existing)
----------------
Would it be better to ensure that `importTable` is always set when `config->relocatable`. Anything else would be nonsensical I think.
We should also error out if `-r` is used with any of the table control options (`--export-table`, `--import-table`, `--growable-table` all make no sense with `--relocatable`.
Also why the extra `existing` here? In `--relocatable` mode we never want to end up calling createDefinedIndirectFunctionTable so we need to make sure that this branch of the `if` I think, no?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96770/new/
https://reviews.llvm.org/D96770
More information about the llvm-commits
mailing list