2024-03-22 15:33:39 +02:00
|
|
|
.section .userspace, "aw"
|
|
|
|
|
|
|
|
// stack contains
|
|
|
|
// return address
|
|
|
|
// signal number
|
|
|
|
// signal handler
|
|
|
|
|
|
|
|
.global signal_trampoline
|
|
|
|
signal_trampoline:
|
2024-03-26 02:48:26 +02:00
|
|
|
ud2
|
|
|
|
|
2024-03-22 15:33:39 +02:00
|
|
|
pushl %ebp
|
|
|
|
movl %esp, %ebp
|
|
|
|
subl $8, %esp
|
|
|
|
|
|
|
|
pusha
|
|
|
|
|
|
|
|
movl 40(%esp), %edi
|
|
|
|
movl 36(%esp), %eax
|
|
|
|
|
|
|
|
subl $12, %esp
|
|
|
|
pushl %edi
|
|
|
|
call *%eax
|
|
|
|
addl $16, %esp
|
|
|
|
|
|
|
|
popa
|
|
|
|
|
|
|
|
leave
|
|
|
|
addl $8, %esp
|
|
|
|
|
|
|
|
ret
|