Skip to content

Rename __prepare_for_exit to __wasm_call_dtors. - #201

Merged
sunfishcode merged 1 commit into
masterfrom
wasm-call-dtors
Jun 8, 2020
Merged

Rename __prepare_for_exit to __wasm_call_dtors.#201
sunfishcode merged 1 commit into
masterfrom
wasm-call-dtors

Conversation

@sunfishcode

Copy link
Copy Markdown
Member

This emphasizes the relationship with __wasm_call_ctors. Note however
that while __wasm_call_ctors is synthesized by the linker,
__wasm_call_dtors is still defined by libc.

Static constructors are registered statically, but static destructors
need to be registered dynamically so that they only run if their
corresponding static constructors have run, and so that they're
ordered with respect to interleaved atexit calls.

This emphasizes the relationship with `__wasm_call_ctors`. Note however
that while `__wasm_call_ctors` is synthesized by the linker,
`__wasm_call_dtors` is still defined by libc.

Static constructors are registered statically, but static destructors
need to be registered dynamically so that they only run if their
corresponding static constructors have run, and so that they're
ordered with respect to interleaved `atexit` calls.
@sunfishcode
sunfishcode merged commit 4e45d2b into master Jun 8, 2020
@sunfishcode
sunfishcode deleted the wasm-call-dtors branch June 8, 2020 22:21
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