From 753d43d349bfde6b83cff650c9354c4a0442a3ae Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 18 Oct 2022 18:41:22 +0200 Subject: user/libc: rework exec(), use a C _start2 --- src/user/lib/_start.s | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/user/lib/_start.s (limited to 'src/user/lib/_start.s') diff --git a/src/user/lib/_start.s b/src/user/lib/_start.s new file mode 100644 index 0000000..0d5b5de --- /dev/null +++ b/src/user/lib/_start.s @@ -0,0 +1,11 @@ +.section .text +.global _start +.type _start, @function +.weak _start +_start: + mov %rsp, %rdi + and $~0xF, %rsp + call _start2 + hlt + /* the call shouldn't return, thus the hlt. + * using a call instead of jmp for stack alignment */ -- cgit v1.2.3