aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-09-24 18:29:32 +0200
committerAyke van Laethem <[email protected]>2021-09-27 14:55:02 +0200
commitae1c3c0056c32a72a74ce1ff55da6797d310a0f9 (patch)
treef83eb985b9525c0bb06c30dfc1efdce93ea7f9a1
parentbb461494d9a2b1a56454c7c719202618d26fee41 (diff)
downloadtinygo-ae1c3c0056c32a72a74ce1ff55da6797d310a0f9.tar.gz
tinygo-ae1c3c0056c32a72a74ce1ff55da6797d310a0f9.zip
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).
-rw-r--r--src/runtime/baremetal.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/baremetal.go b/src/runtime/baremetal.go
index 5abd13710..4e81a9cc9 100644
--- a/src/runtime/baremetal.go
+++ b/src/runtime/baremetal.go
@@ -46,6 +46,11 @@ func libc_free(ptr unsafe.Pointer) {
free(ptr)
}
+//export abort
+func libc_abort() {
+ abort()
+}
+
//go:linkname syscall_Exit syscall.Exit
func syscall_Exit(code int) {
abort()