[PATCH] D131376: [wasm-ld] Allow importing/exporting the output module's memory with arbitrary names

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 09:24:17 PDT 2022


sbc100 added a comment.

I think we maybe want to think this over a little more.   Clearly there is a need to be able to control the import/export of memory 0 but I'd like to make sure we do it in a forward thinking way.

Some considerations.

1. Are there going to be other cabi-relatated things, that warrent just putting this behind a single "cabi" flag rather than requiring N different flags for this?
2. When we went to multi-table we made table 0 into a first class symbol.. then it could be reasonable like any other symbol.  Perhaps we should do this for memory 0 too?   See https://reviews.llvm.org/D96001
3. It would be to be able to control the default "env" name from which all default import come.  This could remove the needs for the comma separated pair parsing.

If we made `__linear_memory` into first class symbol like `__indirection_function_table` then perhaps we could allow the toolchain to control its import/export name directly using the import_name/export_name attributes in assembly and avoid the need for any new command line flag and re-using the existing machinery?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131376



More information about the llvm-commits mailing list