aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorTim Abbott <tabbott@ksplice.com>2009-09-24 10:36:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 20:16:21 -0400
commitcd3db323eb88514c45d25db51335a522560af702 (patch)
treefca5bd7dd12909a2ea22845de0e87634e6aedb74 /arch/xtensa/kernel/vmlinux.lds.S
parentab635e7d499f23a5791e69e2ebbc9a40c9983d89 (diff)
xtensa: Cleanup linker script using new linker script macros.
Signed-off-by: Tim Abbott <tabbott@ksplice.com> Cc: Chris Zankel <chris@zankel.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/xtensa/kernel/vmlinux.lds.S')
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S75
1 files changed, 14 insertions, 61 deletions
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index 921b6ff3b645..9b526154c9ba 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -15,6 +15,8 @@
15 */ 15 */
16 16
17#include <asm-generic/vmlinux.lds.h> 17#include <asm-generic/vmlinux.lds.h>
18#include <asm/page.h>
19#include <asm/thread_info.h>
18 20
19#include <variant/core.h> 21#include <variant/core.h>
20#include <platform/hardware.h> 22#include <platform/hardware.h>
@@ -107,41 +109,18 @@ SECTIONS
107 109
108 .fixup : { *(.fixup) } 110 .fixup : { *(.fixup) }
109 111
110 . = ALIGN(16); 112 EXCEPTION_TABLE(16)
111
112 __ex_table : {
113 __start___ex_table = .;
114 *(__ex_table)
115 __stop___ex_table = .;
116 }
117
118 /* Data section */ 113 /* Data section */
119 114
120 . = ALIGN(XCHAL_ICACHE_LINESIZE);
121 _fdata = .; 115 _fdata = .;
122 .data : 116 RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE)
123 {
124 DATA_DATA
125 CONSTRUCTORS
126 . = ALIGN(XCHAL_ICACHE_LINESIZE);
127 *(.data.cacheline_aligned)
128 }
129
130 _edata = .; 117 _edata = .;
131 118
132 /* The initial task */
133 . = ALIGN(8192);
134 .data.init_task : { *(.data.init_task) }
135
136 /* Initialization code and data: */ 119 /* Initialization code and data: */
137 120
138 . = ALIGN(1 << 12); 121 . = ALIGN(PAGE_SIZE);
139 __init_begin = .; 122 __init_begin = .;
140 .init.text : { 123 INIT_TEXT_SECTION(PAGE_SIZE)
141 _sinittext = .;
142 INIT_TEXT
143 _einittext = .;
144 }
145 124
146 .init.data : 125 .init.data :
147 { 126 {
@@ -168,36 +147,15 @@ SECTIONS
168 .DebugInterruptVector.text); 147 .DebugInterruptVector.text);
169 148
170 __boot_reloc_table_end = ABSOLUTE(.) ; 149 __boot_reloc_table_end = ABSOLUTE(.) ;
171 }
172 150
173 . = ALIGN(XCHAL_ICACHE_LINESIZE); 151 INIT_SETUP(XCHAL_ICACHE_LINESIZE)
174 152 INIT_CALLS
175 __setup_start = .; 153 CON_INITCALL
176 .init.setup : { *(.init.setup) } 154 SECURITY_INITCALL
177 __setup_end = .; 155 INIT_RAM_FS
178
179 __initcall_start = .;
180 .initcall.init : {
181 INITCALLS
182 } 156 }
183 __initcall_end = .;
184
185 __con_initcall_start = .;
186 .con_initcall.init : { *(.con_initcall.init) }
187 __con_initcall_end = .;
188
189 SECURITY_INIT
190
191
192#ifdef CONFIG_BLK_DEV_INITRD
193 . = ALIGN(4096);
194 __initramfs_start =.;
195 .init.ramfs : { *(.init.ramfs) }
196 __initramfs_end = .;
197#endif
198
199 PERCPU(4096)
200 157
158 PERCPU(PAGE_SIZE)
201 159
202 /* We need this dummy segment here */ 160 /* We need this dummy segment here */
203 161
@@ -252,16 +210,11 @@ SECTIONS
252 .DoubleExceptionVector.literal) 210 .DoubleExceptionVector.literal)
253 211
254 . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; 212 . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3;
255 . = ALIGN(1 << 12); 213 . = ALIGN(PAGE_SIZE);
256 214
257 __init_end = .; 215 __init_end = .;
258 216
259 . = ALIGN(8192); 217 BSS_SECTION(0, 8192, 0)
260
261 /* BSS section */
262 _bss_start = .;
263 .bss : { *(.bss.page_aligned) *(.bss) }
264 _bss_end = .;
265 218
266 _end = .; 219 _end = .;
267 220