userspace/libc: fix stack alignment

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
EnderIce2 2025-01-25 00:08:46 +02:00
parent 69bc044b09
commit e8b61e6d7f
No known key found for this signature in database
GPG Key ID: 2EE20AF089811A5A

View File

@ -40,9 +40,8 @@ void __crt_fini_array(void)
__attribute__((naked, used, no_stack_protector, section(".text"))) void _start() __attribute__((naked, used, no_stack_protector, section(".text"))) void _start()
{ {
#if defined(__amd64__) #if defined(__amd64__)
asm("movq $0, %rbp\n" asm("xor %rbp, %rbp\n"
"pushq %rbp\n" "andq $-16, %rsp\n"
"pushq %rbp\n"
"movq %rsp, %rbp\n" "movq %rsp, %rbp\n"
"pushq %rcx\n" "pushq %rcx\n"