aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/vmlinux.lds.S')
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S51
1 files changed, 24 insertions, 27 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 0afb9e31d2a0..0c3000bf8d75 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -1,11 +1,9 @@
1#ifdef CONFIG_PPC64 1#ifdef CONFIG_PPC64
2#include <asm/page.h>
3#define PROVIDE32(x) PROVIDE(__unused__##x) 2#define PROVIDE32(x) PROVIDE(__unused__##x)
4#else 3#else
5#define PAGE_SIZE 4096
6#define KERNELBASE CONFIG_KERNEL_START
7#define PROVIDE32(x) PROVIDE(x) 4#define PROVIDE32(x) PROVIDE(x)
8#endif 5#endif
6#include <asm/page.h>
9#include <asm-generic/vmlinux.lds.h> 7#include <asm-generic/vmlinux.lds.h>
10#include <asm/cache.h> 8#include <asm/cache.h>
11 9
@@ -33,7 +31,7 @@ SECTIONS
33 */ 31 */
34 32
35 /* Text and gots */ 33 /* Text and gots */
36 .text : { 34 .text : AT(ADDR(.text) - LOAD_OFFSET) {
37 ALIGN_FUNCTION(); 35 ALIGN_FUNCTION();
38 *(.text.head) 36 *(.text.head)
39 _text = .; 37 _text = .;
@@ -58,7 +56,7 @@ SECTIONS
58 RODATA 56 RODATA
59 57
60 /* Exception & bug tables */ 58 /* Exception & bug tables */
61 __ex_table : { 59 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
62 __start___ex_table = .; 60 __start___ex_table = .;
63 *(__ex_table) 61 *(__ex_table)
64 __stop___ex_table = .; 62 __stop___ex_table = .;
@@ -74,7 +72,7 @@ SECTIONS
74 . = ALIGN(PAGE_SIZE); 72 . = ALIGN(PAGE_SIZE);
75 __init_begin = .; 73 __init_begin = .;
76 74
77 .init.text : { 75 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
78 _sinittext = .; 76 _sinittext = .;
79 INIT_TEXT 77 INIT_TEXT
80 _einittext = .; 78 _einittext = .;
@@ -83,11 +81,11 @@ SECTIONS
83 /* .exit.text is discarded at runtime, not link time, 81 /* .exit.text is discarded at runtime, not link time,
84 * to deal with references from __bug_table 82 * to deal with references from __bug_table
85 */ 83 */
86 .exit.text : { 84 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
87 EXIT_TEXT 85 EXIT_TEXT
88 } 86 }
89 87
90 .init.data : { 88 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
91 INIT_DATA 89 INIT_DATA
92 __vtop_table_begin = .; 90 __vtop_table_begin = .;
93 *(.vtop_fixup); 91 *(.vtop_fixup);
@@ -103,19 +101,19 @@ SECTIONS
103 } 101 }
104 102
105 . = ALIGN(16); 103 . = ALIGN(16);
106 .init.setup : { 104 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
107 __setup_start = .; 105 __setup_start = .;
108 *(.init.setup) 106 *(.init.setup)
109 __setup_end = .; 107 __setup_end = .;
110 } 108 }
111 109
112 .initcall.init : { 110 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
113 __initcall_start = .; 111 __initcall_start = .;
114 INITCALLS 112 INITCALLS
115 __initcall_end = .; 113 __initcall_end = .;
116 } 114 }
117 115
118 .con_initcall.init : { 116 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
119 __con_initcall_start = .; 117 __con_initcall_start = .;
120 *(.con_initcall.init) 118 *(.con_initcall.init)
121 __con_initcall_end = .; 119 __con_initcall_end = .;
@@ -124,14 +122,14 @@ SECTIONS
124 SECURITY_INIT 122 SECURITY_INIT
125 123
126 . = ALIGN(8); 124 . = ALIGN(8);
127 __ftr_fixup : { 125 __ftr_fixup : AT(ADDR(__ftr_fixup) - LOAD_OFFSET) {
128 __start___ftr_fixup = .; 126 __start___ftr_fixup = .;
129 *(__ftr_fixup) 127 *(__ftr_fixup)
130 __stop___ftr_fixup = .; 128 __stop___ftr_fixup = .;
131 } 129 }
132#ifdef CONFIG_PPC64 130#ifdef CONFIG_PPC64
133 . = ALIGN(8); 131 . = ALIGN(8);
134 __fw_ftr_fixup : { 132 __fw_ftr_fixup : AT(ADDR(__fw_ftr_fixup) - LOAD_OFFSET) {
135 __start___fw_ftr_fixup = .; 133 __start___fw_ftr_fixup = .;
136 *(__fw_ftr_fixup) 134 *(__fw_ftr_fixup)
137 __stop___fw_ftr_fixup = .; 135 __stop___fw_ftr_fixup = .;
@@ -139,14 +137,14 @@ SECTIONS
139#endif 137#endif
140#ifdef CONFIG_BLK_DEV_INITRD 138#ifdef CONFIG_BLK_DEV_INITRD
141 . = ALIGN(PAGE_SIZE); 139 . = ALIGN(PAGE_SIZE);
142 .init.ramfs : { 140 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
143 __initramfs_start = .; 141 __initramfs_start = .;
144 *(.init.ramfs) 142 *(.init.ramfs)
145 __initramfs_end = .; 143 __initramfs_end = .;
146 } 144 }
147#endif 145#endif
148 . = ALIGN(PAGE_SIZE); 146 . = ALIGN(PAGE_SIZE);
149 .data.percpu : { 147 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
150 __per_cpu_start = .; 148 __per_cpu_start = .;
151 *(.data.percpu) 149 *(.data.percpu)
152 *(.data.percpu.shared_aligned) 150 *(.data.percpu.shared_aligned)
@@ -154,7 +152,7 @@ SECTIONS
154 } 152 }
155 153
156 . = ALIGN(8); 154 . = ALIGN(8);
157 .machine.desc : { 155 .machine.desc : AT(ADDR(.machine.desc) - LOAD_OFFSET) {
158 __machine_desc_start = . ; 156 __machine_desc_start = . ;
159 *(.machine.desc) 157 *(.machine.desc)
160 __machine_desc_end = . ; 158 __machine_desc_end = . ;
@@ -172,25 +170,24 @@ SECTIONS
172 _sdata = .; 170 _sdata = .;
173 171
174#ifdef CONFIG_PPC32 172#ifdef CONFIG_PPC32
175 .data : 173 .data : AT(ADDR(.data) - LOAD_OFFSET) {
176 {
177 DATA_DATA 174 DATA_DATA
178 *(.sdata) 175 *(.sdata)
179 *(.got.plt) *(.got) 176 *(.got.plt) *(.got)
180 } 177 }
181#else 178#else
182 .data : { 179 .data : AT(ADDR(.data) - LOAD_OFFSET) {
183 DATA_DATA 180 DATA_DATA
184 *(.data.rel*) 181 *(.data.rel*)
185 *(.toc1) 182 *(.toc1)
186 *(.branch_lt) 183 *(.branch_lt)
187 } 184 }
188 185
189 .opd : { 186 .opd : AT(ADDR(.opd) - LOAD_OFFSET) {
190 *(.opd) 187 *(.opd)
191 } 188 }
192 189
193 .got : { 190 .got : AT(ADDR(.got) - LOAD_OFFSET) {
194 __toc_start = .; 191 __toc_start = .;
195 *(.got) 192 *(.got)
196 *(.toc) 193 *(.toc)
@@ -207,26 +204,26 @@ SECTIONS
207#else 204#else
208 . = ALIGN(16384); 205 . = ALIGN(16384);
209#endif 206#endif
210 .data.init_task : { 207 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
211 *(.data.init_task) 208 *(.data.init_task)
212 } 209 }
213 210
214 . = ALIGN(PAGE_SIZE); 211 . = ALIGN(PAGE_SIZE);
215 .data.page_aligned : { 212 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
216 *(.data.page_aligned) 213 *(.data.page_aligned)
217 } 214 }
218 215
219 .data.cacheline_aligned : { 216 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
220 *(.data.cacheline_aligned) 217 *(.data.cacheline_aligned)
221 } 218 }
222 219
223 . = ALIGN(L1_CACHE_BYTES); 220 . = ALIGN(L1_CACHE_BYTES);
224 .data.read_mostly : { 221 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
225 *(.data.read_mostly) 222 *(.data.read_mostly)
226 } 223 }
227 224
228 . = ALIGN(PAGE_SIZE); 225 . = ALIGN(PAGE_SIZE);
229 __data_nosave : { 226 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
230 __nosave_begin = .; 227 __nosave_begin = .;
231 *(.data.nosave) 228 *(.data.nosave)
232 . = ALIGN(PAGE_SIZE); 229 . = ALIGN(PAGE_SIZE);
@@ -237,7 +234,7 @@ SECTIONS
237 * And finally the bss 234 * And finally the bss
238 */ 235 */
239 236
240 .bss : { 237 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
241 __bss_start = .; 238 __bss_start = .;
242 *(.sbss) *(.scommon) 239 *(.sbss) *(.scommon)
243 *(.dynbss) 240 *(.dynbss)