Skip to content

support _initialize export as well as __wasm_call_ctors - #1228

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
dicej:call_initialize
Oct 3, 2023
Merged

support _initialize export as well as __wasm_call_ctors#1228
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
dicej:call_initialize

Conversation

@dicej

@dicej dicej commented Oct 3, 2023

Copy link
Copy Markdown
Collaborator

Per WebAssembly/tool-conventions#203 and recent LLVM and wasi-libc changes, libraries may export an _initialize function instead of __wasm_call_ctors, and we should call whichever one we find. Note that we expect to find at most one of the two, and will return an error if both are found.

Per WebAssembly/tool-conventions#203 and recent LLVM and
wasi-libc changes, libraries may export an `_initialize` function instead of
`__wasm_call_ctors`, and we should call whichever one we find.  Note that we
expect to find at most one of the two, and will return an error if both are
found.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
@dicej
dicej requested a review from alexcrichton October 3, 2023 20:04
@alexcrichton
alexcrichton merged commit 60785ca into bytecodealliance:main Oct 3, 2023
@dicej
dicej deleted the call_initialize branch October 4, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants