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 <asm-generic/vmlinux.lds.h>
14 #ifdef CONFIG_ETRAX_VMEM_SIZE
15 #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
17 #define __CONFIG_ETRAX_VMEM_SIZE 0
23 . = DRAM_VIRTUAL_BASE;
27 /* The boot section is only necessary until the VCS top */
28 /* level testbench includes both flash and DRAM. */
31 /* See head.S and pages reserved at the start. */
32 . = DRAM_VIRTUAL_BASE + 0x4000;
34 _text = .; /* Text and read-only data. */
35 text_start = .; /* Lots of aliases. */
46 _etext = . ; /* End of text section. */
49 . = ALIGN(4); /* Exception table. */
50 __start___ex_table = .;
51 __ex_table : { *(__ex_table) }
52 __stop___ex_table = .;
62 __edata = . ; /* End of data section. */
65 . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */
66 .data.init_task : { *(.data.init_task) }
68 . = ALIGN(PAGE_SIZE); /* Init code and data. */
75 .init.data : { INIT_DATA }
78 .init.setup : { *(.init.setup) }
81 __param : { *(__param) }
89 .con_initcall.init : {
90 __con_initcall_start = .;
92 __con_initcall_end = .;
96 __vmlinux_end = .; /* Last address of the physical file. */
100 __initramfs_start = .;
106 * We fill to the next page, so we can discard all init
107 * pages without needing to consider what payload might be
108 * appended to the kernel image.
110 . = ALIGN (PAGE_SIZE);
114 __data_end = . ; /* Move to _edata? */
115 __bss_start = .; /* BSS. */
125 /* Sections to be discarded */
132 dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;