Skip to content

Commit c931bc7

Browse files
aykevldeadprogram
authored andcommitted
wasip2: do not export the _start function
It seems to have been replaced with the Component Model `run` function.
1 parent 1f3e000 commit c931bc7

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/runtime/runtime_wasm_wasip2.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,11 @@ type timeUnit int64
1313

1414
//export wasi:cli/[email protected]#run
1515
func __wasi_cli_run_run() uint32 {
16-
_start()
17-
return 0
18-
}
19-
20-
//export _start
21-
func _start() {
2216
// These need to be initialized early so that the heap can be initialized.
2317
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
2418
heapEnd = uintptr(wasm_memory_size(0) * wasmPageSize)
2519
run()
26-
}
27-
28-
func init() {
20+
return 0
2921
}
3022

3123
var args []string

targets/wasip2.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
],
1818
"ldflags": [
1919
"--stack-first",
20-
"--no-demangle"
20+
"--no-demangle",
21+
"--no-entry"
2122
],
2223
"extra-files": [
2324
"src/runtime/asm_tinygowasm.S"

0 commit comments

Comments
 (0)