Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/linux32/linux32_locore.asm
Show All 12 Lines | |||||
.text | .text | ||||
.code32 | .code32 | ||||
/* | /* | ||||
* To avoid excess stack frame the signal trampoline code emulates | * To avoid excess stack frame the signal trampoline code emulates | ||||
* the 'call' instruction. | * the 'call' instruction. | ||||
*/ | */ | ||||
ENTRY(linux32_sigcode) | ENTRY(__kernel_sigreturn) | ||||
movl %esp, %ebx /* preserve sigframe */ | movl %esp, %ebx /* preserve sigframe */ | ||||
call .getip0 | call .getip0 | ||||
.getip0: | .getip0: | ||||
popl %eax | popl %eax | ||||
add $.startsigcode-.getip0, %eax /* ret address */ | add $.startsigcode-.getip0, %eax /* ret address */ | ||||
push %eax | push %eax | ||||
jmp *LINUX_SIGF_HANDLER(%ebx) | jmp *LINUX_SIGF_HANDLER(%ebx) | ||||
.startsigcode: | .startsigcode: | ||||
popl %eax | popl %eax | ||||
movl $LINUX32_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ | movl $LINUX32_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ | ||||
int $0x80 /* enter kernel with args */ | int $0x80 /* enter kernel with args */ | ||||
.endsigcode: | .endsigcode: | ||||
0: jmp 0b | 0: jmp 0b | ||||
ENTRY(linux32_rt_sigcode) | ENTRY(__kernel_rt_sigreturn) | ||||
leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */ | leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */ | ||||
leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */ | leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */ | ||||
movl %esp, %edi | movl %esp, %edi | ||||
call .getip1 | call .getip1 | ||||
.getip1: | .getip1: | ||||
popl %eax | popl %eax | ||||
add $.startrtsigcode-.getip1, %eax /* ret address */ | add $.startrtsigcode-.getip1, %eax /* ret address */ | ||||
push %eax | push %eax | ||||
jmp *LINUX_RT_SIGF_HANDLER(%edi) | jmp *LINUX_RT_SIGF_HANDLER(%edi) | ||||
.startrtsigcode: | .startrtsigcode: | ||||
movl $LINUX32_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ | movl $LINUX32_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ | ||||
int $0x80 /* enter kernel with args */ | int $0x80 /* enter kernel with args */ | ||||
.endrtsigcode: | .endrtsigcode: | ||||
0: jmp 0b | 0: jmp 0b | ||||
ENTRY(linux32_vsyscall) | ENTRY(__kernel_vsyscall) | ||||
.startvsyscall: | .startvsyscall: | ||||
int $0x80 | int $0x80 | ||||
ret | ret | ||||
.endvsyscall: | .endvsyscall: | ||||
#if 0 | #if 0 | ||||
.section .note.Linux, "a",@note | .section .note.Linux, "a",@note | ||||
.long 2f - 1f /* namesz */ | .long 2f - 1f /* namesz */ | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |