2 * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms
4 * Copyright (C) 2002,03,04,05 NEC Electronics Corporation
5 * Copyright (C) 2002,03,04,05 Miles Bader <miles@gnu.org>
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.
11 * Written by Miles Bader <miles@gnu.org>
14 #include <linux/config.h>
16 #define VMLINUX_SYMBOL(_sym_) _##_sym_
17 #include <asm-generic/vmlinux.lds.h>
19 /* For most platforms, this will define useful things like RAM addr/size. */
20 #include <asm/machdep.h>
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
30 /* Interrupt vectors. */
31 #define INTV_CONTENTS \
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. */ \
41 #define RODATA_CONTENTS \
43 *(.rodata) *(.rodata.*) \
44 *(__vermagic) /* Kernel version magic */ \
47 ___start_pci_fixups_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 = . ; \
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 = .; \
62 ___stop___ksymtab = .; \
63 /* Kernel symbol table: GPL-only symbols */ \
64 ___start___ksymtab_gpl = .; \
66 ___stop___ksymtab_gpl = .; \
67 /* Kernel symbol table: strings */ \
68 *(__ksymtab_strings) \
69 /* Kernel symbol table: Normal symbols */ \
70 ___start___kcrctab = .; \
72 ___stop___kcrctab = .; \
73 /* Kernel symbol table: GPL-only symbols */ \
74 ___start___kcrctab_gpl = .; \
76 ___stop___kcrctab_gpl = .; \
77 /* Built-in module parameters */ \
79 ___start___param = .; \
84 /* Kernel text segment, and some constant data areas. */
85 #define TEXT_CONTENTS \
89 *(.exit.text) /* 2.5 convention */ \
90 *(.text.exit) /* 2.4 convention */ \
93 __real_etext = . ; /* There may be data after here. */ \
98 . = ALIGN (16) ; /* Exception table. */ \
99 ___start___ex_table = . ; \
101 ___stop___ex_table = . ; \
105 /* Kernel data segment. */
106 #define DATA_CONTENTS \
109 *(.exit.data) /* 2.5 convention */ \
110 *(.data.exit) /* 2.4 convention */ \
112 *(.data.cacheline_aligned) \
113 . = ALIGN (0x2000) ; \
115 . = ALIGN (0x2000) ; \
118 /* Kernel BSS segment. */
119 #define BSS_CONTENTS \
124 __init_stack_end = . ; \
127 /* `initcall' tables. */
128 #define INITCALL_CONTENTS \
130 ___setup_start = . ; \
131 *(.init.setup) /* 2.5 convention */ \
132 *(.setup.init) /* 2.4 convention */ \
134 ___initcall_start = . ; \
144 ___initcall_end = . ; \
145 ___con_initcall_start = .; \
146 *(.con_initcall.init) \
147 ___con_initcall_end = .;
149 /* Contents of `init' section for a kernel that's loaded into RAM. */
150 #define RAMK_INIT_CONTENTS \
151 RAMK_INIT_CONTENTS_NO_END \
153 /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */
154 #define RAMK_INIT_CONTENTS_NO_END \
158 *(.init.text) /* 2.5 convention */ \
161 *(.text.init) /* 2.4 convention */ \
166 /* The contents of `init' section for a ROM-resident kernel which
167 should go into RAM. */
168 #define ROMK_INIT_RAM_CONTENTS \
171 *(.init.data) /* 2.5 convention */ \
172 *(.data.init) /* 2.4 convention */ \
176 /* The contents of `init' section for a ROM-resident kernel which
177 should go into ROM. */
178 #define ROMK_INIT_ROM_CONTENTS \
180 *(.init.text) /* 2.5 convention */ \
182 *(.text.init) /* 2.4 convention */ \
186 /* A root filesystem image, for kernels with an embedded root filesystem. */
187 #define ROOT_FS_CONTENTS \
188 __root_fs_image_start = . ; \
190 __root_fs_image_end = . ;
191 /* The initramfs archive. */
192 #define INITRAMFS_CONTENTS \
194 ___initramfs_start = . ; \
196 ___initramfs_end = . ;
197 /* Where the initial bootmap (bitmap for the boot-time memory allocator)
199 #define BOOTMAP_CONTENTS \
202 . = . + 4096 ; /* enough for 128MB. */
204 /* The contents of a `typical' kram area for a kernel in RAM. */
205 #define RAMK_KRAM_CONTENTS \
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) \
223 ROMK_INIT_ROM_CONTENTS \
227 __rom_copy_src_start = . ; \
231 __rom_copy_dst_start = . ; \
233 ROMK_INIT_RAM_CONTENTS \
234 __rom_copy_dst_end = . ; \
244 /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */
245 _jiffies = _jiffies_64 ;
248 /* Include an appropriate platform-dependent linker-script (which
249 usually should use the above macros to do most of the work). */
251 #ifdef CONFIG_V850E_SIM
255 #ifdef CONFIG_V850E2_SIM85E2
256 # include "sim85e2.ld"
259 #ifdef CONFIG_V850E2_FPGA85E2C
260 # include "fpga85e2c.ld"
263 #ifdef CONFIG_V850E2_ANNA
264 # ifdef CONFIG_ROM_KERNEL
265 # include "anna-rom.ld"
271 #ifdef CONFIG_V850E_AS85EP1
272 # ifdef CONFIG_ROM_KERNEL
273 # include "as85ep1-rom.ld"
275 # include "as85ep1.ld"
279 #ifdef CONFIG_RTE_CB_MA1
280 # ifdef CONFIG_ROM_KERNEL
281 # include "rte_ma1_cb-rom.ld"
283 # include "rte_ma1_cb.ld"
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"
293 # include "rte_nb85e_cb.ld"
297 #ifdef CONFIG_RTE_CB_ME2
298 # include "rte_me2_cb.ld"