[POWERPC] Add cpu feature for SPE handling
[linux-block.git] / arch / powerpc / kernel / vmlinux.lds.S
CommitLineData
c51e3a41 1#ifdef CONFIG_PPC64
cabb5587 2#include <asm/page.h>
e8222502 3#define PROVIDE32(x) PROVIDE(__unused__##x)
c51e3a41
PM
4#else
5#define PAGE_SIZE 4096
6#define KERNELBASE CONFIG_KERNEL_START
e8222502 7#define PROVIDE32(x) PROVIDE(x)
c51e3a41 8#endif
14cf11af 9#include <asm-generic/vmlinux.lds.h>
bd67fcf9 10#include <asm/cache.h>
14cf11af 11
e19e4ab4
ME
12ENTRY(_stext)
13
cabb5587
SR
14#ifdef CONFIG_PPC64
15OUTPUT_ARCH(powerpc:common64)
16jiffies = jiffies_64;
17#else
14cf11af
PM
18OUTPUT_ARCH(powerpc:common)
19jiffies = jiffies_64 + 4;
cabb5587 20#endif
14cf11af
PM
21SECTIONS
22{
e8222502
BH
23 /* Sections to be discarded. */
24 /DISCARD/ : {
25 *(.exitcall.exit)
26 *(.exit.data)
27 }
14cf11af 28
e8222502 29 . = KERNELBASE;
14cf11af 30
e8222502
BH
31/*
32 * Text, read only data and other permanent read-only sections
33 */
34
35 /* Text and gots */
36 .text : {
fd593d12 37 _text = .;
7664709b 38 TEXT_TEXT
e8222502
BH
39 SCHED_TEXT
40 LOCK_TEXT
41 KPROBES_TEXT
42 *(.fixup)
14cf11af 43
e8222502
BH
44#ifdef CONFIG_PPC32
45 *(.got1)
46 __got2_start = .;
47 *(.got2)
48 __got2_end = .;
49#endif /* CONFIG_PPC32 */
50
51 . = ALIGN(PAGE_SIZE);
52 _etext = .;
53 PROVIDE32 (etext = .);
54 }
55
56 /* Read-only data */
57 RODATA
58
59 /* Exception & bug tables */
14cf11af
PM
60 __ex_table : {
61 __start___ex_table = .;
62 *(__ex_table)
63 __stop___ex_table = .;
64 }
65
8fb775ee
RM
66 NOTES
67
73c9ceab 68 BUG_TABLE
14cf11af 69
e8222502
BH
70/*
71 * Init sections discarded at runtime
72 */
73 . = ALIGN(PAGE_SIZE);
74 __init_begin = .;
75
76 .init.text : {
77 _sinittext = .;
78 *(.init.text)
79 _einittext = .;
80 }
81
82 /* .exit.text is discarded at runtime, not link time,
83 * to deal with references from __bug_table
84 */
85 .exit.text : { *(.exit.text) }
86
87 .init.data : {
88 *(.init.data);
89 __vtop_table_begin = .;
90 *(.vtop_fixup);
91 __vtop_table_end = .;
92 __ptov_table_begin = .;
93 *(.ptov_fixup);
94 __ptov_table_end = .;
c4e3ea25
SR
95#ifdef CONFIG_PPC_ISERIES
96 __dt_strings_start = .;
97 *(.dt_strings);
98 __dt_strings_end = .;
99#endif
e8222502
BH
100 }
101
102 . = ALIGN(16);
103 .init.setup : {
104 __setup_start = .;
105 *(.init.setup)
106 __setup_end = .;
107 }
108
109 .initcall.init : {
110 __initcall_start = .;
61ce1efe 111 INITCALLS
e8222502
BH
112 __initcall_end = .;
113 }
114
115 .con_initcall.init : {
116 __con_initcall_start = .;
117 *(.con_initcall.init)
118 __con_initcall_end = .;
119 }
120
121 SECURITY_INIT
122
123 . = ALIGN(8);
cabb5587
SR
124 __ftr_fixup : {
125 __start___ftr_fixup = .;
126 *(__ftr_fixup)
127 __stop___ftr_fixup = .;
128 }
3f639ee8
SR
129#ifdef CONFIG_PPC64
130 . = ALIGN(8);
131 __fw_ftr_fixup : {
132 __start___fw_ftr_fixup = .;
133 *(__fw_ftr_fixup)
134 __stop___fw_ftr_fixup = .;
135 }
136#endif
67d38229 137#ifdef CONFIG_BLK_DEV_INITRD
e8222502
BH
138 . = ALIGN(PAGE_SIZE);
139 .init.ramfs : {
140 __initramfs_start = .;
141 *(.init.ramfs)
142 __initramfs_end = .;
143 }
67d38229 144#endif
b6e3590f 145 . = ALIGN(PAGE_SIZE);
e8222502
BH
146 .data.percpu : {
147 __per_cpu_start = .;
148 *(.data.percpu)
5fb7dc37 149 *(.data.percpu.shared_aligned)
e8222502
BH
150 __per_cpu_end = .;
151 }
14cf11af 152
e8222502
BH
153 . = ALIGN(8);
154 .machine.desc : {
155 __machine_desc_start = . ;
156 *(.machine.desc)
157 __machine_desc_end = . ;
158 }
159
160 /* freed after init ends here */
161 . = ALIGN(PAGE_SIZE);
162 __init_end = .;
163
164/*
165 * And now the various read/write data
166 */
167
168 . = ALIGN(PAGE_SIZE);
169 _sdata = .;
14cf11af 170
cabb5587 171#ifdef CONFIG_PPC32
e8222502
BH
172 .data :
173 {
ca967258 174 DATA_DATA
e8222502
BH
175 *(.sdata)
176 *(.got.plt) *(.got)
177 }
cabb5587 178#else
e8222502 179 .data : {
3ae0aa9f
MD
180 DATA_DATA
181 *(.data.rel*)
182 *(.toc1)
e8222502
BH
183 *(.branch_lt)
184 }
14cf11af 185
e8222502
BH
186 .opd : {
187 *(.opd)
188 }
189
190 .got : {
191 __toc_start = .;
192 *(.got)
193 *(.toc)
194 }
cabb5587 195#endif
14cf11af 196
e8222502
BH
197 . = ALIGN(PAGE_SIZE);
198 _edata = .;
199 PROVIDE32 (edata = .);
200
201 /* The initial task and kernel stack */
202#ifdef CONFIG_PPC32
203 . = ALIGN(8192);
cabb5587 204#else
e8222502
BH
205 . = ALIGN(16384);
206#endif
207 .data.init_task : {
208 *(.data.init_task)
209 }
14cf11af 210
e8222502
BH
211 . = ALIGN(PAGE_SIZE);
212 .data.page_aligned : {
213 *(.data.page_aligned)
214 }
14cf11af 215
e8222502
BH
216 .data.cacheline_aligned : {
217 *(.data.cacheline_aligned)
218 }
14cf11af 219
bd67fcf9
TB
220 . = ALIGN(L1_CACHE_BYTES);
221 .data.read_mostly : {
222 *(.data.read_mostly)
223 }
224
e8222502
BH
225 . = ALIGN(PAGE_SIZE);
226 __data_nosave : {
227 __nosave_begin = .;
228 *(.data.nosave)
229 . = ALIGN(PAGE_SIZE);
230 __nosave_end = .;
231 }
4a288563 232
e8222502
BH
233/*
234 * And finally the bss
235 */
236
237 .bss : {
238 __bss_start = .;
239 *(.sbss) *(.scommon)
240 *(.dynbss)
241 *(.bss)
242 *(COMMON)
243 __bss_stop = .;
244 }
14cf11af 245
e8222502
BH
246 . = ALIGN(PAGE_SIZE);
247 _end = . ;
248 PROVIDE32 (end = .);
14cf11af 249}