[PATCH] D92321: [WebAssembly] Allow element sections for nonzero table numbers

Andy Wingo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 06:29:48 PST 2020


wingo created this revision.
wingo added a reviewer: sbc100.
Herald added subscribers: llvm-commits, ecnelises, sunfish, hiraditya, jgravelle-google, dschuff.
Herald added a project: LLVM.
wingo requested review of this revision.
Herald added a subscriber: aheejin.

WebAssembly element sections specify the initial values of the slots of
a function table.  Before, there was only one table.  With reference
types, there are now not only multiple tables, but also multiple kinds
of element sections (active, passive, declarative, with or without
explicit table numbers, and so on).

This patch changes the object file support for WebAssembly to produce
and consume valid element sections against non-zero table numbers.

Finally, we also add a test for linking multiple tables, showing that
nonzero table numbers for the indirect function table, user-declared
imported tables, and local user table definitions work.

Depends on D92320 <https://reviews.llvm.org/D92320>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92321

Files:
  lld/test/wasm/multi-table.s
  lld/wasm/SyntheticSections.cpp
  llvm/include/llvm/BinaryFormat/Wasm.h
  llvm/include/llvm/Object/Wasm.h
  llvm/include/llvm/ObjectYAML/WasmYAML.h
  llvm/lib/MC/WasmObjectWriter.cpp
  llvm/lib/Object/WasmObjectFile.cpp
  llvm/lib/ObjectYAML/WasmEmitter.cpp
  llvm/lib/ObjectYAML/WasmYAML.cpp
  llvm/tools/obj2yaml/wasm2yaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92321.308358.patch
Type: text/x-patch
Size: 19527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201130/5a2bd03f/attachment-0001.bin>


More information about the llvm-commits mailing list