Merge branch 'master' into 85xx
[pandora-kernel.git] / arch / ia64 / kernel / vmlinux.lds.S
1
2 #include <asm/cache.h>
3 #include <asm/ptrace.h>
4 #include <asm/system.h>
5 #include <asm/pgtable.h>
6
7 #define LOAD_OFFSET     (KERNEL_START - KERNEL_TR_PAGE_SIZE)
8 #include <asm-generic/vmlinux.lds.h>
9
10 #define IVT_TEXT                                                        \
11                 VMLINUX_SYMBOL(__start_ivt_text) = .;                   \
12                 *(.text.ivt)                                            \
13                 VMLINUX_SYMBOL(__end_ivt_text) = .;
14
15 OUTPUT_FORMAT("elf64-ia64-little")
16 OUTPUT_ARCH(ia64)
17 ENTRY(phys_start)
18 jiffies = jiffies_64;
19 PHDRS {
20   code   PT_LOAD;
21   percpu PT_LOAD;
22   data   PT_LOAD;
23 }
24 SECTIONS
25 {
26   /* Sections to be discarded */
27   /DISCARD/ : {
28         *(.exit.text)
29         *(.exit.data)
30         *(.exitcall.exit)
31         *(.IA_64.unwind.exit.text)
32         *(.IA_64.unwind_info.exit.text)
33         }
34
35   v = PAGE_OFFSET;      /* this symbol is here to make debugging easier... */
36   phys_start = _start - LOAD_OFFSET;
37
38   code : { } :code
39   . = KERNEL_START;
40
41   _text = .;
42   _stext = .;
43
44   .text : AT(ADDR(.text) - LOAD_OFFSET)
45     {
46         IVT_TEXT
47         *(.text)
48         SCHED_TEXT
49         LOCK_TEXT
50         KPROBES_TEXT
51         *(.gnu.linkonce.t*)
52     }
53   .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
54         { *(.text2) }
55 #ifdef CONFIG_SMP
56   .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET)
57         { *(.text.lock) }
58 #endif
59   _etext = .;
60
61   /* Read-only data */
62
63   /* Exception table */
64   . = ALIGN(16);
65   __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
66         {
67           __start___ex_table = .;
68           *(__ex_table)
69           __stop___ex_table = .;
70         }
71
72   /* MCA table */
73   . = ALIGN(16);
74   __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
75         {
76           __start___mca_table = .;
77           *(__mca_table)
78           __stop___mca_table = .;
79         }
80
81   /* Global data */
82   _data = .;
83
84   /* Unwind info & table: */
85   . = ALIGN(8);
86   .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET)
87         { *(.IA_64.unwind_info*) }
88   .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET)
89         {
90           __start_unwind = .;
91           *(.IA_64.unwind*)
92           __end_unwind = .;
93         }
94
95   RODATA
96
97   .opd : AT(ADDR(.opd) - LOAD_OFFSET)
98         { *(.opd) }
99
100   /* Initialization code and data: */
101
102   . = ALIGN(PAGE_SIZE);
103   __init_begin = .;
104   .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
105         {
106           _sinittext = .;
107           *(.init.text)
108           _einittext = .;
109         }
110
111   .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
112         { *(.init.data) }
113
114   .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
115         {
116           __initramfs_start = .;
117           *(.init.ramfs)
118           __initramfs_end = .;
119         }
120
121    . = ALIGN(16);
122   .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
123         {
124           __setup_start = .;
125           *(.init.setup)
126           __setup_end = .;
127         }
128   .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
129         {
130           __initcall_start = .;
131         INITCALLS
132           __initcall_end = .;
133         }
134
135   .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
136         {
137           __start___vtop_patchlist = .;
138           *(.data.patch.vtop)
139           __end___vtop_patchlist = .;
140         }
141
142   .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
143         {
144           __start___mckinley_e9_bundles = .;
145           *(.data.patch.mckinley_e9)
146           __end___mckinley_e9_bundles = .;
147         }
148
149 #if defined(CONFIG_IA64_GENERIC)
150   /* Machine Vector */
151   . = ALIGN(16);
152   .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
153         {
154           machvec_start = .;
155           *(.machvec)
156           machvec_end = .;
157         }
158 #endif
159
160   . = ALIGN(8);
161    __con_initcall_start = .;
162   .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
163         { *(.con_initcall.init) }
164   __con_initcall_end = .;
165   __security_initcall_start = .;
166   .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
167         { *(.security_initcall.init) }
168   __security_initcall_end = .;
169   . = ALIGN(PAGE_SIZE);
170   __init_end = .;
171
172   /* The initial task and kernel stack */
173   .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
174         { *(.data.init_task) }
175
176   .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
177         { *(__special_page_section)
178           __start_gate_section = .;
179           *(.data.gate)
180           __stop_gate_section = .;
181         }
182   . = ALIGN(PAGE_SIZE);         /* make sure the gate page doesn't expose
183                                  * kernel data
184                                  */
185
186   .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
187         { *(.data.read_mostly) }
188
189   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
190         { *(.data.cacheline_aligned) }
191
192   /* Per-cpu data: */
193   percpu : { } :percpu
194   . = ALIGN(PERCPU_PAGE_SIZE);
195   __phys_per_cpu_start = .;
196   .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
197         {
198                 __per_cpu_start = .;
199                 *(.data.percpu)
200                 __per_cpu_end = .;
201         }
202   . = __phys_per_cpu_start + PERCPU_PAGE_SIZE;  /* ensure percpu data fits
203                                                  * into percpu page size
204                                                  */
205
206   data : { } :data
207   .data : AT(ADDR(.data) - LOAD_OFFSET)
208         { *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS }
209
210   . = ALIGN(16);        /* gp must be 16-byte aligned for exc. table */
211   .got : AT(ADDR(.got) - LOAD_OFFSET)
212         { *(.got.plt) *(.got) }
213   __gp = ADDR(.got) + 0x200000;
214   /* We want the small data sections together, so single-instruction offsets
215      can access them all, and initialized data all before uninitialized, so
216      we can shorten the on-disk segment size.  */
217   .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
218         { *(.sdata) *(.sdata1) *(.srdata) }
219   _edata  =  .;
220   _bss = .;
221   .sbss : AT(ADDR(.sbss) - LOAD_OFFSET)
222         { *(.sbss) *(.scommon) }
223   .bss : AT(ADDR(.bss) - LOAD_OFFSET)
224         { *(.bss) *(COMMON) }
225
226   _end = .;
227
228   code : { } :code
229   /* Stabs debugging sections.  */
230   .stab 0 : { *(.stab) }
231   .stabstr 0 : { *(.stabstr) }
232   .stab.excl 0 : { *(.stab.excl) }
233   .stab.exclstr 0 : { *(.stab.exclstr) }
234   .stab.index 0 : { *(.stab.index) }
235   .stab.indexstr 0 : { *(.stab.indexstr) }
236   /* DWARF debug sections.
237      Symbols in the DWARF debugging sections are relative to the beginning
238      of the section so we begin them at 0.  */
239   /* DWARF 1 */
240   .debug          0 : { *(.debug) }
241   .line           0 : { *(.line) }
242   /* GNU DWARF 1 extensions */
243   .debug_srcinfo  0 : { *(.debug_srcinfo) }
244   .debug_sfnames  0 : { *(.debug_sfnames) }
245   /* DWARF 1.1 and DWARF 2 */
246   .debug_aranges  0 : { *(.debug_aranges) }
247   .debug_pubnames 0 : { *(.debug_pubnames) }
248   /* DWARF 2 */
249   .debug_info     0 : { *(.debug_info) }
250   .debug_abbrev   0 : { *(.debug_abbrev) }
251   .debug_line     0 : { *(.debug_line) }
252   .debug_frame    0 : { *(.debug_frame) }
253   .debug_str      0 : { *(.debug_str) }
254   .debug_loc      0 : { *(.debug_loc) }
255   .debug_macinfo  0 : { *(.debug_macinfo) }
256   /* SGI/MIPS DWARF 2 extensions */
257   .debug_weaknames 0 : { *(.debug_weaknames) }
258   .debug_funcnames 0 : { *(.debug_funcnames) }
259   .debug_typenames 0 : { *(.debug_typenames) }
260   .debug_varnames  0 : { *(.debug_varnames) }
261   /* These must appear regardless of  .  */
262   /* Discard them for now since Intel SoftSDV cannot handle them.
263   .comment 0 : { *(.comment) }
264   .note 0 : { *(.note) }
265   */
266   /DISCARD/ : { *(.comment) }
267   /DISCARD/ : { *(.note) }
268 }