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

Andy Wingo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 01:37:36 PST 2021


wingo added a comment.

OK one nit I just realized.  It would be nice to allow linking MVP and reftypes inputs.  However this will not be possible if the reftypes input imports a table.  This is because table numbers are assigned first to imports, then to module-local definitions.  The MVP input would have `call_indirect` against table 0, expecting it to be the indirect function table, but instead it is an import from the reftypes module.  I guess the linker just emits an error in that case.

It would be possible to have a command-line tool to migrate an MVP object file to a reftypes object file, parsing function code and reconstructing relocs.  I guess the linker itself isn't the right place for that though.


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