diff options
author | dzwdz | 2023-08-08 18:53:26 +0200 |
---|---|---|
committer | dzwdz | 2023-08-08 18:53:26 +0200 |
commit | 6126525ed2ad3fb2543c43dbca6b01106af02180 (patch) | |
tree | e58cd10a90865d9752742b100344b499989685a5 | |
parent | 0e8ae092443b8a5a582a3a5aaad663d6fbe4f500 (diff) |
bootstrap: fix main()'s stack alignment
-rw-r--r-- | src/user/bootstrap/entry.S | 4 |
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 |