1 /* ld script to make the Linux/CRIS kernel
2 * Authors: Bjorn Wesen (bjornw@axis.com)
4 * It is VERY DANGEROUS to fiddle around with the symbols in this
5 * script. It is for example quite vital that all generated sections
6 * that are used are actually named here, otherwise the linker will
7 * put them at the end, where the init stuff is which is FREED after
8 * the kernel has booted.
11 #include <linux/autoconf.h>
12 #include <asm-generic/vmlinux.lds.h>
15 #ifdef CONFIG_ETRAX_VMEM_SIZE
16 #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
18 #define __CONFIG_ETRAX_VMEM_SIZE 0
25 . = DRAM_VIRTUAL_BASE;
27 #ifdef CONFIG_ETRAX_ARCH_V10
31 /* The boot section is only necessary until the VCS top */
32 /* level testbench includes both flash and DRAM. */
36 /* see head.S and pages reserved at the start */
37 . = DRAM_VIRTUAL_BASE + 0x4000;
39 _text = .; /* Text and read-only data. */
40 text_start = .; /* Lots of aliases. */
51 _etext = . ; /* End of text section. */
54 . = ALIGN(4); /* Exception table. */
55 __start___ex_table = .;
56 __ex_table : { *(__ex_table) }
57 __stop___ex_table = .;
67 __edata = . ; /* End of data section. */
70 . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */
71 .data.init_task : { *(.data.init_task) }
73 . = ALIGN(PAGE_SIZE); /* Init code and data. */
80 .init.data : { INIT_DATA }
83 .init.setup : { *(.init.setup) }
85 #ifdef CONFIG_ETRAX_ARCH_V32
87 __param : { *(__param) }
96 .con_initcall.init : {
97 __con_initcall_start = .;
99 __con_initcall_end = .;
103 #ifdef CONFIG_ETRAX_ARCH_V10
104 #ifdef CONFIG_BLK_DEV_INITRD
106 __initramfs_start = .;
112 __vmlinux_end = .; /* Last address of the physical file. */
113 #ifdef CONFIG_ETRAX_ARCH_V32
117 __initramfs_start = .;
124 * We fill to the next page, so we can discard all init
125 * pages without needing to consider what payload might be
126 * appended to the kernel image.
128 . = ALIGN(PAGE_SIZE);
132 __data_end = . ; /* Move to _edata ? */
133 __bss_start = .; /* BSS. */
143 /* Sections to be discarded */
150 dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;