1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* ld script to make the Linux/CRIS kernel
3 * Authors: Bjorn Wesen (bjornw@axis.com)
5 * It is VERY DANGEROUS to fiddle around with the symbols in this
6 * script. It is for example quite vital that all generated sections
7 * that are used are actually named here, otherwise the linker will
8 * put them at the end, where the init stuff is which is FREED after
9 * the kernel has booted.
12 #include <asm-generic/vmlinux.lds.h>
14 #include <asm/thread_info.h>
16 #ifdef CONFIG_ETRAX_VMEM_SIZE
17 #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
19 #define __CONFIG_ETRAX_VMEM_SIZE 0
26 . = DRAM_VIRTUAL_BASE;
28 #ifdef CONFIG_ETRAX_ARCH_V10
32 /* The boot section is only necessary until the VCS top */
33 /* level testbench includes both flash and DRAM. */
37 /* see head.S and pages reserved at the start */
38 . = DRAM_VIRTUAL_BASE + 0x4000;
40 _text = .; /* Text and read-only data. */
41 text_start = .; /* Lots of aliases. */
54 _etext = . ; /* End of text section. */
66 CACHELINE_ALIGNED_DATA(32)
70 __edata = . ; /* End of data section. */
75 INIT_TASK_DATA_SECTION(PAGE_SIZE)
77 . = ALIGN(PAGE_SIZE); /* Init code and data. */
79 INIT_TEXT_SECTION(PAGE_SIZE)
80 .init.data : { INIT_DATA }
81 .init.setup : { INIT_SETUP(16) }
86 .con_initcall.init : {
91 /* .exit.text is discarded at runtime, not link time,
92 * to deal with references from __bug_table
101 #ifdef CONFIG_ETRAX_ARCH_V10
102 #ifdef CONFIG_BLK_DEV_INITRD
104 __initramfs_start = .;
110 __vmlinux_end = .; /* Last address of the physical file. */
111 #ifdef CONFIG_ETRAX_ARCH_V32
120 * We fill to the next page, so we can discard all init
121 * pages without needing to consider what payload might be
122 * appended to the kernel image.
124 . = ALIGN(PAGE_SIZE);
128 __data_end = . ; /* Move to _edata ? */
135 dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;