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