aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorTim Abbott <tabbott@ksplice.com>2009-09-22 01:18:09 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-09-24 01:31:48 -0400
commit142597dbbd8a1d516af3dacfa00037f21612e865 (patch)
tree8a00c316a0ddbc998ffe36cc44e723ecdc44b25f /arch/powerpc/kernel
parent049d0497060bc8db944f7b4984271327448b3603 (diff)
powerpc: Cleanup linker script using new linker script macros.
Signed-off-by: Tim Abbott <tabbott@ksplice.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: linuxppc-dev@ozlabs.org Cc: Sam Ravnborg <sam@ravnborg.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S69
1 files changed, 15 insertions, 54 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 58da4070723..f56429362a1 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -6,6 +6,7 @@
6#include <asm/page.h> 6#include <asm/page.h>
7#include <asm-generic/vmlinux.lds.h> 7#include <asm-generic/vmlinux.lds.h>
8#include <asm/cache.h> 8#include <asm/cache.h>
9#include <asm/thread_info.h>
9 10
10ENTRY(_stext) 11ENTRY(_stext)
11 12
@@ -71,12 +72,7 @@ SECTIONS
71 /* Read-only data */ 72 /* Read-only data */
72 RODATA 73 RODATA
73 74
74 /* Exception & bug tables */ 75 EXCEPTION_TABLE(0)
75 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
76 __start___ex_table = .;
77 *(__ex_table)
78 __stop___ex_table = .;
79 }
80 76
81 NOTES :kernel :notes 77 NOTES :kernel :notes
82 78
@@ -93,12 +89,7 @@ SECTIONS
93 */ 89 */
94 . = ALIGN(PAGE_SIZE); 90 . = ALIGN(PAGE_SIZE);
95 __init_begin = .; 91 __init_begin = .;
96 92 INIT_TEXT_SECTION(PAGE_SIZE) :kernel
97 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
98 _sinittext = .;
99 INIT_TEXT
100 _einittext = .;
101 } :kernel
102 93
103 /* .exit.text is discarded at runtime, not link time, 94 /* .exit.text is discarded at runtime, not link time,
104 * to deal with references from __bug_table 95 * to deal with references from __bug_table
@@ -122,23 +113,16 @@ SECTIONS
122#endif 113#endif
123 } 114 }
124 115
125 . = ALIGN(16);
126 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { 116 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
127 __setup_start = .; 117 INIT_SETUP(16)
128 *(.init.setup)
129 __setup_end = .;
130 } 118 }
131 119
132 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { 120 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
133 __initcall_start = .; 121 INIT_CALLS
134 INITCALLS 122 }
135 __initcall_end = .;
136 }
137 123
138 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { 124 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
139 __con_initcall_start = .; 125 CON_INITCALL
140 *(.con_initcall.init)
141 __con_initcall_end = .;
142 } 126 }
143 127
144 SECURITY_INIT 128 SECURITY_INIT
@@ -169,14 +153,10 @@ SECTIONS
169 __stop___fw_ftr_fixup = .; 153 __stop___fw_ftr_fixup = .;
170 } 154 }
171#endif 155#endif
172#ifdef CONFIG_BLK_DEV_INITRD
173 . = ALIGN(PAGE_SIZE);
174 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { 156 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
175 __initramfs_start = .; 157 INIT_RAM_FS
176 *(.init.ramfs)
177 __initramfs_end = .;
178 } 158 }
179#endif 159
180 PERCPU(PAGE_SIZE) 160 PERCPU(PAGE_SIZE)
181 161
182 . = ALIGN(8); 162 . = ALIGN(8);
@@ -240,36 +220,24 @@ SECTIONS
240#endif 220#endif
241 221
242 /* The initial task and kernel stack */ 222 /* The initial task and kernel stack */
243#ifdef CONFIG_PPC32
244 . = ALIGN(8192);
245#else
246 . = ALIGN(16384);
247#endif
248 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 223 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
249 *(.data.init_task) 224 INIT_TASK_DATA(THREAD_SIZE)
250 } 225 }
251 226
252 . = ALIGN(PAGE_SIZE);
253 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 227 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
254 *(.data.page_aligned) 228 PAGE_ALIGNED_DATA(PAGE_SIZE)
255 } 229 }
256 230
257 . = ALIGN(L1_CACHE_BYTES);
258 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { 231 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
259 *(.data.cacheline_aligned) 232 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
260 } 233 }
261 234
262 . = ALIGN(L1_CACHE_BYTES);
263 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { 235 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
264 *(.data.read_mostly) 236 READ_MOSTLY_DATA(L1_CACHE_BYTES)
265 } 237 }
266 238
267 . = ALIGN(PAGE_SIZE);
268 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { 239 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
269 __nosave_begin = .; 240 NOSAVE_DATA
270 *(.data.nosave)
271 . = ALIGN(PAGE_SIZE);
272 __nosave_end = .;
273 } 241 }
274 242
275 . = ALIGN(PAGE_SIZE); 243 . = ALIGN(PAGE_SIZE);
@@ -280,14 +248,7 @@ SECTIONS
280 * And finally the bss 248 * And finally the bss
281 */ 249 */
282 250
283 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 251 BSS_SECTION(0, 0, 0)
284 __bss_start = .;
285 *(.sbss) *(.scommon)
286 *(.dynbss)
287 *(.bss)
288 *(COMMON)
289 __bss_stop = .;
290 }
291 252
292 . = ALIGN(PAGE_SIZE); 253 . = ALIGN(PAGE_SIZE);
293 _end = . ; 254 _end = . ;