diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-30 07:30:44 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:44 -0500 |
commit | 16f4bc738d616962a844e80f7b1fcb52c626542a (patch) | |
tree | 15e26944661e9597f9d7ec2579494a0651f6585a /arch/x86/ia32 | |
parent | af65d64845a90c8f2fc90b97e2148ff74672e979 (diff) |
x86 vDSO: ia32 vsyscall removal
This removes all the old vsyscall code from arch/x86/ia32/ that is
no longer used because arch/x86/vdso/ code has replaced it.
Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r-- | arch/x86/ia32/Makefile | 37 | ||||
-rw-r--r-- | arch/x86/ia32/syscall32.c | 90 | ||||
-rw-r--r-- | arch/x86/ia32/syscall32_syscall.S | 17 | ||||
-rw-r--r-- | arch/x86/ia32/vsyscall-sigreturn.S | 142 | ||||
-rw-r--r-- | arch/x86/ia32/vsyscall-syscall.S | 69 | ||||
-rw-r--r-- | arch/x86/ia32/vsyscall-sysenter.S | 95 | ||||
-rw-r--r-- | arch/x86/ia32/vsyscall.lds | 80 |
7 files changed, 0 insertions, 530 deletions
diff --git a/arch/x86/ia32/Makefile b/arch/x86/ia32/Makefile index 1f58a21a41dc..8c19b763b2fb 100644 --- a/arch/x86/ia32/Makefile +++ b/arch/x86/ia32/Makefile | |||
@@ -12,40 +12,3 @@ obj-$(CONFIG_IA32_AOUT) += ia32_aout.o | |||
12 | 12 | ||
13 | audit-class-$(CONFIG_AUDIT) := audit.o | 13 | audit-class-$(CONFIG_AUDIT) := audit.o |
14 | obj-$(CONFIG_IA32_EMULATION) += $(audit-class-y) | 14 | obj-$(CONFIG_IA32_EMULATION) += $(audit-class-y) |
15 | |||
16 | $(obj)/syscall32_syscall.o: \ | ||
17 | $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) | ||
18 | |||
19 | # Teach kbuild about targets | ||
20 | targets := $(foreach F,$(addprefix vsyscall-,sysenter syscall),\ | ||
21 | $F.o $F.so $F.so.dbg) | ||
22 | |||
23 | # The DSO images are built using a special linker script | ||
24 | quiet_cmd_syscall = SYSCALL $@ | ||
25 | cmd_syscall = $(CC) -m32 -nostdlib -shared \ | ||
26 | $(call ld-option, -Wl$(comma)--hash-style=sysv) \ | ||
27 | -Wl,-soname=linux-gate.so.1 -o $@ \ | ||
28 | -Wl,-T,$(filter-out FORCE,$^) | ||
29 | |||
30 | $(obj)/%.so: OBJCOPYFLAGS := -S | ||
31 | $(obj)/%.so: $(obj)/%.so.dbg FORCE | ||
32 | $(call if_changed,objcopy) | ||
33 | |||
34 | $(obj)/vsyscall-sysenter.so.dbg $(obj)/vsyscall-syscall.so.dbg: \ | ||
35 | $(obj)/vsyscall-%.so.dbg: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE | ||
36 | $(call if_changed,syscall) | ||
37 | |||
38 | AFLAGS_vsyscall-sysenter.o = -m32 -Wa,-32 | ||
39 | AFLAGS_vsyscall-syscall.o = -m32 -Wa,-32 | ||
40 | |||
41 | vdsos := vdso32-sysenter.so vdso32-syscall.so | ||
42 | |||
43 | quiet_cmd_vdso_install = INSTALL $@ | ||
44 | cmd_vdso_install = cp $(@:vdso32-%.so=$(obj)/vsyscall-%.so.dbg) \ | ||
45 | $(MODLIB)/vdso/$@ | ||
46 | |||
47 | $(vdsos): | ||
48 | @mkdir -p $(MODLIB)/vdso | ||
49 | $(call cmd,vdso_install) | ||
50 | |||
51 | vdso_install: $(vdsos) | ||
diff --git a/arch/x86/ia32/syscall32.c b/arch/x86/ia32/syscall32.c deleted file mode 100644 index 98ff99f5b59a..000000000000 --- a/arch/x86/ia32/syscall32.c +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2002,2003 Andi Kleen, SuSE Labs | ||
3 | * | ||
4 | * vsyscall handling for 32bit processes. Map a stub page into it on | ||
5 | * demand because 32bit cannot reach the kernel's fixmaps | ||
6 | */ | ||
7 | #include <linux/mm.h> | ||
8 | #include <linux/string.h> | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/gfp.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/stringify.h> | ||
13 | #include <linux/security.h> | ||
14 | #include <asm/proto.h> | ||
15 | #include <asm/tlbflush.h> | ||
16 | #include <asm/ia32_unistd.h> | ||
17 | #include <asm/vsyscall32.h> | ||
18 | |||
19 | extern unsigned char syscall32_syscall[], syscall32_syscall_end[]; | ||
20 | extern unsigned char syscall32_sysenter[], syscall32_sysenter_end[]; | ||
21 | extern int sysctl_vsyscall32; | ||
22 | |||
23 | static struct page *syscall32_pages[1]; | ||
24 | static int use_sysenter = -1; | ||
25 | |||
26 | struct linux_binprm; | ||
27 | |||
28 | /* Setup a VMA at program startup for the vsyscall page */ | ||
29 | int syscall32_setup_pages(struct linux_binprm *bprm, int exstack) | ||
30 | { | ||
31 | struct mm_struct *mm = current->mm; | ||
32 | int ret; | ||
33 | |||
34 | down_write(&mm->mmap_sem); | ||
35 | /* | ||
36 | * MAYWRITE to allow gdb to COW and set breakpoints | ||
37 | * | ||
38 | * Make sure the vDSO gets into every core dump. | ||
39 | * Dumping its contents makes post-mortem fully interpretable later | ||
40 | * without matching up the same kernel and hardware config to see | ||
41 | * what PC values meant. | ||
42 | */ | ||
43 | /* Could randomize here */ | ||
44 | ret = install_special_mapping(mm, VSYSCALL32_BASE, PAGE_SIZE, | ||
45 | VM_READ|VM_EXEC| | ||
46 | VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC| | ||
47 | VM_ALWAYSDUMP, | ||
48 | syscall32_pages); | ||
49 | if (ret == 0) { | ||
50 | current->mm->context.vdso = (void __user *)VSYSCALL32_BASE; | ||
51 | current_thread_info()->sysenter_return = VSYSCALL32_SYSEXIT; | ||
52 | } | ||
53 | up_write(&mm->mmap_sem); | ||
54 | return ret; | ||
55 | } | ||
56 | |||
57 | static int __init init_syscall32(void) | ||
58 | { | ||
59 | char *syscall32_page = (void *)get_zeroed_page(GFP_KERNEL); | ||
60 | |||
61 | if (!syscall32_page) | ||
62 | panic("Cannot allocate syscall32 page"); | ||
63 | syscall32_pages[0] = virt_to_page(syscall32_page); | ||
64 | if (use_sysenter > 0) { | ||
65 | memcpy(syscall32_page, syscall32_sysenter, | ||
66 | syscall32_sysenter_end - syscall32_sysenter); | ||
67 | } else { | ||
68 | memcpy(syscall32_page, syscall32_syscall, | ||
69 | syscall32_syscall_end - syscall32_syscall); | ||
70 | } | ||
71 | return 0; | ||
72 | } | ||
73 | __initcall(init_syscall32); | ||
74 | |||
75 | /* May not be __init: called during resume */ | ||
76 | void syscall32_cpu_init(void) | ||
77 | { | ||
78 | if (use_sysenter < 0) | ||
79 | use_sysenter = (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL); | ||
80 | |||
81 | /* | ||
82 | * Load these always in case some future AMD CPU supports | ||
83 | * SYSENTER from compat mode too. | ||
84 | */ | ||
85 | checking_wrmsrl(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS); | ||
86 | checking_wrmsrl(MSR_IA32_SYSENTER_ESP, 0ULL); | ||
87 | checking_wrmsrl(MSR_IA32_SYSENTER_EIP, (u64)ia32_sysenter_target); | ||
88 | |||
89 | wrmsrl(MSR_CSTAR, ia32_cstar_target); | ||
90 | } | ||
diff --git a/arch/x86/ia32/syscall32_syscall.S b/arch/x86/ia32/syscall32_syscall.S deleted file mode 100644 index 933f0f08b1cf..000000000000 --- a/arch/x86/ia32/syscall32_syscall.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* 32bit VDSOs mapped into user space. */ | ||
2 | |||
3 | .section ".init.data","aw" | ||
4 | |||
5 | .globl syscall32_syscall | ||
6 | .globl syscall32_syscall_end | ||
7 | |||
8 | syscall32_syscall: | ||
9 | .incbin "arch/x86/ia32/vsyscall-syscall.so" | ||
10 | syscall32_syscall_end: | ||
11 | |||
12 | .globl syscall32_sysenter | ||
13 | .globl syscall32_sysenter_end | ||
14 | |||
15 | syscall32_sysenter: | ||
16 | .incbin "arch/x86/ia32/vsyscall-sysenter.so" | ||
17 | syscall32_sysenter_end: | ||
diff --git a/arch/x86/ia32/vsyscall-sigreturn.S b/arch/x86/ia32/vsyscall-sigreturn.S deleted file mode 100644 index 295eecf91f17..000000000000 --- a/arch/x86/ia32/vsyscall-sigreturn.S +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | /* | ||
2 | * Common code for the sigreturn entry points on the vsyscall page. | ||
3 | * This code uses SYSCALL_ENTER_KERNEL (either syscall or int $0x80) | ||
4 | * to enter the kernel. | ||
5 | * This file is #include'd by vsyscall-*.S to define them after the | ||
6 | * vsyscall entry point. The addresses we get for these entry points | ||
7 | * by doing ".balign 32" must match in both versions of the page. | ||
8 | */ | ||
9 | |||
10 | .code32 | ||
11 | .section .text.sigreturn,"ax" | ||
12 | .balign 32 | ||
13 | .globl __kernel_sigreturn | ||
14 | .type __kernel_sigreturn,@function | ||
15 | __kernel_sigreturn: | ||
16 | .LSTART_sigreturn: | ||
17 | popl %eax | ||
18 | movl $__NR_ia32_sigreturn, %eax | ||
19 | SYSCALL_ENTER_KERNEL | ||
20 | .LEND_sigreturn: | ||
21 | .size __kernel_sigreturn,.-.LSTART_sigreturn | ||
22 | |||
23 | .section .text.rtsigreturn,"ax" | ||
24 | .balign 32 | ||
25 | .globl __kernel_rt_sigreturn | ||
26 | .type __kernel_rt_sigreturn,@function | ||
27 | __kernel_rt_sigreturn: | ||
28 | .LSTART_rt_sigreturn: | ||
29 | movl $__NR_ia32_rt_sigreturn, %eax | ||
30 | SYSCALL_ENTER_KERNEL | ||
31 | .LEND_rt_sigreturn: | ||
32 | .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn | ||
33 | |||
34 | .section .eh_frame,"a",@progbits | ||
35 | .LSTARTFRAMES: | ||
36 | .long .LENDCIES-.LSTARTCIES | ||
37 | .LSTARTCIES: | ||
38 | .long 0 /* CIE ID */ | ||
39 | .byte 1 /* Version number */ | ||
40 | .string "zRS" /* NUL-terminated augmentation string */ | ||
41 | .uleb128 1 /* Code alignment factor */ | ||
42 | .sleb128 -4 /* Data alignment factor */ | ||
43 | .byte 8 /* Return address register column */ | ||
44 | .uleb128 1 /* Augmentation value length */ | ||
45 | .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ | ||
46 | .byte 0x0c /* DW_CFA_def_cfa */ | ||
47 | .uleb128 4 | ||
48 | .uleb128 4 | ||
49 | .byte 0x88 /* DW_CFA_offset, column 0x8 */ | ||
50 | .uleb128 1 | ||
51 | .align 4 | ||
52 | .LENDCIES: | ||
53 | |||
54 | .long .LENDFDE2-.LSTARTFDE2 /* Length FDE */ | ||
55 | .LSTARTFDE2: | ||
56 | .long .LSTARTFDE2-.LSTARTFRAMES /* CIE pointer */ | ||
57 | /* HACK: The dwarf2 unwind routines will subtract 1 from the | ||
58 | return address to get an address in the middle of the | ||
59 | presumed call instruction. Since we didn't get here via | ||
60 | a call, we need to include the nop before the real start | ||
61 | to make up for it. */ | ||
62 | .long .LSTART_sigreturn-1-. /* PC-relative start address */ | ||
63 | .long .LEND_sigreturn-.LSTART_sigreturn+1 | ||
64 | .uleb128 0 /* Augmentation length */ | ||
65 | /* What follows are the instructions for the table generation. | ||
66 | We record the locations of each register saved. This is | ||
67 | complicated by the fact that the "CFA" is always assumed to | ||
68 | be the value of the stack pointer in the caller. This means | ||
69 | that we must define the CFA of this body of code to be the | ||
70 | saved value of the stack pointer in the sigcontext. Which | ||
71 | also means that there is no fixed relation to the other | ||
72 | saved registers, which means that we must use DW_CFA_expression | ||
73 | to compute their addresses. It also means that when we | ||
74 | adjust the stack with the popl, we have to do it all over again. */ | ||
75 | |||
76 | #define do_cfa_expr(offset) \ | ||
77 | .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ | ||
78 | .uleb128 1f-0f; /* length */ \ | ||
79 | 0: .byte 0x74; /* DW_OP_breg4 */ \ | ||
80 | .sleb128 offset; /* offset */ \ | ||
81 | .byte 0x06; /* DW_OP_deref */ \ | ||
82 | 1: | ||
83 | |||
84 | #define do_expr(regno, offset) \ | ||
85 | .byte 0x10; /* DW_CFA_expression */ \ | ||
86 | .uleb128 regno; /* regno */ \ | ||
87 | .uleb128 1f-0f; /* length */ \ | ||
88 | 0: .byte 0x74; /* DW_OP_breg4 */ \ | ||
89 | .sleb128 offset; /* offset */ \ | ||
90 | 1: | ||
91 | |||
92 | do_cfa_expr(IA32_SIGCONTEXT_esp+4) | ||
93 | do_expr(0, IA32_SIGCONTEXT_eax+4) | ||
94 | do_expr(1, IA32_SIGCONTEXT_ecx+4) | ||
95 | do_expr(2, IA32_SIGCONTEXT_edx+4) | ||
96 | do_expr(3, IA32_SIGCONTEXT_ebx+4) | ||
97 | do_expr(5, IA32_SIGCONTEXT_ebp+4) | ||
98 | do_expr(6, IA32_SIGCONTEXT_esi+4) | ||
99 | do_expr(7, IA32_SIGCONTEXT_edi+4) | ||
100 | do_expr(8, IA32_SIGCONTEXT_eip+4) | ||
101 | |||
102 | .byte 0x42 /* DW_CFA_advance_loc 2 -- nop; popl eax. */ | ||
103 | |||
104 | do_cfa_expr(IA32_SIGCONTEXT_esp) | ||
105 | do_expr(0, IA32_SIGCONTEXT_eax) | ||
106 | do_expr(1, IA32_SIGCONTEXT_ecx) | ||
107 | do_expr(2, IA32_SIGCONTEXT_edx) | ||
108 | do_expr(3, IA32_SIGCONTEXT_ebx) | ||
109 | do_expr(5, IA32_SIGCONTEXT_ebp) | ||
110 | do_expr(6, IA32_SIGCONTEXT_esi) | ||
111 | do_expr(7, IA32_SIGCONTEXT_edi) | ||
112 | do_expr(8, IA32_SIGCONTEXT_eip) | ||
113 | |||
114 | .align 4 | ||
115 | .LENDFDE2: | ||
116 | |||
117 | .long .LENDFDE3-.LSTARTFDE3 /* Length FDE */ | ||
118 | .LSTARTFDE3: | ||
119 | .long .LSTARTFDE3-.LSTARTFRAMES /* CIE pointer */ | ||
120 | /* HACK: See above wrt unwind library assumptions. */ | ||
121 | .long .LSTART_rt_sigreturn-1-. /* PC-relative start address */ | ||
122 | .long .LEND_rt_sigreturn-.LSTART_rt_sigreturn+1 | ||
123 | .uleb128 0 /* Augmentation */ | ||
124 | /* What follows are the instructions for the table generation. | ||
125 | We record the locations of each register saved. This is | ||
126 | slightly less complicated than the above, since we don't | ||
127 | modify the stack pointer in the process. */ | ||
128 | |||
129 | do_cfa_expr(IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_esp) | ||
130 | do_expr(0, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_eax) | ||
131 | do_expr(1, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_ecx) | ||
132 | do_expr(2, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_edx) | ||
133 | do_expr(3, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_ebx) | ||
134 | do_expr(5, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_ebp) | ||
135 | do_expr(6, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_esi) | ||
136 | do_expr(7, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_edi) | ||
137 | do_expr(8, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_eip) | ||
138 | |||
139 | .align 4 | ||
140 | .LENDFDE3: | ||
141 | |||
142 | #include "../vdso/vdso32/note.S" | ||
diff --git a/arch/x86/ia32/vsyscall-syscall.S b/arch/x86/ia32/vsyscall-syscall.S deleted file mode 100644 index cf9ef678de3e..000000000000 --- a/arch/x86/ia32/vsyscall-syscall.S +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /* | ||
2 | * Code for the vsyscall page. This version uses the syscall instruction. | ||
3 | */ | ||
4 | |||
5 | #include <asm/ia32_unistd.h> | ||
6 | #include <asm/asm-offsets.h> | ||
7 | #include <asm/segment.h> | ||
8 | |||
9 | .code32 | ||
10 | .text | ||
11 | .section .text.vsyscall,"ax" | ||
12 | .globl __kernel_vsyscall | ||
13 | .type __kernel_vsyscall,@function | ||
14 | __kernel_vsyscall: | ||
15 | .LSTART_vsyscall: | ||
16 | push %ebp | ||
17 | .Lpush_ebp: | ||
18 | movl %ecx, %ebp | ||
19 | syscall | ||
20 | movl $__USER32_DS, %ecx | ||
21 | movl %ecx, %ss | ||
22 | movl %ebp, %ecx | ||
23 | popl %ebp | ||
24 | .Lpop_ebp: | ||
25 | ret | ||
26 | .LEND_vsyscall: | ||
27 | .size __kernel_vsyscall,.-.LSTART_vsyscall | ||
28 | |||
29 | .section .eh_frame,"a",@progbits | ||
30 | .LSTARTFRAME: | ||
31 | .long .LENDCIE-.LSTARTCIE | ||
32 | .LSTARTCIE: | ||
33 | .long 0 /* CIE ID */ | ||
34 | .byte 1 /* Version number */ | ||
35 | .string "zR" /* NUL-terminated augmentation string */ | ||
36 | .uleb128 1 /* Code alignment factor */ | ||
37 | .sleb128 -4 /* Data alignment factor */ | ||
38 | .byte 8 /* Return address register column */ | ||
39 | .uleb128 1 /* Augmentation value length */ | ||
40 | .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ | ||
41 | .byte 0x0c /* DW_CFA_def_cfa */ | ||
42 | .uleb128 4 | ||
43 | .uleb128 4 | ||
44 | .byte 0x88 /* DW_CFA_offset, column 0x8 */ | ||
45 | .uleb128 1 | ||
46 | .align 4 | ||
47 | .LENDCIE: | ||
48 | |||
49 | .long .LENDFDE1-.LSTARTFDE1 /* Length FDE */ | ||
50 | .LSTARTFDE1: | ||
51 | .long .LSTARTFDE1-.LSTARTFRAME /* CIE pointer */ | ||
52 | .long .LSTART_vsyscall-. /* PC-relative start address */ | ||
53 | .long .LEND_vsyscall-.LSTART_vsyscall | ||
54 | .uleb128 0 /* Augmentation length */ | ||
55 | /* What follows are the instructions for the table generation. | ||
56 | We have to record all changes of the stack pointer. */ | ||
57 | .byte 0x40 + .Lpush_ebp-.LSTART_vsyscall /* DW_CFA_advance_loc */ | ||
58 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
59 | .uleb128 8 | ||
60 | .byte 0x85, 0x02 /* DW_CFA_offset %ebp -8 */ | ||
61 | .byte 0x40 + .Lpop_ebp-.Lpush_ebp /* DW_CFA_advance_loc */ | ||
62 | .byte 0xc5 /* DW_CFA_restore %ebp */ | ||
63 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
64 | .uleb128 4 | ||
65 | .align 4 | ||
66 | .LENDFDE1: | ||
67 | |||
68 | #define SYSCALL_ENTER_KERNEL syscall | ||
69 | #include "vsyscall-sigreturn.S" | ||
diff --git a/arch/x86/ia32/vsyscall-sysenter.S b/arch/x86/ia32/vsyscall-sysenter.S deleted file mode 100644 index ae056e553d13..000000000000 --- a/arch/x86/ia32/vsyscall-sysenter.S +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | /* | ||
2 | * Code for the vsyscall page. This version uses the sysenter instruction. | ||
3 | */ | ||
4 | |||
5 | #include <asm/ia32_unistd.h> | ||
6 | #include <asm/asm-offsets.h> | ||
7 | |||
8 | .code32 | ||
9 | .text | ||
10 | .section .text.vsyscall,"ax" | ||
11 | .globl __kernel_vsyscall | ||
12 | .type __kernel_vsyscall,@function | ||
13 | __kernel_vsyscall: | ||
14 | .LSTART_vsyscall: | ||
15 | push %ecx | ||
16 | .Lpush_ecx: | ||
17 | push %edx | ||
18 | .Lpush_edx: | ||
19 | push %ebp | ||
20 | .Lenter_kernel: | ||
21 | movl %esp,%ebp | ||
22 | sysenter | ||
23 | .space 7,0x90 | ||
24 | jmp .Lenter_kernel | ||
25 | /* 16: System call normal return point is here! */ | ||
26 | pop %ebp | ||
27 | .Lpop_ebp: | ||
28 | pop %edx | ||
29 | .Lpop_edx: | ||
30 | pop %ecx | ||
31 | .Lpop_ecx: | ||
32 | ret | ||
33 | .LEND_vsyscall: | ||
34 | .size __kernel_vsyscall,.-.LSTART_vsyscall | ||
35 | |||
36 | .section .eh_frame,"a",@progbits | ||
37 | .LSTARTFRAME: | ||
38 | .long .LENDCIE-.LSTARTCIE | ||
39 | .LSTARTCIE: | ||
40 | .long 0 /* CIE ID */ | ||
41 | .byte 1 /* Version number */ | ||
42 | .string "zR" /* NUL-terminated augmentation string */ | ||
43 | .uleb128 1 /* Code alignment factor */ | ||
44 | .sleb128 -4 /* Data alignment factor */ | ||
45 | .byte 8 /* Return address register column */ | ||
46 | .uleb128 1 /* Augmentation value length */ | ||
47 | .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ | ||
48 | .byte 0x0c /* DW_CFA_def_cfa */ | ||
49 | .uleb128 4 | ||
50 | .uleb128 4 | ||
51 | .byte 0x88 /* DW_CFA_offset, column 0x8 */ | ||
52 | .uleb128 1 | ||
53 | .align 4 | ||
54 | .LENDCIE: | ||
55 | |||
56 | .long .LENDFDE1-.LSTARTFDE1 /* Length FDE */ | ||
57 | .LSTARTFDE1: | ||
58 | .long .LSTARTFDE1-.LSTARTFRAME /* CIE pointer */ | ||
59 | .long .LSTART_vsyscall-. /* PC-relative start address */ | ||
60 | .long .LEND_vsyscall-.LSTART_vsyscall | ||
61 | .uleb128 0 /* Augmentation length */ | ||
62 | /* What follows are the instructions for the table generation. | ||
63 | We have to record all changes of the stack pointer. */ | ||
64 | .byte 0x04 /* DW_CFA_advance_loc4 */ | ||
65 | .long .Lpush_ecx-.LSTART_vsyscall | ||
66 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
67 | .byte 0x08 /* RA at offset 8 now */ | ||
68 | .byte 0x04 /* DW_CFA_advance_loc4 */ | ||
69 | .long .Lpush_edx-.Lpush_ecx | ||
70 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
71 | .byte 0x0c /* RA at offset 12 now */ | ||
72 | .byte 0x04 /* DW_CFA_advance_loc4 */ | ||
73 | .long .Lenter_kernel-.Lpush_edx | ||
74 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
75 | .byte 0x10 /* RA at offset 16 now */ | ||
76 | .byte 0x85, 0x04 /* DW_CFA_offset %ebp -16 */ | ||
77 | /* Finally the epilogue. */ | ||
78 | .byte 0x04 /* DW_CFA_advance_loc4 */ | ||
79 | .long .Lpop_ebp-.Lenter_kernel | ||
80 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
81 | .byte 0x12 /* RA at offset 12 now */ | ||
82 | .byte 0xc5 /* DW_CFA_restore %ebp */ | ||
83 | .byte 0x04 /* DW_CFA_advance_loc4 */ | ||
84 | .long .Lpop_edx-.Lpop_ebp | ||
85 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
86 | .byte 0x08 /* RA at offset 8 now */ | ||
87 | .byte 0x04 /* DW_CFA_advance_loc4 */ | ||
88 | .long .Lpop_ecx-.Lpop_edx | ||
89 | .byte 0x0e /* DW_CFA_def_cfa_offset */ | ||
90 | .byte 0x04 /* RA at offset 4 now */ | ||
91 | .align 4 | ||
92 | .LENDFDE1: | ||
93 | |||
94 | #define SYSCALL_ENTER_KERNEL int $0x80 | ||
95 | #include "vsyscall-sigreturn.S" | ||
diff --git a/arch/x86/ia32/vsyscall.lds b/arch/x86/ia32/vsyscall.lds deleted file mode 100644 index 1dc86ff5bcb9..000000000000 --- a/arch/x86/ia32/vsyscall.lds +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Linker script for vsyscall DSO. The vsyscall page is an ELF shared | ||
3 | * object prelinked to its virtual address. This script controls its layout. | ||
4 | */ | ||
5 | |||
6 | /* This must match <asm/fixmap.h>. */ | ||
7 | VSYSCALL_BASE = 0xffffe000; | ||
8 | |||
9 | SECTIONS | ||
10 | { | ||
11 | . = VSYSCALL_BASE + SIZEOF_HEADERS; | ||
12 | |||
13 | .hash : { *(.hash) } :text | ||
14 | .gnu.hash : { *(.gnu.hash) } | ||
15 | .dynsym : { *(.dynsym) } | ||
16 | .dynstr : { *(.dynstr) } | ||
17 | .gnu.version : { *(.gnu.version) } | ||
18 | .gnu.version_d : { *(.gnu.version_d) } | ||
19 | .gnu.version_r : { *(.gnu.version_r) } | ||
20 | |||
21 | /* This linker script is used both with -r and with -shared. | ||
22 | For the layouts to match, we need to skip more than enough | ||
23 | space for the dynamic symbol table et al. If this amount | ||
24 | is insufficient, ld -shared will barf. Just increase it here. */ | ||
25 | . = VSYSCALL_BASE + 0x400; | ||
26 | |||
27 | .text.vsyscall : { *(.text.vsyscall) } :text =0x90909090 | ||
28 | |||
29 | /* This is an 32bit object and we cannot easily get the offsets | ||
30 | into the 64bit kernel. Just hardcode them here. This assumes | ||
31 | that all the stubs don't need more than 0x100 bytes. */ | ||
32 | . = VSYSCALL_BASE + 0x500; | ||
33 | |||
34 | .text.sigreturn : { *(.text.sigreturn) } :text =0x90909090 | ||
35 | |||
36 | . = VSYSCALL_BASE + 0x600; | ||
37 | |||
38 | .text.rtsigreturn : { *(.text.rtsigreturn) } :text =0x90909090 | ||
39 | |||
40 | .note : { *(.note.*) } :text :note | ||
41 | .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr | ||
42 | .eh_frame : { KEEP (*(.eh_frame)) } :text | ||
43 | .dynamic : { *(.dynamic) } :text :dynamic | ||
44 | .useless : { | ||
45 | *(.got.plt) *(.got) | ||
46 | *(.data .data.* .gnu.linkonce.d.*) | ||
47 | *(.dynbss) | ||
48 | *(.bss .bss.* .gnu.linkonce.b.*) | ||
49 | } :text | ||
50 | } | ||
51 | |||
52 | /* | ||
53 | * We must supply the ELF program headers explicitly to get just one | ||
54 | * PT_LOAD segment, and set the flags explicitly to make segments read-only. | ||
55 | */ | ||
56 | PHDRS | ||
57 | { | ||
58 | text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ | ||
59 | dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ | ||
60 | note PT_NOTE FLAGS(4); /* PF_R */ | ||
61 | eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ | ||
62 | } | ||
63 | |||
64 | /* | ||
65 | * This controls what symbols we export from the DSO. | ||
66 | */ | ||
67 | VERSION | ||
68 | { | ||
69 | LINUX_2.5 { | ||
70 | global: | ||
71 | __kernel_vsyscall; | ||
72 | __kernel_sigreturn; | ||
73 | __kernel_rt_sigreturn; | ||
74 | |||
75 | local: *; | ||
76 | }; | ||
77 | } | ||
78 | |||
79 | /* The ELF entry point can be used to set the AT_SYSINFO value. */ | ||
80 | ENTRY(__kernel_vsyscall); | ||