🆕 do_execve函数,跳转至应用层

This commit is contained in:
fslongjin
2022-02-13 22:41:35 +08:00
parent 781a105d2f
commit 0757e7a3cd
8 changed files with 178 additions and 93 deletions

View File

@ -99,6 +99,38 @@ Err_Code:
jmp ret_from_exception
//
ENTRY(ret_from_system_call)
movq %rax, 0x80(%rsp) // raxrax
popq %r15
popq %r14
popq %r13
popq %r12
popq %r11
popq %r10
popq %r9
popq %r8
popq %rbx
popq %rcx
popq %rdx
popq %rsi
popq %rdi
popq %rbp
popq %rax // popds
movq %rax, %ds
popq %rax
movq %rax, %es
popq %rax
addq $0x38, %rsp
.byte 0x48
sysexit
// 0 #DE
ENTRY(divide_error)