ppc: Fix compile error in arch/ppc/lib/strcase.c
[deliverable/linux.git] / arch / powerpc / kernel / vmlinux.lds.S
CommitLineData
cabb5587 1#include <linux/config.h>
c51e3a41 2#ifdef CONFIG_PPC64
cabb5587 3#include <asm/page.h>
c51e3a41
PM
4#else
5#define PAGE_SIZE 4096
6#define KERNELBASE CONFIG_KERNEL_START
7#endif
14cf11af
PM
8#include <asm-generic/vmlinux.lds.h>
9
e19e4ab4
ME
10ENTRY(_stext)
11
cabb5587
SR
12#ifdef CONFIG_PPC64
13OUTPUT_ARCH(powerpc:common64)
14jiffies = jiffies_64;
15#else
14cf11af
PM
16OUTPUT_ARCH(powerpc:common)
17jiffies = jiffies_64 + 4;
cabb5587 18#endif
14cf11af
PM
19SECTIONS
20{
cabb5587
SR
21 /* Sections to be discarded. */
22 /DISCARD/ : {
23 *(.exitcall.exit)
cabb5587 24 *(.exit.data)
cabb5587
SR
25 }
26
e19e4ab4 27 . = KERNELBASE;
cabb5587 28
14cf11af 29 /* Read-only sections, merged into text segment: */
cabb5587 30 .text : {
cabb5587 31 *(.text .text.*)
14cf11af
PM
32 SCHED_TEXT
33 LOCK_TEXT
cabb5587 34 KPROBES_TEXT
14cf11af 35 *(.fixup)
cabb5587 36#ifdef CONFIG_PPC32
14cf11af
PM
37 *(.got1)
38 __got2_start = .;
39 *(.got2)
40 __got2_end = .;
cabb5587
SR
41#else
42 . = ALIGN(PAGE_SIZE);
43 _etext = .;
44#endif
14cf11af 45 }
cabb5587 46#ifdef CONFIG_PPC32
14cf11af
PM
47 _etext = .;
48 PROVIDE (etext = .);
49
50 RODATA
51 .fini : { *(.fini) } =0
52 .ctors : { *(.ctors) }
53 .dtors : { *(.dtors) }
54
55 .fixup : { *(.fixup) }
cabb5587 56#endif
14cf11af
PM
57
58 __ex_table : {
59 __start___ex_table = .;
60 *(__ex_table)
61 __stop___ex_table = .;
62 }
63
64 __bug_table : {
65 __start___bug_table = .;
66 *(__bug_table)
67 __stop___bug_table = .;
68 }
69
cabb5587
SR
70#ifdef CONFIG_PPC64
71 __ftr_fixup : {
72 __start___ftr_fixup = .;
73 *(__ftr_fixup)
74 __stop___ftr_fixup = .;
75 }
76
77 RODATA
78#endif
79
80#ifdef CONFIG_PPC32
14cf11af 81 /* Read-write section, merged into data segment: */
4a288563 82 . = ALIGN(PAGE_SIZE);
c16ff7e4 83 _sdata = .;
14cf11af
PM
84 .data :
85 {
86 *(.data)
87 *(.data1)
88 *(.sdata)
89 *(.sdata2)
90 *(.got.plt) *(.got)
91 *(.dynamic)
92 CONSTRUCTORS
93 }
94
4a288563 95 . = ALIGN(PAGE_SIZE);
14cf11af
PM
96 __nosave_begin = .;
97 .data_nosave : { *(.data.nosave) }
4a288563 98 . = ALIGN(PAGE_SIZE);
14cf11af
PM
99 __nosave_end = .;
100
101 . = ALIGN(32);
102 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
103
104 _edata = .;
105 PROVIDE (edata = .);
106
107 . = ALIGN(8192);
108 .data.init_task : { *(.data.init_task) }
4a288563 109#endif
14cf11af 110
cabb5587
SR
111 /* will be freed after init */
112 . = ALIGN(PAGE_SIZE);
14cf11af
PM
113 __init_begin = .;
114 .init.text : {
115 _sinittext = .;
116 *(.init.text)
117 _einittext = .;
118 }
cabb5587 119#ifdef CONFIG_PPC32
14cf11af
PM
120 /* .exit.text is discarded at runtime, not link time,
121 to deal with references from __bug_table */
122 .exit.text : { *(.exit.text) }
cabb5587 123#endif
14cf11af
PM
124 .init.data : {
125 *(.init.data);
126 __vtop_table_begin = .;
127 *(.vtop_fixup);
128 __vtop_table_end = .;
129 __ptov_table_begin = .;
130 *(.ptov_fixup);
131 __ptov_table_end = .;
132 }
cabb5587 133
14cf11af 134 . = ALIGN(16);
cabb5587 135 .init.setup : {
cabb5587 136 __setup_start = .;
cabb5587 137 *(.init.setup)
cabb5587 138 __setup_end = .;
cabb5587 139 }
cabb5587 140
14cf11af 141 .initcall.init : {
cabb5587 142 __initcall_start = .;
14cf11af
PM
143 *(.initcall1.init)
144 *(.initcall2.init)
145 *(.initcall3.init)
146 *(.initcall4.init)
147 *(.initcall5.init)
148 *(.initcall6.init)
149 *(.initcall7.init)
cabb5587 150 __initcall_end = .;
14cf11af 151 }
14cf11af 152
cabb5587 153 .con_initcall.init : {
cabb5587 154 __con_initcall_start = .;
cabb5587 155 *(.con_initcall.init)
cabb5587 156 __con_initcall_end = .;
cabb5587 157 }
14cf11af
PM
158
159 SECURITY_INIT
160
cabb5587 161#ifdef CONFIG_PPC32
14cf11af
PM
162 __start___ftr_fixup = .;
163 __ftr_fixup : { *(__ftr_fixup) }
164 __stop___ftr_fixup = .;
cabb5587
SR
165#else
166 . = ALIGN(PAGE_SIZE);
167 .init.ramfs : {
168 __initramfs_start = .;
169 *(.init.ramfs)
170 __initramfs_end = .;
171 }
172#endif
14cf11af 173
cabb5587 174#ifdef CONFIG_PPC32
14cf11af 175 . = ALIGN(32);
cabb5587
SR
176#endif
177 .data.percpu : {
cabb5587 178 __per_cpu_start = .;
cabb5587 179 *(.data.percpu)
cabb5587 180 __per_cpu_end = .;
cabb5587 181 }
14cf11af 182
cabb5587 183 . = ALIGN(PAGE_SIZE);
4a288563 184#ifdef CONFIG_PPC64
cabb5587
SR
185 . = ALIGN(16384);
186 __init_end = .;
187 /* freed after init ends here */
188
cabb5587
SR
189 /* Read/write sections */
190 . = ALIGN(PAGE_SIZE);
191 . = ALIGN(16384);
4a288563 192 _sdata = .;
cabb5587
SR
193 /* The initial task and kernel stack */
194 .data.init_task : {
195 *(.data.init_task)
196 }
197
198 . = ALIGN(PAGE_SIZE);
199 .data.page_aligned : {
200 *(.data.page_aligned)
201 }
202
203 .data.cacheline_aligned : {
204 *(.data.cacheline_aligned)
205 }
206
207 .data : {
208 *(.data .data.rel* .toc1)
209 *(.branch_lt)
210 }
211
212 .opd : {
213 *(.opd)
214 }
215
216 .got : {
217 __toc_start = .;
218 *(.got)
219 *(.toc)
220 . = ALIGN(PAGE_SIZE);
221 _edata = .;
222 }
223
cabb5587
SR
224 . = ALIGN(PAGE_SIZE);
225#else
14cf11af 226 __initramfs_start = .;
cabb5587
SR
227 .init.ramfs : {
228 *(.init.ramfs)
229 }
14cf11af
PM
230 __initramfs_end = .;
231
232 . = ALIGN(4096);
233 __init_end = .;
234
235 . = ALIGN(4096);
236 _sextratext = .;
237 _eextratext = .;
238
239 __bss_start = .;
cabb5587 240#endif
4a288563 241
cabb5587 242 .bss : {
cabb5587 243 __bss_start = .;
14cf11af
PM
244 *(.sbss) *(.scommon)
245 *(.dynbss)
246 *(.bss)
247 *(COMMON)
cabb5587 248 __bss_stop = .;
14cf11af 249 }
14cf11af 250
cabb5587
SR
251#ifdef CONFIG_PPC64
252 . = ALIGN(PAGE_SIZE);
253#endif
14cf11af 254 _end = . ;
cabb5587 255#ifdef CONFIG_PPC32
14cf11af 256 PROVIDE (end = .);
cabb5587 257#endif
14cf11af 258}
This page took 0.103448 seconds and 5 git commands to generate.