blob: b3b2e389d6b2e2abc690f37e7e62bb39127afaba [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
Linus Torvalds1da177e2005-04-16 15:20:36 -070047 *(.text)
48 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 }
53 .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
54 { *(.text2) }
55#ifdef CONFIG_SMP
56 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET)
57 { *(.text.lock) }
58#endif
59 _etext = .;
60
61 /* Read-only data */
62
63 /* Exception table */
64 . = ALIGN(16);
65 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
66 {
67 __start___ex_table = .;
68 *(__ex_table)
69 __stop___ex_table = .;
70 }
71
Russ Andersond89cfe72006-03-29 11:31:23 -060072 /* MCA table */
73 . = ALIGN(16);
74 __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
75 {
76 __start___mca_table = .;
77 *(__mca_table)
78 __stop___mca_table = .;
79 }
80
Linus Torvalds1da177e2005-04-16 15:20:36 -070081 /* Global data */
82 _data = .;
83
Linus Torvalds1da177e2005-04-16 15:20:36 -070084 /* Unwind info & table: */
85 . = ALIGN(8);
86 .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET)
87 { *(.IA_64.unwind_info*) }
88 .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET)
89 {
90 __start_unwind = .;
91 *(.IA_64.unwind*)
92 __end_unwind = .;
93 }
94
95 RODATA
96
97 .opd : AT(ADDR(.opd) - LOAD_OFFSET)
98 { *(.opd) }
99
100 /* Initialization code and data: */
101
102 . = ALIGN(PAGE_SIZE);
103 __init_begin = .;
104 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
105 {
106 _sinittext = .;
107 *(.init.text)
108 _einittext = .;
109 }
110
111 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
112 { *(.init.data) }
113
114 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
115 {
116 __initramfs_start = .;
117 *(.init.ramfs)
118 __initramfs_end = .;
119 }
120
121 . = ALIGN(16);
122 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
123 {
124 __setup_start = .;
125 *(.init.setup)
126 __setup_end = .;
127 }
128 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
129 {
130 __initcall_start = .;
131 *(.initcall1.init)
132 *(.initcall2.init)
133 *(.initcall3.init)
134 *(.initcall4.init)
135 *(.initcall5.init)
136 *(.initcall6.init)
137 *(.initcall7.init)
138 __initcall_end = .;
139 }
Chen, Kenneth W39e18de2006-03-12 09:20:27 -0800140
141 .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
142 {
143 __start___vtop_patchlist = .;
144 *(.data.patch.vtop)
145 __end___vtop_patchlist = .;
146 }
147
148 .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
149 {
150 __start___mckinley_e9_bundles = .;
151 *(.data.patch.mckinley_e9)
152 __end___mckinley_e9_bundles = .;
153 }
154
155#if defined(CONFIG_IA64_GENERIC)
156 /* Machine Vector */
157 . = ALIGN(16);
158 .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
159 {
160 machvec_start = .;
161 *(.machvec)
162 machvec_end = .;
163 }
164#endif
165
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166 __con_initcall_start = .;
167 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
168 { *(.con_initcall.init) }
169 __con_initcall_end = .;
170 __security_initcall_start = .;
171 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
172 { *(.security_initcall.init) }
173 __security_initcall_end = .;
174 . = ALIGN(PAGE_SIZE);
175 __init_end = .;
176
177 /* The initial task and kernel stack */
178 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
179 { *(.data.init_task) }
180
181 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
182 { *(__special_page_section)
183 __start_gate_section = .;
184 *(.data.gate)
185 __stop_gate_section = .;
186 }
Al Stonedf8f0ec2006-08-12 11:08:12 -0600187 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
188 * kernel data
189 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700190
Christoph Lameterdc86e882005-12-12 09:34:32 -0800191 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
192 { *(.data.read_mostly) }
193
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
195 { *(.data.cacheline_aligned) }
196
197 /* Per-cpu data: */
198 percpu : { } :percpu
199 . = ALIGN(PERCPU_PAGE_SIZE);
200 __phys_per_cpu_start = .;
201 .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
202 {
203 __per_cpu_start = .;
204 *(.data.percpu)
205 __per_cpu_end = .;
206 }
Al Stonedf8f0ec2006-08-12 11:08:12 -0600207 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
208 * into percpu page size
209 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210
211 data : { } :data
212 .data : AT(ADDR(.data) - LOAD_OFFSET)
213 { *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS }
214
215 . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
216 .got : AT(ADDR(.got) - LOAD_OFFSET)
217 { *(.got.plt) *(.got) }
218 __gp = ADDR(.got) + 0x200000;
219 /* We want the small data sections together, so single-instruction offsets
220 can access them all, and initialized data all before uninitialized, so
221 we can shorten the on-disk segment size. */
222 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
223 { *(.sdata) *(.sdata1) *(.srdata) }
224 _edata = .;
225 _bss = .;
226 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET)
227 { *(.sbss) *(.scommon) }
228 .bss : AT(ADDR(.bss) - LOAD_OFFSET)
229 { *(.bss) *(COMMON) }
230
231 _end = .;
232
233 code : { } :code
234 /* Stabs debugging sections. */
235 .stab 0 : { *(.stab) }
236 .stabstr 0 : { *(.stabstr) }
237 .stab.excl 0 : { *(.stab.excl) }
238 .stab.exclstr 0 : { *(.stab.exclstr) }
239 .stab.index 0 : { *(.stab.index) }
240 .stab.indexstr 0 : { *(.stab.indexstr) }
241 /* DWARF debug sections.
242 Symbols in the DWARF debugging sections are relative to the beginning
243 of the section so we begin them at 0. */
244 /* DWARF 1 */
245 .debug 0 : { *(.debug) }
246 .line 0 : { *(.line) }
247 /* GNU DWARF 1 extensions */
248 .debug_srcinfo 0 : { *(.debug_srcinfo) }
249 .debug_sfnames 0 : { *(.debug_sfnames) }
250 /* DWARF 1.1 and DWARF 2 */
251 .debug_aranges 0 : { *(.debug_aranges) }
252 .debug_pubnames 0 : { *(.debug_pubnames) }
253 /* DWARF 2 */
254 .debug_info 0 : { *(.debug_info) }
255 .debug_abbrev 0 : { *(.debug_abbrev) }
256 .debug_line 0 : { *(.debug_line) }
257 .debug_frame 0 : { *(.debug_frame) }
258 .debug_str 0 : { *(.debug_str) }
259 .debug_loc 0 : { *(.debug_loc) }
260 .debug_macinfo 0 : { *(.debug_macinfo) }
261 /* SGI/MIPS DWARF 2 extensions */
262 .debug_weaknames 0 : { *(.debug_weaknames) }
263 .debug_funcnames 0 : { *(.debug_funcnames) }
264 .debug_typenames 0 : { *(.debug_typenames) }
265 .debug_varnames 0 : { *(.debug_varnames) }
266 /* These must appear regardless of . */
267 /* Discard them for now since Intel SoftSDV cannot handle them.
268 .comment 0 : { *(.comment) }
269 .note 0 : { *(.note) }
270 */
271 /DISCARD/ : { *(.comment) }
272 /DISCARD/ : { *(.note) }
273}