diff options
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 74 | ||||
-rw-r--r-- | arch/ppc64/kernel/vmlinux.lds.S | 1 |
2 files changed, 10 insertions, 65 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index d0239bf8d4cc..d4dfcfbce272 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -1,6 +1,8 @@ | |||
1 | #include <linux/config.h> | 1 | #include <linux/config.h> |
2 | #ifdef CONFIG_PPC64 | 2 | #ifdef CONFIG_PPC64 |
3 | #include <asm/page.h> | 3 | #include <asm/page.h> |
4 | #else | ||
5 | #define PAGE_SIZE 4096 | ||
4 | #endif | 6 | #endif |
5 | #include <asm-generic/vmlinux.lds.h> | 7 | #include <asm-generic/vmlinux.lds.h> |
6 | 8 | ||
@@ -16,9 +18,7 @@ SECTIONS | |||
16 | /* Sections to be discarded. */ | 18 | /* Sections to be discarded. */ |
17 | /DISCARD/ : { | 19 | /DISCARD/ : { |
18 | *(.exitcall.exit) | 20 | *(.exitcall.exit) |
19 | #ifdef CONFIG_PPC32 | ||
20 | *(.exit.data) | 21 | *(.exit.data) |
21 | #endif | ||
22 | } | 22 | } |
23 | 23 | ||
24 | 24 | ||
@@ -49,16 +49,10 @@ SECTIONS | |||
49 | .plt : { *(.plt) } | 49 | .plt : { *(.plt) } |
50 | #endif | 50 | #endif |
51 | .text : { | 51 | .text : { |
52 | #ifdef CONFIG_PPC64 | ||
53 | *(.text .text.*) | 52 | *(.text .text.*) |
54 | #else | ||
55 | *(.text) | ||
56 | #endif | ||
57 | SCHED_TEXT | 53 | SCHED_TEXT |
58 | LOCK_TEXT | 54 | LOCK_TEXT |
59 | #ifdef CONFIG_PPC64 | ||
60 | KPROBES_TEXT | 55 | KPROBES_TEXT |
61 | #endif | ||
62 | *(.fixup) | 56 | *(.fixup) |
63 | #ifdef CONFIG_PPC32 | 57 | #ifdef CONFIG_PPC32 |
64 | *(.got1) | 58 | *(.got1) |
@@ -106,7 +100,7 @@ SECTIONS | |||
106 | 100 | ||
107 | #ifdef CONFIG_PPC32 | 101 | #ifdef CONFIG_PPC32 |
108 | /* Read-write section, merged into data segment: */ | 102 | /* Read-write section, merged into data segment: */ |
109 | . = ALIGN(4096); | 103 | . = ALIGN(PAGE_SIZE); |
110 | _sdata = .; | 104 | _sdata = .; |
111 | .data : | 105 | .data : |
112 | { | 106 | { |
@@ -119,10 +113,10 @@ SECTIONS | |||
119 | CONSTRUCTORS | 113 | CONSTRUCTORS |
120 | } | 114 | } |
121 | 115 | ||
122 | . = ALIGN(4096); | 116 | . = ALIGN(PAGE_SIZE); |
123 | __nosave_begin = .; | 117 | __nosave_begin = .; |
124 | .data_nosave : { *(.data.nosave) } | 118 | .data_nosave : { *(.data.nosave) } |
125 | . = ALIGN(4096); | 119 | . = ALIGN(PAGE_SIZE); |
126 | __nosave_end = .; | 120 | __nosave_end = .; |
127 | 121 | ||
128 | . = ALIGN(32); | 122 | . = ALIGN(32); |
@@ -133,12 +127,10 @@ SECTIONS | |||
133 | 127 | ||
134 | . = ALIGN(8192); | 128 | . = ALIGN(8192); |
135 | .data.init_task : { *(.data.init_task) } | 129 | .data.init_task : { *(.data.init_task) } |
130 | #endif | ||
136 | 131 | ||
137 | . = ALIGN(4096); | ||
138 | #else | ||
139 | /* will be freed after init */ | 132 | /* will be freed after init */ |
140 | . = ALIGN(PAGE_SIZE); | 133 | . = ALIGN(PAGE_SIZE); |
141 | #endif | ||
142 | __init_begin = .; | 134 | __init_begin = .; |
143 | .init.text : { | 135 | .init.text : { |
144 | _sinittext = .; | 136 | _sinittext = .; |
@@ -151,9 +143,6 @@ SECTIONS | |||
151 | .exit.text : { *(.exit.text) } | 143 | .exit.text : { *(.exit.text) } |
152 | #endif | 144 | #endif |
153 | .init.data : { | 145 | .init.data : { |
154 | #ifdef CONFIG_PPC64 | ||
155 | *(.init.data) | ||
156 | #else | ||
157 | *(.init.data); | 146 | *(.init.data); |
158 | __vtop_table_begin = .; | 147 | __vtop_table_begin = .; |
159 | *(.vtop_fixup); | 148 | *(.vtop_fixup); |
@@ -161,31 +150,17 @@ SECTIONS | |||
161 | __ptov_table_begin = .; | 150 | __ptov_table_begin = .; |
162 | *(.ptov_fixup); | 151 | *(.ptov_fixup); |
163 | __ptov_table_end = .; | 152 | __ptov_table_end = .; |
164 | #endif | ||
165 | } | 153 | } |
166 | 154 | ||
167 | . = ALIGN(16); | 155 | . = ALIGN(16); |
168 | #ifdef CONFIG_PPC32 | ||
169 | __setup_start = .; | ||
170 | #endif | ||
171 | .init.setup : { | 156 | .init.setup : { |
172 | #ifdef CONFIG_PPC64 | ||
173 | __setup_start = .; | 157 | __setup_start = .; |
174 | #endif | ||
175 | *(.init.setup) | 158 | *(.init.setup) |
176 | #ifdef CONFIG_PPC64 | ||
177 | __setup_end = .; | 159 | __setup_end = .; |
178 | #endif | ||
179 | } | 160 | } |
180 | #ifdef CONFIG_PPC32 | ||
181 | __setup_end = .; | ||
182 | 161 | ||
183 | __initcall_start = .; | ||
184 | #endif | ||
185 | .initcall.init : { | 162 | .initcall.init : { |
186 | #ifdef CONFIG_PPC64 | ||
187 | __initcall_start = .; | 163 | __initcall_start = .; |
188 | #endif | ||
189 | *(.initcall1.init) | 164 | *(.initcall1.init) |
190 | *(.initcall2.init) | 165 | *(.initcall2.init) |
191 | *(.initcall3.init) | 166 | *(.initcall3.init) |
@@ -193,27 +168,14 @@ SECTIONS | |||
193 | *(.initcall5.init) | 168 | *(.initcall5.init) |
194 | *(.initcall6.init) | 169 | *(.initcall6.init) |
195 | *(.initcall7.init) | 170 | *(.initcall7.init) |
196 | #ifdef CONFIG_PPC64 | ||
197 | __initcall_end = .; | 171 | __initcall_end = .; |
198 | #endif | ||
199 | } | 172 | } |
200 | #ifdef CONFIG_PPC32 | ||
201 | __initcall_end = .; | ||
202 | 173 | ||
203 | __con_initcall_start = .; | ||
204 | #endif | ||
205 | .con_initcall.init : { | 174 | .con_initcall.init : { |
206 | #ifdef CONFIG_PPC64 | ||
207 | __con_initcall_start = .; | 175 | __con_initcall_start = .; |
208 | #endif | ||
209 | *(.con_initcall.init) | 176 | *(.con_initcall.init) |
210 | #ifdef CONFIG_PPC64 | ||
211 | __con_initcall_end = .; | 177 | __con_initcall_end = .; |
212 | #endif | ||
213 | } | 178 | } |
214 | #ifdef CONFIG_PPC32 | ||
215 | __con_initcall_end = .; | ||
216 | #endif | ||
217 | 179 | ||
218 | SECURITY_INIT | 180 | SECURITY_INIT |
219 | 181 | ||
@@ -232,31 +194,23 @@ SECTIONS | |||
232 | 194 | ||
233 | #ifdef CONFIG_PPC32 | 195 | #ifdef CONFIG_PPC32 |
234 | . = ALIGN(32); | 196 | . = ALIGN(32); |
235 | __per_cpu_start = .; | ||
236 | #endif | 197 | #endif |
237 | .data.percpu : { | 198 | .data.percpu : { |
238 | #ifdef CONFIG_PPC64 | ||
239 | __per_cpu_start = .; | 199 | __per_cpu_start = .; |
240 | #endif | ||
241 | *(.data.percpu) | 200 | *(.data.percpu) |
242 | #ifdef CONFIG_PPC64 | ||
243 | __per_cpu_end = .; | 201 | __per_cpu_end = .; |
244 | #endif | ||
245 | } | 202 | } |
246 | #ifdef CONFIG_PPC32 | ||
247 | __per_cpu_end = .; | ||
248 | #endif | ||
249 | 203 | ||
250 | #ifdef CONFIG_PPC64 | ||
251 | . = ALIGN(PAGE_SIZE); | 204 | . = ALIGN(PAGE_SIZE); |
205 | #ifdef CONFIG_PPC64 | ||
252 | . = ALIGN(16384); | 206 | . = ALIGN(16384); |
253 | __init_end = .; | 207 | __init_end = .; |
254 | /* freed after init ends here */ | 208 | /* freed after init ends here */ |
255 | 209 | ||
256 | |||
257 | /* Read/write sections */ | 210 | /* Read/write sections */ |
258 | . = ALIGN(PAGE_SIZE); | 211 | . = ALIGN(PAGE_SIZE); |
259 | . = ALIGN(16384); | 212 | . = ALIGN(16384); |
213 | _sdata = .; | ||
260 | /* The initial task and kernel stack */ | 214 | /* The initial task and kernel stack */ |
261 | .data.init_task : { | 215 | .data.init_task : { |
262 | *(.data.init_task) | 216 | *(.data.init_task) |
@@ -288,10 +242,8 @@ SECTIONS | |||
288 | _edata = .; | 242 | _edata = .; |
289 | } | 243 | } |
290 | 244 | ||
291 | |||
292 | . = ALIGN(PAGE_SIZE); | 245 | . = ALIGN(PAGE_SIZE); |
293 | #else | 246 | #else |
294 | . = ALIGN(4096); | ||
295 | __initramfs_start = .; | 247 | __initramfs_start = .; |
296 | .init.ramfs : { | 248 | .init.ramfs : { |
297 | *(.init.ramfs) | 249 | *(.init.ramfs) |
@@ -307,23 +259,15 @@ SECTIONS | |||
307 | 259 | ||
308 | __bss_start = .; | 260 | __bss_start = .; |
309 | #endif | 261 | #endif |
262 | |||
310 | .bss : { | 263 | .bss : { |
311 | #ifdef CONFIG_PPC64 | ||
312 | __bss_start = .; | 264 | __bss_start = .; |
313 | #else | ||
314 | *(.sbss) *(.scommon) | 265 | *(.sbss) *(.scommon) |
315 | *(.dynbss) | 266 | *(.dynbss) |
316 | #endif | ||
317 | *(.bss) | 267 | *(.bss) |
318 | #ifdef CONFIG_PPC32 | ||
319 | *(COMMON) | 268 | *(COMMON) |
320 | #else | ||
321 | __bss_stop = .; | 269 | __bss_stop = .; |
322 | #endif | ||
323 | } | 270 | } |
324 | #ifdef CONFIG_PPC32 | ||
325 | __bss_stop = .; | ||
326 | #endif | ||
327 | 271 | ||
328 | #ifdef CONFIG_PPC64 | 272 | #ifdef CONFIG_PPC64 |
329 | . = ALIGN(PAGE_SIZE); | 273 | . = ALIGN(PAGE_SIZE); |
diff --git a/arch/ppc64/kernel/vmlinux.lds.S b/arch/ppc64/kernel/vmlinux.lds.S index f34d514432ac..022f220e772f 100644 --- a/arch/ppc64/kernel/vmlinux.lds.S +++ b/arch/ppc64/kernel/vmlinux.lds.S | |||
@@ -106,6 +106,7 @@ SECTIONS | |||
106 | /* Read/write sections */ | 106 | /* Read/write sections */ |
107 | . = ALIGN(PAGE_SIZE); | 107 | . = ALIGN(PAGE_SIZE); |
108 | . = ALIGN(16384); | 108 | . = ALIGN(16384); |
109 | _sdata = .; | ||
109 | /* The initial task and kernel stack */ | 110 | /* The initial task and kernel stack */ |
110 | .data.init_task : { | 111 | .data.init_task : { |
111 | *(.data.init_task) | 112 | *(.data.init_task) |