diff options
Diffstat (limited to 'arch/powerpc/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 258 |
1 files changed, 258 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S new file mode 100644 index 000000000000..7fa7b15fd8e6 --- /dev/null +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -0,0 +1,258 @@ | |||
1 | #include <linux/config.h> | ||
2 | #ifdef CONFIG_PPC64 | ||
3 | #include <asm/page.h> | ||
4 | #else | ||
5 | #define PAGE_SIZE 4096 | ||
6 | #define KERNELBASE CONFIG_KERNEL_START | ||
7 | #endif | ||
8 | #include <asm-generic/vmlinux.lds.h> | ||
9 | |||
10 | ENTRY(_stext) | ||
11 | |||
12 | #ifdef CONFIG_PPC64 | ||
13 | OUTPUT_ARCH(powerpc:common64) | ||
14 | jiffies = jiffies_64; | ||
15 | #else | ||
16 | OUTPUT_ARCH(powerpc:common) | ||
17 | jiffies = jiffies_64 + 4; | ||
18 | #endif | ||
19 | SECTIONS | ||
20 | { | ||
21 | /* Sections to be discarded. */ | ||
22 | /DISCARD/ : { | ||
23 | *(.exitcall.exit) | ||
24 | *(.exit.data) | ||
25 | } | ||
26 | |||
27 | . = KERNELBASE; | ||
28 | |||
29 | /* Read-only sections, merged into text segment: */ | ||
30 | .text : { | ||
31 | *(.text .text.*) | ||
32 | SCHED_TEXT | ||
33 | LOCK_TEXT | ||
34 | KPROBES_TEXT | ||
35 | *(.fixup) | ||
36 | #ifdef CONFIG_PPC32 | ||
37 | *(.got1) | ||
38 | __got2_start = .; | ||
39 | *(.got2) | ||
40 | __got2_end = .; | ||
41 | #else | ||
42 | . = ALIGN(PAGE_SIZE); | ||
43 | _etext = .; | ||
44 | #endif | ||
45 | } | ||
46 | #ifdef CONFIG_PPC32 | ||
47 | _etext = .; | ||
48 | PROVIDE (etext = .); | ||
49 | |||
50 | RODATA | ||
51 | .fini : { *(.fini) } =0 | ||
52 | .ctors : { *(.ctors) } | ||
53 | .dtors : { *(.dtors) } | ||
54 | |||
55 | .fixup : { *(.fixup) } | ||
56 | #endif | ||
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 | |||
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 | ||
81 | /* Read-write section, merged into data segment: */ | ||
82 | . = ALIGN(PAGE_SIZE); | ||
83 | _sdata = .; | ||
84 | .data : | ||
85 | { | ||
86 | *(.data) | ||
87 | *(.data1) | ||
88 | *(.sdata) | ||
89 | *(.sdata2) | ||
90 | *(.got.plt) *(.got) | ||
91 | *(.dynamic) | ||
92 | CONSTRUCTORS | ||
93 | } | ||
94 | |||
95 | . = ALIGN(PAGE_SIZE); | ||
96 | __nosave_begin = .; | ||
97 | .data_nosave : { *(.data.nosave) } | ||
98 | . = ALIGN(PAGE_SIZE); | ||
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) } | ||
109 | #endif | ||
110 | |||
111 | /* will be freed after init */ | ||
112 | . = ALIGN(PAGE_SIZE); | ||
113 | __init_begin = .; | ||
114 | .init.text : { | ||
115 | _sinittext = .; | ||
116 | *(.init.text) | ||
117 | _einittext = .; | ||
118 | } | ||
119 | #ifdef CONFIG_PPC32 | ||
120 | /* .exit.text is discarded at runtime, not link time, | ||
121 | to deal with references from __bug_table */ | ||
122 | .exit.text : { *(.exit.text) } | ||
123 | #endif | ||
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 | } | ||
133 | |||
134 | . = ALIGN(16); | ||
135 | .init.setup : { | ||
136 | __setup_start = .; | ||
137 | *(.init.setup) | ||
138 | __setup_end = .; | ||
139 | } | ||
140 | |||
141 | .initcall.init : { | ||
142 | __initcall_start = .; | ||
143 | *(.initcall1.init) | ||
144 | *(.initcall2.init) | ||
145 | *(.initcall3.init) | ||
146 | *(.initcall4.init) | ||
147 | *(.initcall5.init) | ||
148 | *(.initcall6.init) | ||
149 | *(.initcall7.init) | ||
150 | __initcall_end = .; | ||
151 | } | ||
152 | |||
153 | .con_initcall.init : { | ||
154 | __con_initcall_start = .; | ||
155 | *(.con_initcall.init) | ||
156 | __con_initcall_end = .; | ||
157 | } | ||
158 | |||
159 | SECURITY_INIT | ||
160 | |||
161 | #ifdef CONFIG_PPC32 | ||
162 | __start___ftr_fixup = .; | ||
163 | __ftr_fixup : { *(__ftr_fixup) } | ||
164 | __stop___ftr_fixup = .; | ||
165 | #else | ||
166 | . = ALIGN(PAGE_SIZE); | ||
167 | .init.ramfs : { | ||
168 | __initramfs_start = .; | ||
169 | *(.init.ramfs) | ||
170 | __initramfs_end = .; | ||
171 | } | ||
172 | #endif | ||
173 | |||
174 | #ifdef CONFIG_PPC32 | ||
175 | . = ALIGN(32); | ||
176 | #endif | ||
177 | .data.percpu : { | ||
178 | __per_cpu_start = .; | ||
179 | *(.data.percpu) | ||
180 | __per_cpu_end = .; | ||
181 | } | ||
182 | |||
183 | . = ALIGN(PAGE_SIZE); | ||
184 | #ifdef CONFIG_PPC64 | ||
185 | . = ALIGN(16384); | ||
186 | __init_end = .; | ||
187 | /* freed after init ends here */ | ||
188 | |||
189 | /* Read/write sections */ | ||
190 | . = ALIGN(PAGE_SIZE); | ||
191 | . = ALIGN(16384); | ||
192 | _sdata = .; | ||
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 | |||
224 | . = ALIGN(PAGE_SIZE); | ||
225 | #else | ||
226 | __initramfs_start = .; | ||
227 | .init.ramfs : { | ||
228 | *(.init.ramfs) | ||
229 | } | ||
230 | __initramfs_end = .; | ||
231 | |||
232 | . = ALIGN(4096); | ||
233 | __init_end = .; | ||
234 | |||
235 | . = ALIGN(4096); | ||
236 | _sextratext = .; | ||
237 | _eextratext = .; | ||
238 | |||
239 | __bss_start = .; | ||
240 | #endif | ||
241 | |||
242 | .bss : { | ||
243 | __bss_start = .; | ||
244 | *(.sbss) *(.scommon) | ||
245 | *(.dynbss) | ||
246 | *(.bss) | ||
247 | *(COMMON) | ||
248 | __bss_stop = .; | ||
249 | } | ||
250 | |||
251 | #ifdef CONFIG_PPC64 | ||
252 | . = ALIGN(PAGE_SIZE); | ||
253 | #endif | ||
254 | _end = . ; | ||
255 | #ifdef CONFIG_PPC32 | ||
256 | PROVIDE (end = .); | ||
257 | #endif | ||
258 | } | ||