Description
recent versions of llvm wasm-ld inserts ctor/dtor for every exports for a command. [1]
it broke a few use cases including wamr's malloc/free exports. [2]
while preview2 slide [3] p7 says "No other exports", my understanding is that component-model will use some exports like canonical_abi_realloc/free, which are essentially the same as what the above mentioned wamr malloc/free exports do.
anyway, whatever we will do for preview2, it's better to unbreak the existing use cases.
IMO, the wasm-ld patch in question should be reverted, or at least conditionalized to allow plain exports.
how do you think?
[1] https://reviews.llvm.org/D81689
[2] https://reviews.llvm.org/D81689#3611504
[3] https://github.com/WebAssembly/meetings/blob/main/wasi/2022/presentations/2022-06-30-gohman-wasi-preview2.pdf