]>
Commit | Line | Data |
---|---|---|
1da177e4 | 1 | /* |
1a43be74 RM |
2 | * Linker script for gate DSO. The gate pages are an ELF shared object |
3 | * prelinked to its virtual address, with only one read-only segment and | |
4 | * one execute-only segment (both fit in one page). This script controls | |
5 | * its layout. | |
1da177e4 LT |
6 | */ |
7 | ||
c140d879 | 8 | #include <asm/page.h> |
e4ff5b8f | 9 | #include "paravirt_patchlist.h" |
1da177e4 LT |
10 | |
11 | SECTIONS | |
12 | { | |
1a43be74 RM |
13 | . = GATE_ADDR + SIZEOF_HEADERS; |
14 | ||
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 | ||
172c5106 RM |
23 | .note : { *(.note*) } :readable :note |
24 | ||
1a43be74 RM |
25 | .dynamic : { *(.dynamic) } :readable :dynamic |
26 | ||
27 | /* | |
28 | * This linker script is used both with -r and with -shared. For | |
29 | * the layouts to match, we need to skip more than enough space for | |
30 | * the dynamic symbol table et al. If this amount is insufficient, | |
31 | * ld -shared will barf. Just increase it here. | |
32 | */ | |
1f0abae8 | 33 | . = GATE_ADDR + 0x600; |
1a43be74 | 34 | |
dafb9320 | 35 | .data..patch : { |
e4ff5b8f | 36 | __paravirt_start_gate_mckinley_e9_patchlist = .; |
dafb9320 | 37 | *(.data..patch.mckinley_e9) |
e4ff5b8f | 38 | __paravirt_end_gate_mckinley_e9_patchlist = .; |
1a43be74 | 39 | |
e4ff5b8f | 40 | __paravirt_start_gate_vtop_patchlist = .; |
dafb9320 | 41 | *(.data..patch.vtop) |
e4ff5b8f | 42 | __paravirt_end_gate_vtop_patchlist = .; |
1a43be74 | 43 | |
e4ff5b8f | 44 | __paravirt_start_gate_fsyscall_patchlist = .; |
dafb9320 | 45 | *(.data..patch.fsyscall_table) |
e4ff5b8f | 46 | __paravirt_end_gate_fsyscall_patchlist = .; |
1a43be74 | 47 | |
e4ff5b8f | 48 | __paravirt_start_gate_brl_fsys_bubble_down_patchlist = .; |
dafb9320 | 49 | *(.data..patch.brl_fsys_bubble_down) |
e4ff5b8f | 50 | __paravirt_end_gate_brl_fsys_bubble_down_patchlist = .; |
1a43be74 RM |
51 | } :readable |
52 | ||
53 | .IA_64.unwind_info : { *(.IA_64.unwind_info*) } | |
54 | .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind | |
1da177e4 | 55 | #ifdef HAVE_BUGGY_SEGREL |
1a43be74 | 56 | .text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) } :readable |
1da177e4 | 57 | #else |
1a43be74 RM |
58 | . = ALIGN(PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1)); |
59 | .text : { *(.text) *(.text.*) } :epc | |
1da177e4 LT |
60 | #endif |
61 | ||
1a43be74 RM |
62 | /DISCARD/ : { |
63 | *(.got.plt) *(.got) | |
64 | *(.data .data.* .gnu.linkonce.d.*) | |
65 | *(.dynbss) | |
66 | *(.bss .bss.* .gnu.linkonce.b.*) | |
67 | *(__ex_table) | |
68 | *(__mca_table) | |
69 | } | |
1da177e4 LT |
70 | } |
71 | ||
1a43be74 RM |
72 | /* |
73 | * ld does not recognize this name token; use the constant. | |
74 | */ | |
75 | #define PT_IA_64_UNWIND 0x70000001 | |
76 | ||
1da177e4 LT |
77 | /* |
78 | * We must supply the ELF program headers explicitly to get just one | |
79 | * PT_LOAD segment, and set the flags explicitly to make segments read-only. | |
80 | */ | |
81 | PHDRS | |
82 | { | |
1a43be74 | 83 | readable PT_LOAD FILEHDR PHDRS FLAGS(4); /* PF_R */ |
1da177e4 | 84 | #ifndef HAVE_BUGGY_SEGREL |
1a43be74 | 85 | epc PT_LOAD FILEHDR PHDRS FLAGS(1); /* PF_X */ |
1da177e4 | 86 | #endif |
1a43be74 | 87 | dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ |
172c5106 | 88 | note PT_NOTE FLAGS(4); /* PF_R */ |
1a43be74 | 89 | unwind PT_IA_64_UNWIND; |
1da177e4 LT |
90 | } |
91 | ||
92 | /* | |
93 | * This controls what symbols we export from the DSO. | |
94 | */ | |
95 | VERSION | |
96 | { | |
1a43be74 RM |
97 | LINUX_2.5 { |
98 | global: | |
99 | __kernel_syscall_via_break; | |
100 | __kernel_syscall_via_epc; | |
101 | __kernel_sigtramp; | |
102 | ||
103 | local: *; | |
104 | }; | |
1da177e4 LT |
105 | } |
106 | ||
107 | /* The ELF entry point can be used to set the AT_SYSINFO value. */ | |
108 | ENTRY(__kernel_syscall_via_epc) |