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>
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 */ \
46 ___start_pci_fixups_early = . ; \
48 ___end_pci_fixups_early = . ; \
49 ___start_pci_fixups_header = . ; \
50 *(.pci_fixup_header) \
51 ___end_pci_fixups_header = . ; \
52 ___start_pci_fixups_final = . ; \
54 ___end_pci_fixups_final = . ; \
55 ___start_pci_fixups_enable = . ; \
56 *(.pci_fixup_enable) \
57 ___end_pci_fixups_enable = . ; \
58 /* Kernel symbol table: Normal symbols */ \
59 ___start___ksymtab = .; \
61 ___stop___ksymtab = .; \
62 /* Kernel symbol table: GPL-only symbols */ \
63 ___start___ksymtab_gpl = .; \
65 ___stop___ksymtab_gpl = .; \
66 /* Kernel symbol table: GPL-future symbols */ \
67 ___start___ksymtab_gpl_future = .; \
68 *(__ksymtab_gpl_future) \
69 ___stop___ksymtab_gpl_future = .; \
70 /* Kernel symbol table: strings */ \
71 *(__ksymtab_strings) \
72 /* Kernel symbol table: Normal symbols */ \
73 ___start___kcrctab = .; \
75 ___stop___kcrctab = .; \
76 /* Kernel symbol table: GPL-only symbols */ \
77 ___start___kcrctab_gpl = .; \
79 ___stop___kcrctab_gpl = .; \
80 /* Kernel symbol table: GPL-future symbols */ \
81 ___start___kcrctab_gpl_future = .; \
82 *(__kcrctab_gpl_future) \
83 ___stop___kcrctab_gpl_future = .; \
84 /* Built-in module parameters */ \
86 ___start___param = .; \
91 /* Kernel text segment, and some constant data areas. */
92 #define TEXT_CONTENTS \
96 *(.exit.text) /* 2.5 convention */ \
97 *(.text.exit) /* 2.4 convention */ \
100 __real_etext = . ; /* There may be data after here. */ \
103 *(.call_table_data) \
104 *(.call_table_text) \
105 . = ALIGN (16) ; /* Exception table. */ \
106 ___start___ex_table = . ; \
108 ___stop___ex_table = . ; \
112 /* Kernel data segment. */
113 #define DATA_CONTENTS \
116 *(.exit.data) /* 2.5 convention */ \
117 *(.data.exit) /* 2.4 convention */ \
119 *(.data.cacheline_aligned) \
120 . = ALIGN (0x2000) ; \
122 . = ALIGN (0x2000) ; \
125 /* Kernel BSS segment. */
126 #define BSS_CONTENTS \
131 __init_stack_end = . ; \
134 /* `initcall' tables. */
135 #define INITCALL_CONTENTS \
137 ___setup_start = . ; \
138 *(.init.setup) /* 2.5 convention */ \
139 *(.setup.init) /* 2.4 convention */ \
141 ___initcall_start = . ; \
145 ___initcall_end = . ; \
146 ___con_initcall_start = .; \
147 *(.con_initcall.init) \
148 ___con_initcall_end = .;
150 /* Contents of `init' section for a kernel that's loaded into RAM. */
151 #define RAMK_INIT_CONTENTS \
152 RAMK_INIT_CONTENTS_NO_END \
154 /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */
155 #define RAMK_INIT_CONTENTS_NO_END \
159 *(.init.text) /* 2.5 convention */ \
162 *(.text.init) /* 2.4 convention */ \
167 /* The contents of `init' section for a ROM-resident kernel which
168 should go into RAM. */
169 #define ROMK_INIT_RAM_CONTENTS \
172 *(.init.data) /* 2.5 convention */ \
173 *(.data.init) /* 2.4 convention */ \
177 /* The contents of `init' section for a ROM-resident kernel which
178 should go into ROM. */
179 #define ROMK_INIT_ROM_CONTENTS \
181 *(.init.text) /* 2.5 convention */ \
183 *(.text.init) /* 2.4 convention */ \
187 /* A root filesystem image, for kernels with an embedded root filesystem. */
188 #define ROOT_FS_CONTENTS \
189 __root_fs_image_start = . ; \
191 __root_fs_image_end = . ;
192 /* The initramfs archive. */
193 #define INITRAMFS_CONTENTS \
195 ___initramfs_start = . ; \
197 ___initramfs_end = . ;
198 /* Where the initial bootmap (bitmap for the boot-time memory allocator)
200 #define BOOTMAP_CONTENTS \
203 . = . + 4096 ; /* enough for 128MB. */
205 /* The contents of a `typical' kram area for a kernel in RAM. */
206 #define RAMK_KRAM_CONTENTS \
216 /* Define output sections normally used for a ROM-resident kernel.
217 ROM and RAM should be appropriate memory areas to use for kernel
218 ROM and RAM data. This assumes that ROM starts at 0 (and thus can
219 hold the interrupt vectors). */
220 #define ROMK_SECTIONS(ROM, RAM) \
224 ROMK_INIT_ROM_CONTENTS \
228 __rom_copy_src_start = . ; \
232 __rom_copy_dst_start = . ; \
234 ROMK_INIT_RAM_CONTENTS \
235 __rom_copy_dst_end = . ; \
245 /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */
246 _jiffies = _jiffies_64 ;
249 /* Include an appropriate platform-dependent linker-script (which
250 usually should use the above macros to do most of the work). */
252 #ifdef CONFIG_V850E_SIM
256 #ifdef CONFIG_V850E2_SIM85E2
257 # include "sim85e2.ld"
260 #ifdef CONFIG_V850E2_FPGA85E2C
261 # include "fpga85e2c.ld"
264 #ifdef CONFIG_V850E2_ANNA
265 # ifdef CONFIG_ROM_KERNEL
266 # include "anna-rom.ld"
272 #ifdef CONFIG_V850E_AS85EP1
273 # ifdef CONFIG_ROM_KERNEL
274 # include "as85ep1-rom.ld"
276 # include "as85ep1.ld"
280 #ifdef CONFIG_RTE_CB_MA1
281 # ifdef CONFIG_ROM_KERNEL
282 # include "rte_ma1_cb-rom.ld"
284 # include "rte_ma1_cb.ld"
288 #ifdef CONFIG_RTE_CB_NB85E
289 # ifdef CONFIG_ROM_KERNEL
290 # include "rte_nb85e_cb-rom.ld"
291 # elif defined(CONFIG_RTE_CB_MULTI)
292 # include "rte_nb85e_cb-multi.ld"
294 # include "rte_nb85e_cb.ld"
298 #ifdef CONFIG_RTE_CB_ME2
299 # include "rte_me2_cb.ld"