summaryrefslogtreecommitdiff
path: root/rt/start-netbsd.s
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2019-02-26 13:03:14 -0800
committerOri Bernstein <ori@markovcorp.com>2019-02-26 13:03:14 -0800
commit02201160614e5f25a7a73d86ed26a1f90fa4f5bb (patch)
treece958c6982673794612cf2ea91ab8b353bf4c243 /rt/start-netbsd.s
parent16a7bb8f8cc86b22ce157e0944f66f60a556590f (diff)
downloadmc-02201160614e5f25a7a73d86ed26a1f90fa4f5bb.tar.gz
Add support for `__fini__` functions.
Diffstat (limited to 'rt/start-netbsd.s')
-rw-r--r--rt/start-netbsd.s5
1 files changed, 3 insertions, 2 deletions
diff --git a/rt/start-netbsd.s b/rt/start-netbsd.s
index 3a6cfc7..7765afe 100644
--- a/rt/start-netbsd.s
+++ b/rt/start-netbsd.s
@@ -60,10 +60,11 @@ _start:
addq $0x10,%rsp
xorq %rbp,%rbp
- /* call pre-main initializers */
+
call __init__
- /* enter the main program */
call main
+ call __fini__
+
/* exit(0) */
xorq %rdi,%rdi
movq $1,%rax