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