blob: 83e80677de707c42776fe85bc7f38dce58219e0f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2#include <asm/cache.h>
3#include <asm/ptrace.h>
4#include <asm/system.h>
5#include <asm/pgtable.h>
6
7#define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE)
8#include <asm-generic/vmlinux.lds.h>
9
Keshavamurthy Anil Sc7b645f2005-06-27 15:17:16 -070010#define IVT_TEXT \
11 VMLINUX_SYMBOL(__start_ivt_text) = .; \
12 *(.text.ivt) \
13 VMLINUX_SYMBOL(__end_ivt_text) = .;
14
Linus Torvalds1da177e2005-04-16 15:20:36 -070015OUTPUT_FORMAT("elf64-ia64-little")
16OUTPUT_ARCH(ia64)
17ENTRY(phys_start)
18jiffies = jiffies_64;
19PHDRS {
20 code PT_LOAD;
21 percpu PT_LOAD;
22 data PT_LOAD;
23}
24SECTIONS
25{
26 /* Sections to be discarded */
27 /DISCARD/ : {
28 *(.exit.text)
29 *(.exit.data)
30 *(.exitcall.exit)
31 *(.IA_64.unwind.exit.text)
32 *(.IA_64.unwind_info.exit.text)
33 }
34
35 v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */
36 phys_start = _start - LOAD_OFFSET;
37
38 code : { } :code
39 . = KERNEL_START;
40
41 _text = .;
42 _stext = .;
43
44 .text : AT(ADDR(.text) - LOAD_OFFSET)
45 {
Keshavamurthy Anil Sc7b645f2005-06-27 15:17:16 -070046 IVT_TEXT
Sam Ravnborg76647092007-05-13 00:31:33 +020047 TEXT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070048 SCHED_TEXT
49 LOCK_TEXT
Prasanna S Panchamukhi1f7ad572005-09-06 15:19:30 -070050 KPROBES_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070051 *(.gnu.linkonce.t*)
52 }
Tony Luck9d6f40b2007-07-20 14:39:24 -070053 .text.head : AT(ADDR(.text.head) - LOAD_OFFSET)
54 { *(.text.head) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070055 .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
56 { *(.text2) }
57#ifdef CONFIG_SMP
58 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET)
59 { *(.text.lock) }
60#endif
61 _etext = .;
62
63 /* Read-only data */
64
65 /* Exception table */
66 . = ALIGN(16);
67 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
68 {
69 __start___ex_table = .;
70 *(__ex_table)
71 __stop___ex_table = .;
72 }
73
Russ Andersond89cfe72006-03-29 11:31:23 -060074 /* MCA table */
75 . = ALIGN(16);
76 __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
77 {
78 __start___mca_table = .;
79 *(__mca_table)
80 __stop___mca_table = .;
81 }
82
Chen, Kenneth Wa0776ec2006-10-13 10:05:45 -070083 .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET)
84 {
85 __start___phys_stack_reg_patchlist = .;
86 *(.data.patch.phys_stack_reg)
87 __end___phys_stack_reg_patchlist = .;
88 }
89
Linus Torvalds1da177e2005-04-16 15:20:36 -070090 /* Global data */
91 _data = .;
92
Linus Torvalds1da177e2005-04-16 15:20:36 -070093 /* Unwind info & table: */
94 . = ALIGN(8);
95 .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET)
96 { *(.IA_64.unwind_info*) }
97 .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET)
98 {
99 __start_unwind = .;
100 *(.IA_64.unwind*)
101 __end_unwind = .;
102 }
103
104 RODATA
105
106 .opd : AT(ADDR(.opd) - LOAD_OFFSET)
107 { *(.opd) }
108
109 /* Initialization code and data: */
110
111 . = ALIGN(PAGE_SIZE);
112 __init_begin = .;
113 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
114 {
115 _sinittext = .;
116 *(.init.text)
117 _einittext = .;
118 }
119
120 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
121 { *(.init.data) }
122
Jean-Paul Saman67d38222007-02-10 01:44:44 -0800123#ifdef CONFIG_BLK_DEV_INITRD
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
125 {
126 __initramfs_start = .;
127 *(.init.ramfs)
128 __initramfs_end = .;
129 }
Jean-Paul Saman67d38222007-02-10 01:44:44 -0800130#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131
132 . = ALIGN(16);
133 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
134 {
135 __setup_start = .;
136 *(.init.setup)
137 __setup_end = .;
138 }
139 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
140 {
141 __initcall_start = .;
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700142 INITCALLS
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143 __initcall_end = .;
144 }
Chen, Kenneth W39e18de2006-03-12 09:20:27 -0800145
146 .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
147 {
148 __start___vtop_patchlist = .;
149 *(.data.patch.vtop)
150 __end___vtop_patchlist = .;
151 }
152
153 .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
154 {
155 __start___mckinley_e9_bundles = .;
156 *(.data.patch.mckinley_e9)
157 __end___mckinley_e9_bundles = .;
158 }
159
160#if defined(CONFIG_IA64_GENERIC)
161 /* Machine Vector */
162 . = ALIGN(16);
163 .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
164 {
165 machvec_start = .;
166 *(.machvec)
167 machvec_end = .;
168 }
169#endif
170
Kirill Korotaevd00195e2007-02-05 16:19:59 -0800171 . = ALIGN(8);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700172 __con_initcall_start = .;
173 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
174 { *(.con_initcall.init) }
175 __con_initcall_end = .;
176 __security_initcall_start = .;
177 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
178 { *(.security_initcall.init) }
179 __security_initcall_end = .;
180 . = ALIGN(PAGE_SIZE);
181 __init_end = .;
182
183 /* The initial task and kernel stack */
184 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
185 { *(.data.init_task) }
186
187 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
188 { *(__special_page_section)
189 __start_gate_section = .;
190 *(.data.gate)
191 __stop_gate_section = .;
192 }
Al Stonedf8f0ec2006-08-12 11:08:12 -0600193 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
194 * kernel data
195 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
Christoph Lameterdc86e882005-12-12 09:34:32 -0800197 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
198 { *(.data.read_mostly) }
199
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
201 { *(.data.cacheline_aligned) }
202
203 /* Per-cpu data: */
204 percpu : { } :percpu
205 . = ALIGN(PERCPU_PAGE_SIZE);
206 __phys_per_cpu_start = .;
207 .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
208 {
209 __per_cpu_start = .;
210 *(.data.percpu)
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700211 *(.data.percpu.shared_aligned)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700212 __per_cpu_end = .;
213 }
Al Stonedf8f0ec2006-08-12 11:08:12 -0600214 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
215 * into percpu page size
216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217
218 data : { } :data
219 .data : AT(ADDR(.data) - LOAD_OFFSET)
Sam Ravnborgca967252007-05-17 13:38:44 +0200220 {
221 DATA_DATA
222 *(.data1)
223 *(.gnu.linkonce.d*)
224 CONSTRUCTORS
225 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226
227 . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
228 .got : AT(ADDR(.got) - LOAD_OFFSET)
229 { *(.got.plt) *(.got) }
230 __gp = ADDR(.got) + 0x200000;
231 /* We want the small data sections together, so single-instruction offsets
232 can access them all, and initialized data all before uninitialized, so
233 we can shorten the on-disk segment size. */
234 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
235 { *(.sdata) *(.sdata1) *(.srdata) }
236 _edata = .;
237 _bss = .;
238 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET)
239 { *(.sbss) *(.scommon) }
240 .bss : AT(ADDR(.bss) - LOAD_OFFSET)
241 { *(.bss) *(COMMON) }
242
243 _end = .;
244
245 code : { } :code
246 /* Stabs debugging sections. */
247 .stab 0 : { *(.stab) }
248 .stabstr 0 : { *(.stabstr) }
249 .stab.excl 0 : { *(.stab.excl) }
250 .stab.exclstr 0 : { *(.stab.exclstr) }
251 .stab.index 0 : { *(.stab.index) }
252 .stab.indexstr 0 : { *(.stab.indexstr) }
253 /* DWARF debug sections.
254 Symbols in the DWARF debugging sections are relative to the beginning
255 of the section so we begin them at 0. */
256 /* DWARF 1 */
257 .debug 0 : { *(.debug) }
258 .line 0 : { *(.line) }
259 /* GNU DWARF 1 extensions */
260 .debug_srcinfo 0 : { *(.debug_srcinfo) }
261 .debug_sfnames 0 : { *(.debug_sfnames) }
262 /* DWARF 1.1 and DWARF 2 */
263 .debug_aranges 0 : { *(.debug_aranges) }
264 .debug_pubnames 0 : { *(.debug_pubnames) }
265 /* DWARF 2 */
266 .debug_info 0 : { *(.debug_info) }
267 .debug_abbrev 0 : { *(.debug_abbrev) }
268 .debug_line 0 : { *(.debug_line) }
269 .debug_frame 0 : { *(.debug_frame) }
270 .debug_str 0 : { *(.debug_str) }
271 .debug_loc 0 : { *(.debug_loc) }
272 .debug_macinfo 0 : { *(.debug_macinfo) }
273 /* SGI/MIPS DWARF 2 extensions */
274 .debug_weaknames 0 : { *(.debug_weaknames) }
275 .debug_funcnames 0 : { *(.debug_funcnames) }
276 .debug_typenames 0 : { *(.debug_typenames) }
277 .debug_varnames 0 : { *(.debug_varnames) }
278 /* These must appear regardless of . */
279 /* Discard them for now since Intel SoftSDV cannot handle them.
280 .comment 0 : { *(.comment) }
281 .note 0 : { *(.note) }
282 */
283 /DISCARD/ : { *(.comment) }
284 /DISCARD/ : { *(.note) }
285}