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