diff options
author | Ayke van Laethem <[email protected]> | 2021-09-24 18:29:32 +0200 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2021-09-27 14:55:02 +0200 |
commit | ae1c3c0056c32a72a74ce1ff55da6797d310a0f9 (patch) | |
tree | f83eb985b9525c0bb06c30dfc1efdce93ea7f9a1 | |
parent | bb461494d9a2b1a56454c7c719202618d26fee41 (diff) | |
download | tinygo-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.go | 5 |
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() |