ia64/xen-unstable

view linux-2.6-xen-sparse/arch/ia64/kernel/gate.lds.S @ 11820:c13c3bd7f3b5

[IA64] backport toolchain fixes from linux-ia64

This backports the ia64 specific parts of this upstream linux
changeset:

http://www.kernel.org/hg/linux-2.6/?cs=dfbee33b0693

Change suggested by Akio Takebe.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Wed Oct 18 22:06:23 2006 -0600 (2006-10-18)
parents 8d501f39286c
children 99ff540b0efe 4fad820a2233
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 .gnu.hash : { *(.gnu.hash) }
17 .dynsym : { *(.dynsym) }
18 .dynstr : { *(.dynstr) }
19 .gnu.version : { *(.gnu.version) }
20 .gnu.version_d : { *(.gnu.version_d) }
21 .gnu.version_r : { *(.gnu.version_r) }
22 .dynamic : { *(.dynamic) } :readable :dynamic
24 /*
25 * This linker script is used both with -r and with -shared. For the layouts to match,
26 * we need to skip more than enough space for the dynamic symbol table et al. If this
27 * amount is insufficient, ld -shared will barf. Just increase it here.
28 */
29 . = GATE_ADDR + 0x500;
31 .data.patch : {
32 __start_gate_mckinley_e9_patchlist = .;
33 *(.data.patch.mckinley_e9)
34 __end_gate_mckinley_e9_patchlist = .;
36 __start_gate_vtop_patchlist = .;
37 *(.data.patch.vtop)
38 __end_gate_vtop_patchlist = .;
40 __start_gate_fsyscall_patchlist = .;
41 *(.data.patch.fsyscall_table)
42 __end_gate_fsyscall_patchlist = .;
44 __start_gate_brl_fsys_bubble_down_patchlist = .;
45 *(.data.patch.brl_fsys_bubble_down)
46 __end_gate_brl_fsys_bubble_down_patchlist = .;
48 #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
49 __start_gate_running_on_xen_patchlist = .;
50 *(.data.patch.running_on_xen)
51 __end_gate_running_on_xen_patchlist = .;
53 __start_gate_brl_xen_rsm_be_i_patchlist = .;
54 *(.data.patch.brl_xen_rsm_be_i)
55 __end_gate_brl_xen_rsm_be_i_patchlist = .;
57 __start_gate_brl_xen_get_psr_patchlist = .;
58 *(.data.patch.brl_xen_get_psr)
59 __end_gate_brl_xen_get_psr_patchlist = .;
61 __start_gate_brl_xen_ssm_i_0_patchlist = .;
62 *(.data.patch.brl_xen_ssm_i_0)
63 __end_gate_brl_xen_ssm_i_0_patchlist = .;
65 __start_gate_brl_xen_ssm_i_1_patchlist = .;
66 *(.data.patch.brl_xen_ssm_i_1)
67 __end_gate_brl_xen_ssm_i_1_patchlist = .;
68 #endif
69 } :readable
70 .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
71 .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind
72 #ifdef HAVE_BUGGY_SEGREL
73 .text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) } :readable
74 #else
75 . = ALIGN (PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1));
76 .text : { *(.text) *(.text.*) } :epc
77 #endif
79 /DISCARD/ : {
80 *(.got.plt) *(.got)
81 *(.data .data.* .gnu.linkonce.d.*)
82 *(.dynbss)
83 *(.bss .bss.* .gnu.linkonce.b.*)
84 *(__ex_table)
85 }
86 }
88 /*
89 * We must supply the ELF program headers explicitly to get just one
90 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
91 */
92 PHDRS
93 {
94 readable PT_LOAD FILEHDR PHDRS FLAGS(4); /* PF_R */
95 #ifndef HAVE_BUGGY_SEGREL
96 epc PT_LOAD FILEHDR PHDRS FLAGS(1); /* PF_X */
97 #endif
98 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
99 unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */
100 }
102 /*
103 * This controls what symbols we export from the DSO.
104 */
105 VERSION
106 {
107 LINUX_2.5 {
108 global:
109 __kernel_syscall_via_break;
110 __kernel_syscall_via_epc;
111 __kernel_sigtramp;
113 local: *;
114 };
115 }
117 /* The ELF entry point can be used to set the AT_SYSINFO value. */
118 ENTRY(__kernel_syscall_via_epc)