2 * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms
4 * Copyright (C) 2002,03 NEC Electronics Corporation
5 * Copyright (C) 2002,03 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>
15 #include <asm-generic/vmlinux.lds.h>
18 /* The following macros contain the usual definitions for various data areas.
19 The prefix `RAMK_' is used to indicate macros suitable for kernels loaded
20 into RAM, and similarly `ROMK_' for ROM-resident kernels. Note that all
21 symbols are prefixed with an extra `_' for compatibility with the v850
25 /* Interrupt vectors. */
26 #define INTV_CONTENTS \
29 *(.intv.reset) /* Reset vector */ \
30 . = __intv_start + 0x10 ; \
31 *(.intv.common) /* Vectors common to all v850e proc */\
32 . = __intv_start + 0x80 ; \
33 *(.intv.mach) /* Machine-specific int. vectors. */ \
36 /* Kernel text segment, and some constant data areas. */
37 #define TEXT_CONTENTS \
40 *(.exit.text) /* 2.5 convention */ \
41 *(.text.exit) /* 2.4 convention */ \
44 __real_etext = . ; /* There may be data after here. */ \
49 . = ALIGN (16) ; /* Exception table. */ \
50 ___start___ex_table = . ; \
52 ___stop___ex_table = . ; \
56 /* Kernel data segment. */
57 #define DATA_CONTENTS \
60 *(.exit.data) /* 2.5 convention */ \
61 *(.data.exit) /* 2.4 convention */ \
63 *(.data.cacheline_aligned) \
64 . = ALIGN (0x2000) ; \
66 . = ALIGN (0x2000) ; \
69 /* Kernel BSS segment. */
70 #define BSS_CONTENTS \
75 __init_stack_end = . ; \
78 /* `initcall' tables. */
79 #define INITCALL_CONTENTS \
81 ___setup_start = . ; \
82 *(.init.setup) /* 2.5 convention */ \
83 *(.setup.init) /* 2.4 convention */ \
85 ___start___param = . ; \
87 ___stop___param = . ; \
88 ___initcall_start = . ; \
98 ___initcall_end = . ; \
99 ___con_initcall_start = .; \
100 *(.con_initcall.init) \
101 ___con_initcall_end = .;
103 /* Contents of `init' section for a kernel that's loaded into RAM. */
104 #define RAMK_INIT_CONTENTS \
105 RAMK_INIT_CONTENTS_NO_END \
107 /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */
108 #define RAMK_INIT_CONTENTS_NO_END \
112 *(.init.text) /* 2.5 convention */ \
115 *(.text.init) /* 2.4 convention */ \
120 /* The contents of `init' section for a ROM-resident kernel which
121 should go into RAM. */
122 #define ROMK_INIT_RAM_CONTENTS \
125 *(.init.data) /* 2.5 convention */ \
126 *(.data.init) /* 2.4 convention */ \
130 /* The contents of `init' section for a ROM-resident kernel which
131 should go into ROM. */
132 #define ROMK_INIT_ROM_CONTENTS \
134 *(.init.text) /* 2.5 convention */ \
136 *(.text.init) /* 2.4 convention */ \
140 /* A root filesystem image, for kernels with an embedded root filesystem. */
141 #define ROOT_FS_CONTENTS \
142 __root_fs_image_start = . ; \
144 __root_fs_image_end = . ;
145 /* The initramfs archive. */
146 #define INITRAMFS_CONTENTS \
148 ___initramfs_start = . ; \
150 ___initramfs_end = . ;
151 /* Where the initial bootmap (bitmap for the boot-time memory allocator)
153 #define BOOTMAP_CONTENTS \
156 . = . + 4096 ; /* enough for 128MB. */
158 /* The contents of a `typical' kram area for a kernel in RAM. */
159 #define RAMK_KRAM_CONTENTS \
169 /* Define output sections normally used for a ROM-resident kernel.
170 ROM and RAM should be appropriate memory areas to use for kernel
171 ROM and RAM data. This assumes that ROM starts at 0 (and thus can
172 hold the interrupt vectors). */
173 #define ROMK_SECTIONS(ROM, RAM) \
177 ROMK_INIT_ROM_CONTENTS \
181 __rom_copy_src_start = . ; \
185 __rom_copy_dst_start = . ; \
187 ROMK_INIT_RAM_CONTENTS \
188 __rom_copy_dst_end = . ; \
198 /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */
199 _jiffies = _jiffies_64 ;
202 /* Include an appropriate platform-dependent linker-script (which
203 usually should use the above macros to do most of the work). */
205 #ifdef CONFIG_V850E_SIM
209 #ifdef CONFIG_V850E2_SIM85E2C
210 # include "sim85e2c.ld"
213 #ifdef CONFIG_V850E2_FPGA85E2C
214 # include "fpga85e2c.ld"
217 #ifdef CONFIG_V850E2_ANNA
218 # ifdef CONFIG_ROM_KERNEL
219 # include "anna-rom.ld"
225 #ifdef CONFIG_V850E_AS85EP1
226 # ifdef CONFIG_ROM_KERNEL
227 # include "as85ep1-rom.ld"
229 # include "as85ep1.ld"
233 #ifdef CONFIG_RTE_CB_MA1
234 # ifdef CONFIG_ROM_KERNEL
235 # include "rte_ma1_cb-rom.ld"
237 # include "rte_ma1_cb.ld"
241 #ifdef CONFIG_RTE_CB_NB85E
242 # ifdef CONFIG_ROM_KERNEL
243 # include "rte_nb85e_cb-rom.ld"
244 # elif defined(CONFIG_RTE_CB_MULTI)
245 # include "rte_nb85e_cb-multi.ld"
247 # include "rte_nb85e_cb.ld"