2 * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms
4 * Copyright (C) 2002,03,04 NEC Electronics Corporation
5 * Copyright (C) 2002,03,04 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 #define VMLINUX_SYMBOL(_sym_) _##_sym_
16 #include <asm-generic/vmlinux.lds.h>
18 /* For most platforms, this will define useful things like RAM addr/size. */
19 #include <asm/machdep.h>
22 /* The following macros contain the usual definitions for various data areas.
23 The prefix `RAMK_' is used to indicate macros suitable for kernels loaded
24 into RAM, and similarly `ROMK_' for ROM-resident kernels. Note that all
25 symbols are prefixed with an extra `_' for compatibility with the v850
29 /* Interrupt vectors. */
30 #define INTV_CONTENTS \
33 *(.intv.reset) /* Reset vector */ \
34 . = __intv_start + 0x10 ; \
35 *(.intv.common) /* Vectors common to all v850e proc */\
36 . = __intv_start + 0x80 ; \
37 *(.intv.mach) /* Machine-specific int. vectors. */ \
40 #define RODATA_CONTENTS \
42 *(.rodata) *(.rodata.*) \
43 *(__vermagic) /* Kernel version magic */ \
45 /* Kernel symbol table: Normal symbols */ \
46 ___start___ksymtab = .; \
48 ___stop___ksymtab = .; \
49 /* Kernel symbol table: GPL-only symbols */ \
50 ___start___ksymtab_gpl = .; \
52 ___stop___ksymtab_gpl = .; \
53 /* Kernel symbol table: strings */ \
54 *(__ksymtab_strings) \
55 /* Kernel symbol table: Normal symbols */ \
56 ___start___kcrctab = .; \
58 ___stop___kcrctab = .; \
59 /* Kernel symbol table: GPL-only symbols */ \
60 ___start___kcrctab_gpl = .; \
62 ___stop___kcrctab_gpl = .; \
64 /* Kernel text segment, and some constant data areas. */
65 #define TEXT_CONTENTS \
69 *(.exit.text) /* 2.5 convention */ \
70 *(.text.exit) /* 2.4 convention */ \
73 __real_etext = . ; /* There may be data after here. */ \
78 . = ALIGN (16) ; /* Exception table. */ \
79 ___start___ex_table = . ; \
81 ___stop___ex_table = . ; \
85 /* Kernel data segment. */
86 #define DATA_CONTENTS \
89 *(.exit.data) /* 2.5 convention */ \
90 *(.data.exit) /* 2.4 convention */ \
92 *(.data.cacheline_aligned) \
93 . = ALIGN (0x2000) ; \
95 . = ALIGN (0x2000) ; \
98 /* Kernel BSS segment. */
99 #define BSS_CONTENTS \
104 __init_stack_end = . ; \
107 /* `initcall' tables. */
108 #define INITCALL_CONTENTS \
110 ___setup_start = . ; \
111 *(.init.setup) /* 2.5 convention */ \
112 *(.setup.init) /* 2.4 convention */ \
114 ___initcall_start = . ; \
124 ___initcall_end = . ; \
125 ___con_initcall_start = .; \
126 *(.con_initcall.init) \
127 ___con_initcall_end = .;
129 /* Contents of `init' section for a kernel that's loaded into RAM. */
130 #define RAMK_INIT_CONTENTS \
131 RAMK_INIT_CONTENTS_NO_END \
133 /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */
134 #define RAMK_INIT_CONTENTS_NO_END \
138 *(.init.text) /* 2.5 convention */ \
141 *(.text.init) /* 2.4 convention */ \
146 /* The contents of `init' section for a ROM-resident kernel which
147 should go into RAM. */
148 #define ROMK_INIT_RAM_CONTENTS \
151 *(.init.data) /* 2.5 convention */ \
152 *(.data.init) /* 2.4 convention */ \
156 /* The contents of `init' section for a ROM-resident kernel which
157 should go into ROM. */
158 #define ROMK_INIT_ROM_CONTENTS \
160 *(.init.text) /* 2.5 convention */ \
162 *(.text.init) /* 2.4 convention */ \
166 /* A root filesystem image, for kernels with an embedded root filesystem. */
167 #define ROOT_FS_CONTENTS \
168 __root_fs_image_start = . ; \
170 __root_fs_image_end = . ;
171 /* The initramfs archive. */
172 #define INITRAMFS_CONTENTS \
174 ___initramfs_start = . ; \
176 ___initramfs_end = . ;
177 /* Where the initial bootmap (bitmap for the boot-time memory allocator)
179 #define BOOTMAP_CONTENTS \
182 . = . + 4096 ; /* enough for 128MB. */
184 /* The contents of a `typical' kram area for a kernel in RAM. */
185 #define RAMK_KRAM_CONTENTS \
195 /* Define output sections normally used for a ROM-resident kernel.
196 ROM and RAM should be appropriate memory areas to use for kernel
197 ROM and RAM data. This assumes that ROM starts at 0 (and thus can
198 hold the interrupt vectors). */
199 #define ROMK_SECTIONS(ROM, RAM) \
203 ROMK_INIT_ROM_CONTENTS \
207 __rom_copy_src_start = . ; \
211 __rom_copy_dst_start = . ; \
213 ROMK_INIT_RAM_CONTENTS \
214 __rom_copy_dst_end = . ; \
224 /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */
225 _jiffies = _jiffies_64 ;
228 /* Include an appropriate platform-dependent linker-script (which
229 usually should use the above macros to do most of the work). */
231 #ifdef CONFIG_V850E_SIM
235 #ifdef CONFIG_V850E2_SIM85E2
236 # include "sim85e2.ld"
239 #ifdef CONFIG_V850E2_FPGA85E2C
240 # include "fpga85e2c.ld"
243 #ifdef CONFIG_V850E2_ANNA
244 # ifdef CONFIG_ROM_KERNEL
245 # include "anna-rom.ld"
251 #ifdef CONFIG_V850E_AS85EP1
252 # ifdef CONFIG_ROM_KERNEL
253 # include "as85ep1-rom.ld"
255 # include "as85ep1.ld"
259 #ifdef CONFIG_RTE_CB_MA1
260 # ifdef CONFIG_ROM_KERNEL
261 # include "rte_ma1_cb-rom.ld"
263 # include "rte_ma1_cb.ld"
267 #ifdef CONFIG_RTE_CB_NB85E
268 # ifdef CONFIG_ROM_KERNEL
269 # include "rte_nb85e_cb-rom.ld"
270 # elif defined(CONFIG_RTE_CB_MULTI)
271 # include "rte_nb85e_cb-multi.ld"
273 # include "rte_nb85e_cb.ld"
277 #ifdef CONFIG_RTE_CB_ME2
278 # include "rte_me2_cb.ld"