blob: a676e79e0681bb183986e3036e6484f8878c4e70 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <linux/config.h>
2
3#include <asm/cache.h>
4#include <asm/ptrace.h>
5#include <asm/system.h>
6#include <asm/pgtable.h>
7
8#define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE)
9#include <asm-generic/vmlinux.lds.h>
10
Keshavamurthy Anil Sc7b645f2005-06-27 15:17:16 -070011#define IVT_TEXT \
12 VMLINUX_SYMBOL(__start_ivt_text) = .; \
13 *(.text.ivt) \
14 VMLINUX_SYMBOL(__end_ivt_text) = .;
15
Linus Torvalds1da177e2005-04-16 15:20:36 -070016OUTPUT_FORMAT("elf64-ia64-little")
17OUTPUT_ARCH(ia64)
18ENTRY(phys_start)
19jiffies = jiffies_64;
20PHDRS {
21 code PT_LOAD;
22 percpu PT_LOAD;
23 data PT_LOAD;
24}
25SECTIONS
26{
27 /* Sections to be discarded */
28 /DISCARD/ : {
29 *(.exit.text)
30 *(.exit.data)
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 {
Keshavamurthy Anil Sc7b645f2005-06-27 15:17:16 -070047 IVT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070048 *(.text)
49 SCHED_TEXT
50 LOCK_TEXT
51 *(.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
72 .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
73 {
74 __start___vtop_patchlist = .;
75 *(.data.patch.vtop)
76 __end___vtop_patchlist = .;
77 }
78
79 .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
80 {
81 __start___mckinley_e9_bundles = .;
82 *(.data.patch.mckinley_e9)
83 __end___mckinley_e9_bundles = .;
84 }
85
86 /* Global data */
87 _data = .;
88
89#if defined(CONFIG_IA64_GENERIC)
90 /* Machine Vector */
91 . = ALIGN(16);
92 .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
93 {
94 machvec_start = .;
95 *(.machvec)
96 machvec_end = .;
97 }
98#endif
99
100 /* Unwind info & table: */
101 . = ALIGN(8);
102 .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET)
103 { *(.IA_64.unwind_info*) }
104 .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET)
105 {
106 __start_unwind = .;
107 *(.IA_64.unwind*)
108 __end_unwind = .;
109 }
110
111 RODATA
112
113 .opd : AT(ADDR(.opd) - LOAD_OFFSET)
114 { *(.opd) }
115
116 /* Initialization code and data: */
117
118 . = ALIGN(PAGE_SIZE);
119 __init_begin = .;
120 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
121 {
122 _sinittext = .;
123 *(.init.text)
124 _einittext = .;
125 }
126
127 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
128 { *(.init.data) }
129
130 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
131 {
132 __initramfs_start = .;
133 *(.init.ramfs)
134 __initramfs_end = .;
135 }
136
137 . = ALIGN(16);
138 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
139 {
140 __setup_start = .;
141 *(.init.setup)
142 __setup_end = .;
143 }
144 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
145 {
146 __initcall_start = .;
147 *(.initcall1.init)
148 *(.initcall2.init)
149 *(.initcall3.init)
150 *(.initcall4.init)
151 *(.initcall5.init)
152 *(.initcall6.init)
153 *(.initcall7.init)
154 __initcall_end = .;
155 }
156 __con_initcall_start = .;
157 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
158 { *(.con_initcall.init) }
159 __con_initcall_end = .;
160 __security_initcall_start = .;
161 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
162 { *(.security_initcall.init) }
163 __security_initcall_end = .;
164 . = ALIGN(PAGE_SIZE);
165 __init_end = .;
166
167 /* The initial task and kernel stack */
168 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
169 { *(.data.init_task) }
170
171 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
172 { *(__special_page_section)
173 __start_gate_section = .;
174 *(.data.gate)
175 __stop_gate_section = .;
176 }
177 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */
178
179 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
180 { *(.data.cacheline_aligned) }
181
182 /* Per-cpu data: */
183 percpu : { } :percpu
184 . = ALIGN(PERCPU_PAGE_SIZE);
185 __phys_per_cpu_start = .;
186 .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
187 {
188 __per_cpu_start = .;
189 *(.data.percpu)
190 __per_cpu_end = .;
191 }
192 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits into percpu page size */
193
194 data : { } :data
195 .data : AT(ADDR(.data) - LOAD_OFFSET)
196 { *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS }
197
198 . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
199 .got : AT(ADDR(.got) - LOAD_OFFSET)
200 { *(.got.plt) *(.got) }
201 __gp = ADDR(.got) + 0x200000;
202 /* We want the small data sections together, so single-instruction offsets
203 can access them all, and initialized data all before uninitialized, so
204 we can shorten the on-disk segment size. */
205 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
206 { *(.sdata) *(.sdata1) *(.srdata) }
207 _edata = .;
208 _bss = .;
209 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET)
210 { *(.sbss) *(.scommon) }
211 .bss : AT(ADDR(.bss) - LOAD_OFFSET)
212 { *(.bss) *(COMMON) }
213
214 _end = .;
215
216 code : { } :code
217 /* Stabs debugging sections. */
218 .stab 0 : { *(.stab) }
219 .stabstr 0 : { *(.stabstr) }
220 .stab.excl 0 : { *(.stab.excl) }
221 .stab.exclstr 0 : { *(.stab.exclstr) }
222 .stab.index 0 : { *(.stab.index) }
223 .stab.indexstr 0 : { *(.stab.indexstr) }
224 /* DWARF debug sections.
225 Symbols in the DWARF debugging sections are relative to the beginning
226 of the section so we begin them at 0. */
227 /* DWARF 1 */
228 .debug 0 : { *(.debug) }
229 .line 0 : { *(.line) }
230 /* GNU DWARF 1 extensions */
231 .debug_srcinfo 0 : { *(.debug_srcinfo) }
232 .debug_sfnames 0 : { *(.debug_sfnames) }
233 /* DWARF 1.1 and DWARF 2 */
234 .debug_aranges 0 : { *(.debug_aranges) }
235 .debug_pubnames 0 : { *(.debug_pubnames) }
236 /* DWARF 2 */
237 .debug_info 0 : { *(.debug_info) }
238 .debug_abbrev 0 : { *(.debug_abbrev) }
239 .debug_line 0 : { *(.debug_line) }
240 .debug_frame 0 : { *(.debug_frame) }
241 .debug_str 0 : { *(.debug_str) }
242 .debug_loc 0 : { *(.debug_loc) }
243 .debug_macinfo 0 : { *(.debug_macinfo) }
244 /* SGI/MIPS DWARF 2 extensions */
245 .debug_weaknames 0 : { *(.debug_weaknames) }
246 .debug_funcnames 0 : { *(.debug_funcnames) }
247 .debug_typenames 0 : { *(.debug_typenames) }
248 .debug_varnames 0 : { *(.debug_varnames) }
249 /* These must appear regardless of . */
250 /* Discard them for now since Intel SoftSDV cannot handle them.
251 .comment 0 : { *(.comment) }
252 .note 0 : { *(.note) }
253 */
254 /DISCARD/ : { *(.comment) }
255 /DISCARD/ : { *(.note) }
256}