Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | |
2 | #include <asm/cache.h> | |
3 | #include <asm/ptrace.h> | |
4 | #include <asm/system.h> | |
5 | #include <asm/pgtable.h> | |
6 | ||
1da177e4 LT |
7 | #include <asm-generic/vmlinux.lds.h> |
8 | ||
c7b645f9 KA |
9 | #define IVT_TEXT \ |
10 | VMLINUX_SYMBOL(__start_ivt_text) = .; \ | |
11 | *(.text.ivt) \ | |
12 | VMLINUX_SYMBOL(__end_ivt_text) = .; | |
13 | ||
1da177e4 LT |
14 | OUTPUT_FORMAT("elf64-ia64-little") |
15 | OUTPUT_ARCH(ia64) | |
16 | ENTRY(phys_start) | |
17 | jiffies = jiffies_64; | |
18 | PHDRS { | |
19 | code PT_LOAD; | |
20 | percpu PT_LOAD; | |
21 | data PT_LOAD; | |
336cdba8 | 22 | note PT_NOTE; |
9bf77d0e | 23 | unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */ |
1da177e4 LT |
24 | } |
25 | SECTIONS | |
26 | { | |
27 | /* Sections to be discarded */ | |
28 | /DISCARD/ : { | |
01ba2bdc SR |
29 | EXIT_TEXT |
30 | EXIT_DATA | |
1da177e4 LT |
31 | *(.exitcall.exit) |
32 | *(.IA_64.unwind.exit.text) | |
33 | *(.IA_64.unwind_info.exit.text) | |
34 | } | |
35 | ||
36 | v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */ | |
37 | phys_start = _start - LOAD_OFFSET; | |
38 | ||
39 | code : { } :code | |
40 | . = KERNEL_START; | |
41 | ||
42 | _text = .; | |
43 | _stext = .; | |
44 | ||
45 | .text : AT(ADDR(.text) - LOAD_OFFSET) | |
46 | { | |
c7b645f9 | 47 | IVT_TEXT |
7664709b | 48 | TEXT_TEXT |
1da177e4 LT |
49 | SCHED_TEXT |
50 | LOCK_TEXT | |
1f7ad57b | 51 | KPROBES_TEXT |
1da177e4 LT |
52 | *(.gnu.linkonce.t*) |
53 | } | |
54 | .text2 : AT(ADDR(.text2) - LOAD_OFFSET) | |
55 | { *(.text2) } | |
56 | #ifdef CONFIG_SMP | |
57 | .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) | |
58 | { *(.text.lock) } | |
59 | #endif | |
60 | _etext = .; | |
61 | ||
62 | /* Read-only data */ | |
63 | ||
336cdba8 DMT |
64 | NOTES :code :note /* put .notes in text and mark in PT_NOTE */ |
65 | code_continues : {} :code /* switch back to regular program... */ | |
66 | ||
1da177e4 LT |
67 | /* Exception table */ |
68 | . = ALIGN(16); | |
69 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) | |
70 | { | |
71 | __start___ex_table = .; | |
72 | *(__ex_table) | |
73 | __stop___ex_table = .; | |
74 | } | |
75 | ||
d89cfe7f RA |
76 | /* MCA table */ |
77 | . = ALIGN(16); | |
78 | __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET) | |
79 | { | |
80 | __start___mca_table = .; | |
81 | *(__mca_table) | |
82 | __stop___mca_table = .; | |
83 | } | |
84 | ||
a0776ec8 CK |
85 | .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET) |
86 | { | |
87 | __start___phys_stack_reg_patchlist = .; | |
88 | *(.data.patch.phys_stack_reg) | |
89 | __end___phys_stack_reg_patchlist = .; | |
90 | } | |
91 | ||
1da177e4 LT |
92 | /* Global data */ |
93 | _data = .; | |
94 | ||
1da177e4 LT |
95 | /* Unwind info & table: */ |
96 | . = ALIGN(8); | |
97 | .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET) | |
98 | { *(.IA_64.unwind_info*) } | |
99 | .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET) | |
100 | { | |
101 | __start_unwind = .; | |
102 | *(.IA_64.unwind*) | |
103 | __end_unwind = .; | |
9bf77d0e DMT |
104 | } :code :unwind |
105 | code_continues2 : {} : code | |
1da177e4 LT |
106 | |
107 | RODATA | |
108 | ||
109 | .opd : AT(ADDR(.opd) - LOAD_OFFSET) | |
110 | { *(.opd) } | |
111 | ||
112 | /* Initialization code and data: */ | |
113 | ||
114 | . = ALIGN(PAGE_SIZE); | |
115 | __init_begin = .; | |
116 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) | |
117 | { | |
118 | _sinittext = .; | |
01ba2bdc | 119 | INIT_TEXT |
1da177e4 LT |
120 | _einittext = .; |
121 | } | |
122 | ||
123 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) | |
01ba2bdc | 124 | { INIT_DATA } |
1da177e4 | 125 | |
67d38229 | 126 | #ifdef CONFIG_BLK_DEV_INITRD |
1da177e4 LT |
127 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) |
128 | { | |
129 | __initramfs_start = .; | |
130 | *(.init.ramfs) | |
131 | __initramfs_end = .; | |
132 | } | |
67d38229 | 133 | #endif |
1da177e4 LT |
134 | |
135 | . = ALIGN(16); | |
136 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) | |
137 | { | |
138 | __setup_start = .; | |
139 | *(.init.setup) | |
140 | __setup_end = .; | |
141 | } | |
142 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) | |
143 | { | |
144 | __initcall_start = .; | |
61ce1efe | 145 | INITCALLS |
1da177e4 LT |
146 | __initcall_end = .; |
147 | } | |
39e18de8 CK |
148 | |
149 | .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) | |
150 | { | |
151 | __start___vtop_patchlist = .; | |
152 | *(.data.patch.vtop) | |
153 | __end___vtop_patchlist = .; | |
154 | } | |
155 | ||
4dcc29e1 TL |
156 | .data.patch.rse : AT(ADDR(.data.patch.rse) - LOAD_OFFSET) |
157 | { | |
158 | __start___rse_patchlist = .; | |
159 | *(.data.patch.rse) | |
160 | __end___rse_patchlist = .; | |
161 | } | |
162 | ||
39e18de8 CK |
163 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) |
164 | { | |
165 | __start___mckinley_e9_bundles = .; | |
166 | *(.data.patch.mckinley_e9) | |
167 | __end___mckinley_e9_bundles = .; | |
168 | } | |
169 | ||
bf7ab02f IY |
170 | #if defined(CONFIG_PARAVIRT) |
171 | . = ALIGN(16); | |
172 | .paravirt_bundles : AT(ADDR(.paravirt_bundles) - LOAD_OFFSET) | |
173 | { | |
174 | __start_paravirt_bundles = .; | |
175 | *(.paravirt_bundles) | |
176 | __stop_paravirt_bundles = .; | |
177 | } | |
178 | . = ALIGN(16); | |
179 | .paravirt_insts : AT(ADDR(.paravirt_insts) - LOAD_OFFSET) | |
180 | { | |
181 | __start_paravirt_insts = .; | |
182 | *(.paravirt_insts) | |
183 | __stop_paravirt_insts = .; | |
184 | } | |
185 | . = ALIGN(16); | |
186 | .paravirt_branches : AT(ADDR(.paravirt_branches) - LOAD_OFFSET) | |
187 | { | |
188 | __start_paravirt_branches = .; | |
189 | *(.paravirt_branches) | |
190 | __stop_paravirt_branches = .; | |
191 | } | |
192 | #endif | |
193 | ||
39e18de8 CK |
194 | #if defined(CONFIG_IA64_GENERIC) |
195 | /* Machine Vector */ | |
196 | . = ALIGN(16); | |
197 | .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) | |
198 | { | |
199 | machvec_start = .; | |
200 | *(.machvec) | |
201 | machvec_end = .; | |
202 | } | |
203 | #endif | |
204 | ||
d00195eb | 205 | . = ALIGN(8); |
1da177e4 LT |
206 | __con_initcall_start = .; |
207 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) | |
208 | { *(.con_initcall.init) } | |
209 | __con_initcall_end = .; | |
210 | __security_initcall_start = .; | |
211 | .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) | |
212 | { *(.security_initcall.init) } | |
213 | __security_initcall_end = .; | |
214 | . = ALIGN(PAGE_SIZE); | |
215 | __init_end = .; | |
216 | ||
217 | /* The initial task and kernel stack */ | |
218 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) | |
219 | { *(.data.init_task) } | |
220 | ||
221 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) | |
222 | { *(__special_page_section) | |
223 | __start_gate_section = .; | |
224 | *(.data.gate) | |
225 | __stop_gate_section = .; | |
b937dd76 IY |
226 | #ifdef CONFIG_XEN |
227 | . = ALIGN(PAGE_SIZE); | |
228 | __xen_start_gate_section = .; | |
229 | *(.data.gate.xen) | |
230 | __xen_stop_gate_section = .; | |
231 | #endif | |
1da177e4 | 232 | } |
df8f0ec1 AS |
233 | . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose |
234 | * kernel data | |
235 | */ | |
1da177e4 | 236 | |
dc86e88c CL |
237 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) |
238 | { *(.data.read_mostly) } | |
239 | ||
1da177e4 LT |
240 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) |
241 | { *(.data.cacheline_aligned) } | |
242 | ||
243 | /* Per-cpu data: */ | |
1da177e4 | 244 | . = ALIGN(PERCPU_PAGE_SIZE); |
19390c4d TH |
245 | PERCPU_VADDR(PERCPU_ADDR, :percpu) |
246 | __phys_per_cpu_start = __per_cpu_load; | |
df8f0ec1 AS |
247 | . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits |
248 | * into percpu page size | |
249 | */ | |
1da177e4 LT |
250 | |
251 | data : { } :data | |
252 | .data : AT(ADDR(.data) - LOAD_OFFSET) | |
ca967258 | 253 | { |
c459ce8b TL |
254 | #ifdef CONFIG_SMP |
255 | . = ALIGN(PERCPU_PAGE_SIZE); | |
256 | __cpu0_per_cpu = .; | |
257 | . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ | |
258 | #endif | |
ca967258 SR |
259 | DATA_DATA |
260 | *(.data1) | |
261 | *(.gnu.linkonce.d*) | |
262 | CONSTRUCTORS | |
263 | } | |
1da177e4 LT |
264 | |
265 | . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */ | |
266 | .got : AT(ADDR(.got) - LOAD_OFFSET) | |
267 | { *(.got.plt) *(.got) } | |
268 | __gp = ADDR(.got) + 0x200000; | |
269 | /* We want the small data sections together, so single-instruction offsets | |
270 | can access them all, and initialized data all before uninitialized, so | |
271 | we can shorten the on-disk segment size. */ | |
272 | .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) | |
273 | { *(.sdata) *(.sdata1) *(.srdata) } | |
274 | _edata = .; | |
b898a424 | 275 | __bss_start = .; |
1da177e4 LT |
276 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) |
277 | { *(.sbss) *(.scommon) } | |
278 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) | |
279 | { *(.bss) *(COMMON) } | |
b898a424 | 280 | __bss_stop = .; |
1da177e4 LT |
281 | |
282 | _end = .; | |
283 | ||
284 | code : { } :code | |
285 | /* Stabs debugging sections. */ | |
286 | .stab 0 : { *(.stab) } | |
287 | .stabstr 0 : { *(.stabstr) } | |
288 | .stab.excl 0 : { *(.stab.excl) } | |
289 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
290 | .stab.index 0 : { *(.stab.index) } | |
291 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
292 | /* DWARF debug sections. | |
293 | Symbols in the DWARF debugging sections are relative to the beginning | |
294 | of the section so we begin them at 0. */ | |
295 | /* DWARF 1 */ | |
296 | .debug 0 : { *(.debug) } | |
297 | .line 0 : { *(.line) } | |
298 | /* GNU DWARF 1 extensions */ | |
299 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
300 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
301 | /* DWARF 1.1 and DWARF 2 */ | |
302 | .debug_aranges 0 : { *(.debug_aranges) } | |
303 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
304 | /* DWARF 2 */ | |
305 | .debug_info 0 : { *(.debug_info) } | |
306 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
307 | .debug_line 0 : { *(.debug_line) } | |
308 | .debug_frame 0 : { *(.debug_frame) } | |
309 | .debug_str 0 : { *(.debug_str) } | |
310 | .debug_loc 0 : { *(.debug_loc) } | |
311 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
312 | /* SGI/MIPS DWARF 2 extensions */ | |
313 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
314 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
315 | .debug_typenames 0 : { *(.debug_typenames) } | |
316 | .debug_varnames 0 : { *(.debug_varnames) } | |
317 | /* These must appear regardless of . */ | |
1da177e4 LT |
318 | /DISCARD/ : { *(.comment) } |
319 | /DISCARD/ : { *(.note) } | |
320 | } |