[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
Sat Aug 20 07:55:25 PDT 2022


sbc100 added a comment.

In D131376#3736824 <https://reviews.llvm.org/D131376#3736824>, @Liamolucko wrote:

> In D131376#3723463 <https://reviews.llvm.org/D131376#3723463>, @sunfish wrote:
>
>> In curious why memorytExports is a set of strings rather than an optional string. Is there a need for exporting the memory with multiple names?
>
> Not really; I just thought that I would allow for arbitrary combinations while I was at it.
>
> In D131376#3723463 <https://reviews.llvm.org/D131376#3723463>, @sunfish wrote:
>
>> I think the canonical ABI will need support for multiple `cabi_start` functions, so that we don't have to merge them. I filled https://github.com/WebAssembly/component-model/issues/88 to track this.
>
> Now that it seems like that's not going to be supported natively in the Canonical ABI, should the linker merge together `cabi_start` functions? They shouldn't be able to depend on one another, but it seems like it could be useful to define `cabi_start` functions across different files that work with independent values.

I think its probably simpler to only allow a single start `cabi_start` definition.. just like any other symbol.  It sounds like it should be a linker error to have more than one of them.


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