]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/v850/kernel/vmlinux.lds.S
Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[mirror_ubuntu-zesty-kernel.git] / arch / v850 / kernel / vmlinux.lds.S
1 /*
2 * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms
3 *
4 * Copyright (C) 2002,03,04,05 NEC Electronics Corporation
5 * Copyright (C) 2002,03,04,05 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14 #include <linux/config.h>
15
16 #define VMLINUX_SYMBOL(_sym_) _##_sym_
17 #include <asm-generic/vmlinux.lds.h>
18
19 /* For most platforms, this will define useful things like RAM addr/size. */
20 #include <asm/machdep.h>
21
22
23 /* The following macros contain the usual definitions for various data areas.
24 The prefix `RAMK_' is used to indicate macros suitable for kernels loaded
25 into RAM, and similarly `ROMK_' for ROM-resident kernels. Note that all
26 symbols are prefixed with an extra `_' for compatibility with the v850
27 toolchain. */
28
29
30 /* Interrupt vectors. */
31 #define INTV_CONTENTS \
32 . = ALIGN (0x10) ; \
33 __intv_start = . ; \
34 *(.intv.reset) /* Reset vector */ \
35 . = __intv_start + 0x10 ; \
36 *(.intv.common) /* Vectors common to all v850e proc */\
37 . = __intv_start + 0x80 ; \
38 *(.intv.mach) /* Machine-specific int. vectors. */ \
39 __intv_end = . ;
40
41 #define RODATA_CONTENTS \
42 . = ALIGN (16) ; \
43 *(.rodata) *(.rodata.*) \
44 *(__vermagic) /* Kernel version magic */ \
45 *(.rodata1) \
46 /* PCI quirks */ \
47 ___start_pci_fixups_early = . ; \
48 *(.pci_fixup_early) \
49 ___end_pci_fixups_early = . ; \
50 ___start_pci_fixups_header = . ; \
51 *(.pci_fixup_header) \
52 ___end_pci_fixups_header = . ; \
53 ___start_pci_fixups_final = . ; \
54 *(.pci_fixup_final) \
55 ___end_pci_fixups_final = . ; \
56 ___start_pci_fixups_enable = . ; \
57 *(.pci_fixup_enable) \
58 ___end_pci_fixups_enable = . ; \
59 /* Kernel symbol table: Normal symbols */ \
60 ___start___ksymtab = .; \
61 *(__ksymtab) \
62 ___stop___ksymtab = .; \
63 /* Kernel symbol table: GPL-only symbols */ \
64 ___start___ksymtab_gpl = .; \
65 *(__ksymtab_gpl) \
66 ___stop___ksymtab_gpl = .; \
67 /* Kernel symbol table: strings */ \
68 *(__ksymtab_strings) \
69 /* Kernel symbol table: Normal symbols */ \
70 ___start___kcrctab = .; \
71 *(__kcrctab) \
72 ___stop___kcrctab = .; \
73 /* Kernel symbol table: GPL-only symbols */ \
74 ___start___kcrctab_gpl = .; \
75 *(__kcrctab_gpl) \
76 ___stop___kcrctab_gpl = .; \
77 /* Built-in module parameters */ \
78 . = ALIGN (4) ; \
79 ___start___param = .; \
80 *(__param) \
81 ___stop___param = .;
82
83
84 /* Kernel text segment, and some constant data areas. */
85 #define TEXT_CONTENTS \
86 __stext = . ; \
87 *(.text) \
88 SCHED_TEXT \
89 *(.exit.text) /* 2.5 convention */ \
90 *(.text.exit) /* 2.4 convention */ \
91 *(.text.lock) \
92 *(.exitcall.exit) \
93 __real_etext = . ; /* There may be data after here. */ \
94 RODATA_CONTENTS \
95 . = ALIGN (4) ; \
96 *(.call_table_data) \
97 *(.call_table_text) \
98 . = ALIGN (16) ; /* Exception table. */ \
99 ___start___ex_table = . ; \
100 *(__ex_table) \
101 ___stop___ex_table = . ; \
102 . = ALIGN (4) ; \
103 __etext = . ;
104
105 /* Kernel data segment. */
106 #define DATA_CONTENTS \
107 __sdata = . ; \
108 *(.data) \
109 *(.exit.data) /* 2.5 convention */ \
110 *(.data.exit) /* 2.4 convention */ \
111 . = ALIGN (16) ; \
112 *(.data.cacheline_aligned) \
113 . = ALIGN (0x2000) ; \
114 *(.data.init_task) \
115 . = ALIGN (0x2000) ; \
116 __edata = . ;
117
118 /* Kernel BSS segment. */
119 #define BSS_CONTENTS \
120 __sbss = . ; \
121 *(.bss) \
122 *(COMMON) \
123 . = ALIGN (4) ; \
124 __init_stack_end = . ; \
125 __ebss = . ;
126
127 /* `initcall' tables. */
128 #define INITCALL_CONTENTS \
129 . = ALIGN (16) ; \
130 ___setup_start = . ; \
131 *(.init.setup) /* 2.5 convention */ \
132 *(.setup.init) /* 2.4 convention */ \
133 ___setup_end = . ; \
134 ___initcall_start = . ; \
135 *(.initcall.init) \
136 *(.initcall1.init) \
137 *(.initcall2.init) \
138 *(.initcall3.init) \
139 *(.initcall4.init) \
140 *(.initcall5.init) \
141 *(.initcall6.init) \
142 *(.initcall7.init) \
143 . = ALIGN (4) ; \
144 ___initcall_end = . ; \
145 ___con_initcall_start = .; \
146 *(.con_initcall.init) \
147 ___con_initcall_end = .;
148
149 /* Contents of `init' section for a kernel that's loaded into RAM. */
150 #define RAMK_INIT_CONTENTS \
151 RAMK_INIT_CONTENTS_NO_END \
152 __init_end = . ;
153 /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */
154 #define RAMK_INIT_CONTENTS_NO_END \
155 . = ALIGN (4096) ; \
156 __init_start = . ; \
157 __sinittext = .; \
158 *(.init.text) /* 2.5 convention */ \
159 __einittext = .; \
160 *(.init.data) \
161 *(.text.init) /* 2.4 convention */ \
162 *(.data.init) \
163 INITCALL_CONTENTS \
164 INITRAMFS_CONTENTS
165
166 /* The contents of `init' section for a ROM-resident kernel which
167 should go into RAM. */
168 #define ROMK_INIT_RAM_CONTENTS \
169 . = ALIGN (4096) ; \
170 __init_start = . ; \
171 *(.init.data) /* 2.5 convention */ \
172 *(.data.init) /* 2.4 convention */ \
173 __init_end = . ; \
174 . = ALIGN (4096) ;
175
176 /* The contents of `init' section for a ROM-resident kernel which
177 should go into ROM. */
178 #define ROMK_INIT_ROM_CONTENTS \
179 _sinittext = .; \
180 *(.init.text) /* 2.5 convention */ \
181 _einittext = .; \
182 *(.text.init) /* 2.4 convention */ \
183 INITCALL_CONTENTS \
184 INITRAMFS_CONTENTS
185
186 /* A root filesystem image, for kernels with an embedded root filesystem. */
187 #define ROOT_FS_CONTENTS \
188 __root_fs_image_start = . ; \
189 *(.root) \
190 __root_fs_image_end = . ;
191 /* The initramfs archive. */
192 #define INITRAMFS_CONTENTS \
193 . = ALIGN (4) ; \
194 ___initramfs_start = . ; \
195 *(.init.ramfs) \
196 ___initramfs_end = . ;
197 /* Where the initial bootmap (bitmap for the boot-time memory allocator)
198 should be place. */
199 #define BOOTMAP_CONTENTS \
200 . = ALIGN (4096) ; \
201 __bootmap = . ; \
202 . = . + 4096 ; /* enough for 128MB. */
203
204 /* The contents of a `typical' kram area for a kernel in RAM. */
205 #define RAMK_KRAM_CONTENTS \
206 __kram_start = . ; \
207 TEXT_CONTENTS \
208 DATA_CONTENTS \
209 BSS_CONTENTS \
210 RAMK_INIT_CONTENTS \
211 __kram_end = . ; \
212 BOOTMAP_CONTENTS
213
214
215 /* Define output sections normally used for a ROM-resident kernel.
216 ROM and RAM should be appropriate memory areas to use for kernel
217 ROM and RAM data. This assumes that ROM starts at 0 (and thus can
218 hold the interrupt vectors). */
219 #define ROMK_SECTIONS(ROM, RAM) \
220 .rom : { \
221 INTV_CONTENTS \
222 TEXT_CONTENTS \
223 ROMK_INIT_ROM_CONTENTS \
224 ROOT_FS_CONTENTS \
225 } > ROM \
226 \
227 __rom_copy_src_start = . ; \
228 \
229 .data : { \
230 __kram_start = . ; \
231 __rom_copy_dst_start = . ; \
232 DATA_CONTENTS \
233 ROMK_INIT_RAM_CONTENTS \
234 __rom_copy_dst_end = . ; \
235 } > RAM AT> ROM \
236 \
237 .bss ALIGN (4) : { \
238 BSS_CONTENTS \
239 __kram_end = . ; \
240 BOOTMAP_CONTENTS \
241 } > RAM
242
243
244 /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */
245 _jiffies = _jiffies_64 ;
246
247
248 /* Include an appropriate platform-dependent linker-script (which
249 usually should use the above macros to do most of the work). */
250
251 #ifdef CONFIG_V850E_SIM
252 # include "sim.ld"
253 #endif
254
255 #ifdef CONFIG_V850E2_SIM85E2
256 # include "sim85e2.ld"
257 #endif
258
259 #ifdef CONFIG_V850E2_FPGA85E2C
260 # include "fpga85e2c.ld"
261 #endif
262
263 #ifdef CONFIG_V850E2_ANNA
264 # ifdef CONFIG_ROM_KERNEL
265 # include "anna-rom.ld"
266 # else
267 # include "anna.ld"
268 # endif
269 #endif
270
271 #ifdef CONFIG_V850E_AS85EP1
272 # ifdef CONFIG_ROM_KERNEL
273 # include "as85ep1-rom.ld"
274 # else
275 # include "as85ep1.ld"
276 # endif
277 #endif
278
279 #ifdef CONFIG_RTE_CB_MA1
280 # ifdef CONFIG_ROM_KERNEL
281 # include "rte_ma1_cb-rom.ld"
282 # else
283 # include "rte_ma1_cb.ld"
284 # endif
285 #endif
286
287 #ifdef CONFIG_RTE_CB_NB85E
288 # ifdef CONFIG_ROM_KERNEL
289 # include "rte_nb85e_cb-rom.ld"
290 # elif defined(CONFIG_RTE_CB_MULTI)
291 # include "rte_nb85e_cb-multi.ld"
292 # else
293 # include "rte_nb85e_cb.ld"
294 # endif
295 #endif
296
297 #ifdef CONFIG_RTE_CB_ME2
298 # include "rte_me2_cb.ld"
299 #endif
300