]>
Commit | Line | Data |
---|---|---|
c51e3a41 | 1 | #ifdef CONFIG_PPC64 |
cabb5587 | 2 | #include <asm/page.h> |
e8222502 | 3 | #define PROVIDE32(x) PROVIDE(__unused__##x) |
c51e3a41 PM |
4 | #else |
5 | #define PAGE_SIZE 4096 | |
6 | #define KERNELBASE CONFIG_KERNEL_START | |
e8222502 | 7 | #define PROVIDE32(x) PROVIDE(x) |
c51e3a41 | 8 | #endif |
14cf11af PM |
9 | #include <asm-generic/vmlinux.lds.h> |
10 | ||
e19e4ab4 ME |
11 | ENTRY(_stext) |
12 | ||
cabb5587 SR |
13 | #ifdef CONFIG_PPC64 |
14 | OUTPUT_ARCH(powerpc:common64) | |
15 | jiffies = jiffies_64; | |
16 | #else | |
14cf11af PM |
17 | OUTPUT_ARCH(powerpc:common) |
18 | jiffies = jiffies_64 + 4; | |
cabb5587 | 19 | #endif |
14cf11af PM |
20 | SECTIONS |
21 | { | |
e8222502 BH |
22 | /* Sections to be discarded. */ |
23 | /DISCARD/ : { | |
24 | *(.exitcall.exit) | |
25 | *(.exit.data) | |
26 | } | |
14cf11af | 27 | |
e8222502 | 28 | . = KERNELBASE; |
14cf11af | 29 | |
e8222502 BH |
30 | /* |
31 | * Text, read only data and other permanent read-only sections | |
32 | */ | |
33 | ||
34 | /* Text and gots */ | |
35 | .text : { | |
36 | *(.text .text.*) | |
37 | SCHED_TEXT | |
38 | LOCK_TEXT | |
39 | KPROBES_TEXT | |
40 | *(.fixup) | |
14cf11af | 41 | |
e8222502 BH |
42 | #ifdef CONFIG_PPC32 |
43 | *(.got1) | |
44 | __got2_start = .; | |
45 | *(.got2) | |
46 | __got2_end = .; | |
47 | #endif /* CONFIG_PPC32 */ | |
48 | ||
49 | . = ALIGN(PAGE_SIZE); | |
50 | _etext = .; | |
51 | PROVIDE32 (etext = .); | |
52 | } | |
53 | ||
54 | /* Read-only data */ | |
55 | RODATA | |
56 | ||
57 | /* Exception & bug tables */ | |
14cf11af PM |
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 | ||
e8222502 BH |
70 | /* |
71 | * Init sections discarded at runtime | |
72 | */ | |
73 | . = ALIGN(PAGE_SIZE); | |
74 | __init_begin = .; | |
75 | ||
76 | .init.text : { | |
77 | _sinittext = .; | |
78 | *(.init.text) | |
79 | _einittext = .; | |
80 | } | |
81 | ||
82 | /* .exit.text is discarded at runtime, not link time, | |
83 | * to deal with references from __bug_table | |
84 | */ | |
85 | .exit.text : { *(.exit.text) } | |
86 | ||
87 | .init.data : { | |
88 | *(.init.data); | |
89 | __vtop_table_begin = .; | |
90 | *(.vtop_fixup); | |
91 | __vtop_table_end = .; | |
92 | __ptov_table_begin = .; | |
93 | *(.ptov_fixup); | |
94 | __ptov_table_end = .; | |
c4e3ea25 SR |
95 | #ifdef CONFIG_PPC_ISERIES |
96 | __dt_strings_start = .; | |
97 | *(.dt_strings); | |
98 | __dt_strings_end = .; | |
99 | #endif | |
e8222502 BH |
100 | } |
101 | ||
102 | . = ALIGN(16); | |
103 | .init.setup : { | |
104 | __setup_start = .; | |
105 | *(.init.setup) | |
106 | __setup_end = .; | |
107 | } | |
108 | ||
109 | .initcall.init : { | |
110 | __initcall_start = .; | |
111 | *(.initcall1.init) | |
112 | *(.initcall2.init) | |
113 | *(.initcall3.init) | |
114 | *(.initcall4.init) | |
115 | *(.initcall5.init) | |
116 | *(.initcall6.init) | |
117 | *(.initcall7.init) | |
118 | __initcall_end = .; | |
119 | } | |
120 | ||
121 | .con_initcall.init : { | |
122 | __con_initcall_start = .; | |
123 | *(.con_initcall.init) | |
124 | __con_initcall_end = .; | |
125 | } | |
126 | ||
127 | SECURITY_INIT | |
128 | ||
129 | . = ALIGN(8); | |
cabb5587 SR |
130 | __ftr_fixup : { |
131 | __start___ftr_fixup = .; | |
132 | *(__ftr_fixup) | |
133 | __stop___ftr_fixup = .; | |
134 | } | |
135 | ||
e8222502 BH |
136 | . = ALIGN(PAGE_SIZE); |
137 | .init.ramfs : { | |
138 | __initramfs_start = .; | |
139 | *(.init.ramfs) | |
140 | __initramfs_end = .; | |
141 | } | |
cabb5587 SR |
142 | |
143 | #ifdef CONFIG_PPC32 | |
e8222502 BH |
144 | . = ALIGN(32); |
145 | #else | |
146 | . = ALIGN(128); | |
4a288563 | 147 | #endif |
e8222502 BH |
148 | .data.percpu : { |
149 | __per_cpu_start = .; | |
150 | *(.data.percpu) | |
151 | __per_cpu_end = .; | |
152 | } | |
14cf11af | 153 | |
e8222502 BH |
154 | . = ALIGN(8); |
155 | .machine.desc : { | |
156 | __machine_desc_start = . ; | |
157 | *(.machine.desc) | |
158 | __machine_desc_end = . ; | |
159 | } | |
160 | ||
161 | /* freed after init ends here */ | |
162 | . = ALIGN(PAGE_SIZE); | |
163 | __init_end = .; | |
164 | ||
165 | /* | |
166 | * And now the various read/write data | |
167 | */ | |
168 | ||
169 | . = ALIGN(PAGE_SIZE); | |
170 | _sdata = .; | |
14cf11af | 171 | |
cabb5587 | 172 | #ifdef CONFIG_PPC32 |
e8222502 BH |
173 | .data : |
174 | { | |
175 | *(.data) | |
176 | *(.sdata) | |
177 | *(.got.plt) *(.got) | |
178 | } | |
cabb5587 | 179 | #else |
e8222502 BH |
180 | .data : { |
181 | *(.data .data.rel* .toc1) | |
182 | *(.branch_lt) | |
183 | } | |
14cf11af | 184 | |
e8222502 BH |
185 | .opd : { |
186 | *(.opd) | |
187 | } | |
188 | ||
189 | .got : { | |
190 | __toc_start = .; | |
191 | *(.got) | |
192 | *(.toc) | |
193 | } | |
cabb5587 | 194 | #endif |
14cf11af | 195 | |
e8222502 BH |
196 | . = ALIGN(PAGE_SIZE); |
197 | _edata = .; | |
198 | PROVIDE32 (edata = .); | |
199 | ||
200 | /* The initial task and kernel stack */ | |
201 | #ifdef CONFIG_PPC32 | |
202 | . = ALIGN(8192); | |
cabb5587 | 203 | #else |
e8222502 BH |
204 | . = ALIGN(16384); |
205 | #endif | |
206 | .data.init_task : { | |
207 | *(.data.init_task) | |
208 | } | |
14cf11af | 209 | |
e8222502 BH |
210 | . = ALIGN(PAGE_SIZE); |
211 | .data.page_aligned : { | |
212 | *(.data.page_aligned) | |
213 | } | |
14cf11af | 214 | |
e8222502 BH |
215 | .data.cacheline_aligned : { |
216 | *(.data.cacheline_aligned) | |
217 | } | |
14cf11af | 218 | |
e8222502 BH |
219 | . = ALIGN(PAGE_SIZE); |
220 | __data_nosave : { | |
221 | __nosave_begin = .; | |
222 | *(.data.nosave) | |
223 | . = ALIGN(PAGE_SIZE); | |
224 | __nosave_end = .; | |
225 | } | |
4a288563 | 226 | |
e8222502 BH |
227 | /* |
228 | * And finally the bss | |
229 | */ | |
230 | ||
231 | .bss : { | |
232 | __bss_start = .; | |
233 | *(.sbss) *(.scommon) | |
234 | *(.dynbss) | |
235 | *(.bss) | |
236 | *(COMMON) | |
237 | __bss_stop = .; | |
238 | } | |
14cf11af | 239 | |
e8222502 BH |
240 | . = ALIGN(PAGE_SIZE); |
241 | _end = . ; | |
242 | PROVIDE32 (end = .); | |
14cf11af | 243 | } |