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