[PATCH] D90948: [WebAssembly] call_indirect issues table number relocs

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 14:30:31 PST 2021


tlively added a comment.

Actually, one question.

> We keep the hack that table symbols only go to the symbol table if they are marked as used in relocations.

It seems like it would be simpler to not create a symbol table in the first place in cases where it will not be emitted into the binary anyway. In `LowerCallResults`, can we do

  MIB.addSym(WebAssembly::getOrCreateFunctionTableSymbol(
      MF.getContext(), "__indirect_function_table"));

only if `MF.getSubtarget<WebAssemblySubtarget>().hasReferenceTypes()` and otherwise continue doing `MIB.addImm(0)`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90948/new/

https://reviews.llvm.org/D90948



More information about the llvm-commits mailing list