ia64/xen-unstable

view linux-2.6-xen-sparse/arch/ia64/kernel/gate.lds.S @ 10703:8d501f39286c

[IA64] vDSO paravirtualization: paravirtualize vDSO

paravirtualize vdso areabased on Kevin's pointout and Dan's Idea.
introduce hyperprivop HYPERPRIVOP_RSM_BE and HYPERPRIVOP_GET_PSR.
and paravirtualize vdso area using them.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Mon Jul 24 13:43:35 2006 -0600 (2006-07-24)
parents f8ab23b4f704
children c13c3bd7f3b5
line source
1 /*
2 * Linker script for gate DSO. The gate pages are an ELF shared object prelinked to its
3 * virtual address, with only one read-only segment and one execute-only segment (both fit
4 * in one page). This script controls its layout.
5 */
7 #include <linux/config.h>
9 #include <asm/system.h>
11 SECTIONS
12 {
13 . = GATE_ADDR + SIZEOF_HEADERS;
15 .hash : { *(.hash) } :readable
16 .dynsym : { *(.dynsym) }
17 .dynstr : { *(.dynstr) }
18 .gnu.version : { *(.gnu.version) }
19 .gnu.version_d : { *(.gnu.version_d) }
20 .gnu.version_r : { *(.gnu.version_r) }
21 .dynamic : { *(.dynamic) } :readable :dynamic
23 /*
24 * This linker script is used both with -r and with -shared. For the layouts to match,
25 * we need to skip more than enough space for the dynamic symbol table et al. If this
26 * amount is insufficient, ld -shared will barf. Just increase it here.
27 */
28 . = GATE_ADDR + 0x500;
30 .data.patch : {
31 __start_gate_mckinley_e9_patchlist = .;
32 *(.data.patch.mckinley_e9)
33 __end_gate_mckinley_e9_patchlist = .;
35 __start_gate_vtop_patchlist = .;
36 *(.data.patch.vtop)
37 __end_gate_vtop_patchlist = .;
39 __start_gate_fsyscall_patchlist = .;
40 *(.data.patch.fsyscall_table)
41 __end_gate_fsyscall_patchlist = .;
43 __start_gate_brl_fsys_bubble_down_patchlist = .;
44 *(.data.patch.brl_fsys_bubble_down)
45 __end_gate_brl_fsys_bubble_down_patchlist = .;
47 #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
48 __start_gate_running_on_xen_patchlist = .;
49 *(.data.patch.running_on_xen)
50 __end_gate_running_on_xen_patchlist = .;
52 __start_gate_brl_xen_rsm_be_i_patchlist = .;
53 *(.data.patch.brl_xen_rsm_be_i)
54 __end_gate_brl_xen_rsm_be_i_patchlist = .;
56 __start_gate_brl_xen_get_psr_patchlist = .;
57 *(.data.patch.brl_xen_get_psr)
58 __end_gate_brl_xen_get_psr_patchlist = .;
60 __start_gate_brl_xen_ssm_i_0_patchlist = .;
61 *(.data.patch.brl_xen_ssm_i_0)
62 __end_gate_brl_xen_ssm_i_0_patchlist = .;
64 __start_gate_brl_xen_ssm_i_1_patchlist = .;
65 *(.data.patch.brl_xen_ssm_i_1)
66 __end_gate_brl_xen_ssm_i_1_patchlist = .;
67 #endif
68 } :readable
69 .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
70 .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind
71 #ifdef HAVE_BUGGY_SEGREL
72 .text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) } :readable
73 #else
74 . = ALIGN (PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1));
75 .text : { *(.text) *(.text.*) } :epc
76 #endif
78 /DISCARD/ : {
79 *(.got.plt) *(.got)
80 *(.data .data.* .gnu.linkonce.d.*)
81 *(.dynbss)
82 *(.bss .bss.* .gnu.linkonce.b.*)
83 *(__ex_table)
84 }
85 }
87 /*
88 * We must supply the ELF program headers explicitly to get just one
89 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
90 */
91 PHDRS
92 {
93 readable PT_LOAD FILEHDR PHDRS FLAGS(4); /* PF_R */
94 #ifndef HAVE_BUGGY_SEGREL
95 epc PT_LOAD FILEHDR PHDRS FLAGS(1); /* PF_X */
96 #endif
97 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
98 unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */
99 }
101 /*
102 * This controls what symbols we export from the DSO.
103 */
104 VERSION
105 {
106 LINUX_2.5 {
107 global:
108 __kernel_syscall_via_break;
109 __kernel_syscall_via_epc;
110 __kernel_sigtramp;
112 local: *;
113 };
114 }
116 /* The ELF entry point can be used to set the AT_SYSINFO value. */
117 ENTRY(__kernel_syscall_via_epc)