Skip to content

Commit 0fe8147

Browse files
committed
baremetal: define the abort function
This is normally provided by the libc, but in our case it makes more sense to define it in the runtime (just like malloc).
1 parent 2f85ef1 commit 0fe8147

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/runtime/baremetal.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ func libc_free(ptr unsafe.Pointer) {
4646
free(ptr)
4747
}
4848

49+
//export abort
50+
func libc_abort() {
51+
abort()
52+
}
53+
4954
//go:linkname syscall_Exit syscall.Exit
5055
func syscall_Exit(code int) {
5156
abort()

0 commit comments

Comments
 (0)