summaryrefslogtreecommitdiff
path: root/src/user/bootstrap/entry.S
diff options
context:
space:
mode:
authordzwdz2023-08-08 18:53:26 +0200
committerdzwdz2023-08-08 18:53:26 +0200
commit6126525ed2ad3fb2543c43dbca6b01106af02180 (patch)
treee58cd10a90865d9752742b100344b499989685a5 /src/user/bootstrap/entry.S
parent0e8ae092443b8a5a582a3a5aaad663d6fbe4f500 (diff)
bootstrap: fix main()'s stack alignment
Diffstat (limited to 'src/user/bootstrap/entry.S')
-rw-r--r--src/user/bootstrap/entry.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/user/bootstrap/entry.S b/src/user/bootstrap/entry.S
index 04b4238..bd1b417 100644
--- a/src/user/bootstrap/entry.S
+++ b/src/user/bootstrap/entry.S
@@ -14,7 +14,6 @@ _start:
mov $(STACK_PAGES * 0x1000), %rdx
mov $MEMFLAG_PRESENT, %r10
syscall
- mov $(STACK_TOP & ~0xF), %rsp
mov $_SYS_MEMFLAG, %rdi
mov $_bss_start, %rsi
@@ -24,4 +23,5 @@ _start:
mov %rsp, %r8
syscall
- jmp main
+ mov $(STACK_TOP & ~0xF), %rsp
+ call main // and don't you dare return