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 | ||
7 | #define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE) | |
8 | #include <asm-generic/vmlinux.lds.h> | |
9 | ||
c7b645f9 KA |
10 | #define IVT_TEXT \ |
11 | VMLINUX_SYMBOL(__start_ivt_text) = .; \ | |
12 | *(.text.ivt) \ | |
13 | VMLINUX_SYMBOL(__end_ivt_text) = .; | |
14 | ||
1da177e4 LT |
15 | OUTPUT_FORMAT("elf64-ia64-little") |
16 | OUTPUT_ARCH(ia64) | |
17 | ENTRY(phys_start) | |
18 | jiffies = jiffies_64; | |
19 | PHDRS { | |
20 | code PT_LOAD; | |
21 | percpu PT_LOAD; | |
22 | data PT_LOAD; | |
336cdba8 | 23 | note PT_NOTE; |
9bf77d0e | 24 | unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */ |
1da177e4 LT |
25 | } |
26 | SECTIONS | |
27 | { | |
28 | /* Sections to be discarded */ | |
29 | /DISCARD/ : { | |
01ba2bdc SR |
30 | EXIT_TEXT |
31 | EXIT_DATA | |
1da177e4 LT |
32 | *(.exitcall.exit) |
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 | { | |
c7b645f9 | 48 | IVT_TEXT |
7664709b | 49 | TEXT_TEXT |
1da177e4 LT |
50 | SCHED_TEXT |
51 | LOCK_TEXT | |
1f7ad57b | 52 | KPROBES_TEXT |
1da177e4 LT |
53 | *(.gnu.linkonce.t*) |
54 | } | |
9d6f40b8 TL |
55 | .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) |
56 | { *(.text.head) } | |
1da177e4 LT |
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 | ||
336cdba8 DMT |
67 | NOTES :code :note /* put .notes in text and mark in PT_NOTE */ |
68 | code_continues : {} :code /* switch back to regular program... */ | |
69 | ||
1da177e4 LT |
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 | ||
d89cfe7f RA |
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 | ||
a0776ec8 CK |
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 | ||
1da177e4 LT |
95 | /* Global data */ |
96 | _data = .; | |
97 | ||
1da177e4 LT |
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 = .; | |
9bf77d0e DMT |
107 | } :code :unwind |
108 | code_continues2 : {} : code | |
1da177e4 LT |
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 = .; | |
01ba2bdc | 122 | INIT_TEXT |
1da177e4 LT |
123 | _einittext = .; |
124 | } | |
125 | ||
126 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) | |
01ba2bdc | 127 | { INIT_DATA } |
1da177e4 | 128 | |
67d38229 | 129 | #ifdef CONFIG_BLK_DEV_INITRD |
1da177e4 LT |
130 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) |
131 | { | |
132 | __initramfs_start = .; | |
133 | *(.init.ramfs) | |
134 | __initramfs_end = .; | |
135 | } | |
67d38229 | 136 | #endif |
1da177e4 LT |
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 = .; | |
61ce1efe | 148 | INITCALLS |
1da177e4 LT |
149 | __initcall_end = .; |
150 | } | |
39e18de8 CK |
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 | ||
4dcc29e1 TL |
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 | ||
39e18de8 CK |
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_IA64_GENERIC) | |
174 | /* Machine Vector */ | |
175 | . = ALIGN(16); | |
176 | .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) | |
177 | { | |
178 | machvec_start = .; | |
179 | *(.machvec) | |
180 | machvec_end = .; | |
181 | } | |
182 | #endif | |
183 | ||
d00195eb | 184 | . = ALIGN(8); |
1da177e4 LT |
185 | __con_initcall_start = .; |
186 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) | |
187 | { *(.con_initcall.init) } | |
188 | __con_initcall_end = .; | |
189 | __security_initcall_start = .; | |
190 | .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) | |
191 | { *(.security_initcall.init) } | |
192 | __security_initcall_end = .; | |
193 | . = ALIGN(PAGE_SIZE); | |
194 | __init_end = .; | |
195 | ||
196 | /* The initial task and kernel stack */ | |
197 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) | |
198 | { *(.data.init_task) } | |
199 | ||
200 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) | |
201 | { *(__special_page_section) | |
202 | __start_gate_section = .; | |
203 | *(.data.gate) | |
204 | __stop_gate_section = .; | |
205 | } | |
df8f0ec1 AS |
206 | . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose |
207 | * kernel data | |
208 | */ | |
1da177e4 | 209 | |
dc86e88c CL |
210 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) |
211 | { *(.data.read_mostly) } | |
212 | ||
1da177e4 LT |
213 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) |
214 | { *(.data.cacheline_aligned) } | |
215 | ||
216 | /* Per-cpu data: */ | |
217 | percpu : { } :percpu | |
218 | . = ALIGN(PERCPU_PAGE_SIZE); | |
219 | __phys_per_cpu_start = .; | |
220 | .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) | |
221 | { | |
222 | __per_cpu_start = .; | |
223 | *(.data.percpu) | |
5fb7dc37 | 224 | *(.data.percpu.shared_aligned) |
1da177e4 LT |
225 | __per_cpu_end = .; |
226 | } | |
df8f0ec1 AS |
227 | . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits |
228 | * into percpu page size | |
229 | */ | |
1da177e4 LT |
230 | |
231 | data : { } :data | |
232 | .data : AT(ADDR(.data) - LOAD_OFFSET) | |
ca967258 SR |
233 | { |
234 | DATA_DATA | |
235 | *(.data1) | |
236 | *(.gnu.linkonce.d*) | |
237 | CONSTRUCTORS | |
238 | } | |
1da177e4 LT |
239 | |
240 | . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */ | |
241 | .got : AT(ADDR(.got) - LOAD_OFFSET) | |
242 | { *(.got.plt) *(.got) } | |
243 | __gp = ADDR(.got) + 0x200000; | |
244 | /* We want the small data sections together, so single-instruction offsets | |
245 | can access them all, and initialized data all before uninitialized, so | |
246 | we can shorten the on-disk segment size. */ | |
247 | .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) | |
248 | { *(.sdata) *(.sdata1) *(.srdata) } | |
249 | _edata = .; | |
b898a424 | 250 | __bss_start = .; |
1da177e4 LT |
251 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) |
252 | { *(.sbss) *(.scommon) } | |
253 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) | |
254 | { *(.bss) *(COMMON) } | |
b898a424 | 255 | __bss_stop = .; |
1da177e4 LT |
256 | |
257 | _end = .; | |
258 | ||
259 | code : { } :code | |
260 | /* Stabs debugging sections. */ | |
261 | .stab 0 : { *(.stab) } | |
262 | .stabstr 0 : { *(.stabstr) } | |
263 | .stab.excl 0 : { *(.stab.excl) } | |
264 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
265 | .stab.index 0 : { *(.stab.index) } | |
266 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
267 | /* DWARF debug sections. | |
268 | Symbols in the DWARF debugging sections are relative to the beginning | |
269 | of the section so we begin them at 0. */ | |
270 | /* DWARF 1 */ | |
271 | .debug 0 : { *(.debug) } | |
272 | .line 0 : { *(.line) } | |
273 | /* GNU DWARF 1 extensions */ | |
274 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
275 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
276 | /* DWARF 1.1 and DWARF 2 */ | |
277 | .debug_aranges 0 : { *(.debug_aranges) } | |
278 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
279 | /* DWARF 2 */ | |
280 | .debug_info 0 : { *(.debug_info) } | |
281 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
282 | .debug_line 0 : { *(.debug_line) } | |
283 | .debug_frame 0 : { *(.debug_frame) } | |
284 | .debug_str 0 : { *(.debug_str) } | |
285 | .debug_loc 0 : { *(.debug_loc) } | |
286 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
287 | /* SGI/MIPS DWARF 2 extensions */ | |
288 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
289 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
290 | .debug_typenames 0 : { *(.debug_typenames) } | |
291 | .debug_varnames 0 : { *(.debug_varnames) } | |
292 | /* These must appear regardless of . */ | |
1da177e4 LT |
293 | /DISCARD/ : { *(.comment) } |
294 | /DISCARD/ : { *(.note) } | |
295 | } |