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