Skip to content

Commit

Permalink
libdyld: call _initialize as well
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Aug 3, 2023
1 parent 7be435b commit 30dee16
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libdyld/dyld.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,17 @@ static const struct name name_main_object = NAME_FROM_CSTR_LITERAL("<main>");
*/
static const struct name init_funcs[] = {
NAME_FROM_CSTR_LITERAL("__wasm_apply_data_relocs"),
/*
* wasm-ld synthesize __wasm_call_ctors.
*
* if crt1 is linked to the library, _initialize calls
* __wasm_call_ctors. in that case, usually __wasm_call_ctors
* is not exported.
*
* otherwise, wasm-ld exports __wasm_call_ctors.
*/
NAME_FROM_CSTR_LITERAL("__wasm_call_ctors"),
NAME_FROM_CSTR_LITERAL("_initialize"),
};

static const struct val val_null = {
Expand Down

0 comments on commit 30dee16

Please sign in to comment.