Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/shared-constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

namespace wasm {

extern Name WASM_CALL_CTORS;
extern Name MEMORY_BASE;
extern Name TABLE_BASE;
extern Name STACK_POINTER;
Expand Down
9 changes: 0 additions & 9 deletions src/tools/wasm-emscripten-finalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,6 @@ int main(int argc, const char* argv[]) {

passRunner.run();

if (sideModule) {
BYN_TRACE("finalizing as side module\n");
// The emscripten PIC ABI still expects a function named
// __post_instantiate to be exported by side module.
if (auto* e = wasm.getExportOrNull(WASM_CALL_CTORS)) {
e->name = "__post_instantiate";
}
}

BYN_TRACE("generated metadata\n");
// Substantial changes to the wasm are done, enough to create the metadata.
std::string metadata = generator.generateEmscriptenMetadata();
Expand Down
1 change: 0 additions & 1 deletion src/wasm/wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const char* TypedFunctionReferencesFeature = "typed-function-references";
} // namespace UserSections
} // namespace BinaryConsts

Name WASM_CALL_CTORS("__wasm_call_ctors");
Name MEMORY_BASE("__memory_base");
Name TABLE_BASE("__table_base");
Name STACK_POINTER("__stack_pointer");
Expand Down
4 changes: 2 additions & 2 deletions test/lld/em_asm_shared.wat.out
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
(global $global$2 i32 (i32.const 4))
(global $global$3 i32 (i32.const 6))
(global $global$4 i32 (i32.const 90))
(export "__post_instantiate" (func $__wasm_call_ctors))
(export "__wasm_call_ctors" (func $__wasm_call_ctors))
(export "__original_main" (func $__original_main))
(export "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJEEE6bufferE" (global $global$0))
(export "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiiEEE6bufferE" (global $global$1))
Expand Down Expand Up @@ -114,7 +114,7 @@
"__ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiEEE6bufferE"
],
"exports": [
"__post_instantiate",
"__wasm_call_ctors",
"__original_main",
"main"
],
Expand Down
4 changes: 2 additions & 2 deletions test/lld/shared.wat.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(import "env" "puts" (func $puts (param i32) (result i32)))
(global $global$0 i32 (i32.const 16))
(global $global$1 i32 (i32.const 20))
(export "__post_instantiate" (func $__wasm_call_ctors))
(export "__wasm_call_ctors" (func $__wasm_call_ctors))
(export "_Z13print_messagev" (func $print_message\28\29))
(export "ptr_puts" (global $global$0))
(export "ptr_local_func" (global $global$1))
Expand Down Expand Up @@ -65,7 +65,7 @@
"__Z13print_messagev"
],
"exports": [
"__post_instantiate",
"__wasm_call_ctors",
"_Z13print_messagev"
],
"namedGlobals": {
Expand Down
4 changes: 2 additions & 2 deletions test/lld/shared_add_to_table.wasm.out
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(import "env" "_Z16waka_func_theirsi" (func $waka_func_theirs\28int\29 (param i32) (result i32)))
(global $global$0 i32 (i32.const 0))
(global $global$1 i32 (i32.const 0))
(export "__post_instantiate" (func $__wasm_call_ctors))
(export "__wasm_call_ctors" (func $__wasm_call_ctors))
(export "__wasm_apply_relocs" (func $__wasm_apply_relocs))
(export "_Z14waka_func_minei" (func $waka_func_mine\28int\29))
(export "__original_main" (func $__original_main))
Expand Down Expand Up @@ -85,7 +85,7 @@
"_waka_others"
],
"exports": [
"__post_instantiate",
"__wasm_call_ctors",
"__wasm_apply_relocs",
"_Z14waka_func_minei",
"__original_main",
Expand Down
4 changes: 2 additions & 2 deletions test/lld/shared_longjmp.wat.out
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
(import "env" "free" (func $fimport$7 (param i32)))
(global $global$0 i32 (i32.const 0))
(global $global$1 i32 (i32.const 4))
(export "__post_instantiate" (func $0))
(export "__wasm_call_ctors" (func $0))
(export "_start" (func $2))
(export "__THREW__" (global $global$0))
(export "__threwValue" (global $global$1))
Expand Down Expand Up @@ -168,7 +168,7 @@
"___threwValue"
],
"exports": [
"__post_instantiate",
"__wasm_call_ctors",
"_start",
"dynCall_vii"
],
Expand Down