1 /* $FreeBSD$ */
2
3 #include "linux_assym.h" /* system definitions */
4 #include <machine/asmacros.h> /* miscellaneous asm macros */
5
6 #include <i386/linux/linux_syscall.h> /* system call numbers */
7
8 .data
9
10 .globl linux_platform
11 linux_platform:
12 .asciz "i686"
13
14 .text
15
16 ENTRY(linux_vdso_sigcode)
17 .cfi_startproc
18 .cfi_signal_frame
19 .cfi_def_cfa %esp, LINUX_SIGF_SC
20 .cfi_offset %gs, L_SC_GS
21 .cfi_offset %fs, L_SC_FS
22 .cfi_offset %es, L_SC_ES
23 .cfi_offset %ds, L_SC_DS
24 .cfi_offset %cs, L_SC_CS
25 .cfi_offset %ss, L_SC_SS
26 .cfi_offset %flags, L_SC_EFLAGS
27 .cfi_offset %edi, L_SC_EDI
28 .cfi_offset %esi, L_SC_ESI
29 .cfi_offset %ebp, L_SC_EBP
30 .cfi_offset %ebx, L_SC_EBX
31 .cfi_offset %edx, L_SC_EDX
32 .cfi_offset %ecx, L_SC_ECX
33 .cfi_offset %eax, L_SC_EAX
34 .cfi_offset %eip, L_SC_EIP
35 .cfi_offset %esp, L_SC_ESP
36
37 movl %esp, %ebx /* sigframe for sigreturn */
38 call *%edi /* call signal handler */
39 popl %eax /* gcc unwind code need this */
40 .cfi_def_cfa %esp, LINUX_SIGF_SC-4
41 movl $LINUX_SYS_linux_sigreturn, %eax
42 int $0x80
43 0: jmp 0b
44 .cfi_endproc
45 END(linux_vdso_sigcode)
46
47 ENTRY(linux_vdso_rt_sigcode)
48 .cfi_startproc
49 .cfi_signal_frame
50 .cfi_def_cfa %esp, LINUX_RT_SIGF_UC + LINUX_RT_SIGF_SC
51 .cfi_offset %gs, L_SC_GS
52 .cfi_offset %fs, L_SC_FS
53 .cfi_offset %es, L_SC_ES
54 .cfi_offset %ds, L_SC_DS
55 .cfi_offset %cs, L_SC_CS
56 .cfi_offset %ss, L_SC_SS
57 .cfi_offset %flags, L_SC_EFLAGS
58 .cfi_offset %edi, L_SC_EDI
59 .cfi_offset %esi, L_SC_ESI
60 .cfi_offset %ebp, L_SC_EBP
61 .cfi_offset %ebx, L_SC_EBX
62 .cfi_offset %edx, L_SC_EDX
63 .cfi_offset %ecx, L_SC_ECX
64 .cfi_offset %eax, L_SC_EAX
65 .cfi_offset %eip, L_SC_EIP
66 .cfi_offset %esp, L_SC_ESP
67
68 leal LINUX_RT_SIGF_UC(%esp), %ebx /* linux ucontext for rt_sigreturn */
69 call *%edi /* call signal handler */
70 movl $LINUX_SYS_linux_rt_sigreturn, %eax
71 int $0x80
72 0: jmp 0b
73 .cfi_endproc
74 END(linux_vdso_rt_sigcode)
75
76 ENTRY(__kernel_sigreturn)
77 .cfi_startproc
78 .cfi_signal_frame
79 popl %eax /* gcc unwind code need this */
80 movl $LINUX_SYS_linux_sigreturn, %eax
81 int $0x80
82 0: jmp 0b
83 .cfi_endproc
84 END(__kernel_sigreturn)
85
86 ENTRY(__kernel_rt_sigreturn)
87 .cfi_startproc
88 .cfi_signal_frame
89 movl $LINUX_SYS_linux_rt_sigreturn, %eax
90 int $0x80
91 0: jmp 0b
92 .cfi_endproc
93 END(__kernel_rt_sigreturn)
94
95 ENTRY(__kernel_vsyscall)
96 .cfi_startproc
97 int $0x80
98 ret
99 .cfi_endproc
100 END(__kernel_vsyscall)
101
102 #if 0
103 .section .note.Linux, "a",@note
104 .long 2f - 1f /* namesz */
105 .balign 4
106 .long 4f - 3f /* descsz */
107 .long 0
108 1:
109 .asciz "Linux"
110 2:
111 .balign 4
112 3:
113 .long LINUX_VERSION_CODE
114 4:
115 .balign 4
116 .previous
117 #endif
Cache object: c1bdc8ffc21505f40d2c60222b851f5c
|