Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / cris / kernel / vmlinux.lds.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* ld script to make the Linux/CRIS kernel
3  * Authors: Bjorn Wesen (bjornw@axis.com)
4  *
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.
10  */
11
12 #include <asm-generic/vmlinux.lds.h>
13 #include <asm/page.h>
14 #include <asm/thread_info.h>
15
16 #ifdef CONFIG_ETRAX_VMEM_SIZE
17 #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
18 #else
19 #define __CONFIG_ETRAX_VMEM_SIZE 0
20 #endif
21
22
23 jiffies = jiffies_64;
24 SECTIONS
25 {
26         . = DRAM_VIRTUAL_BASE;
27         dram_start = .;
28 #ifdef CONFIG_ETRAX_ARCH_V10
29         ibr_start = .;
30 #else
31         ebp_start = .;
32         /* The boot section is only necessary until the VCS top */
33         /* level testbench includes both flash and DRAM. */
34         .boot : { *(.boot) }
35 #endif
36
37         /* see head.S and pages reserved at the start */
38         . = DRAM_VIRTUAL_BASE + 0x4000;
39
40         _text = .;                      /* Text and read-only data. */
41         text_start = .;                 /* Lots of aliases. */
42         _stext = .;
43         __stext = .;
44         .text : {
45                 HEAD_TEXT
46                 TEXT_TEXT
47                 SCHED_TEXT
48                 CPUIDLE_TEXT
49                 LOCK_TEXT
50                 *(.fixup)
51                 *(.text.__*)
52         }
53
54         _etext = . ;                    /* End of text section. */
55         __etext = .;
56
57         EXCEPTION_TABLE(4)
58
59         _sdata = .;
60         RODATA
61
62         . = ALIGN (4);
63         ___data_start = . ;
64         __Sdata = . ;
65         .data : {                       /* Data */
66                 CACHELINE_ALIGNED_DATA(32)
67                 READ_MOSTLY_DATA(32)
68                 DATA_DATA
69         }
70         __edata = . ;                   /* End of data section. */
71         _edata = . ;
72
73         BUG_TABLE
74
75         INIT_TASK_DATA_SECTION(PAGE_SIZE)
76
77         . = ALIGN(PAGE_SIZE);           /* Init code and data. */
78         __init_begin = .;
79         INIT_TEXT_SECTION(PAGE_SIZE)
80         .init.data : { INIT_DATA }
81         .init.setup : { INIT_SETUP(16) }
82         .initcall.init : {
83                 INIT_CALLS
84         }
85
86         .con_initcall.init : {
87                 CON_INITCALL
88         }
89         SECURITY_INIT
90
91         /* .exit.text is discarded at runtime, not link time,
92          * to deal with references from __bug_table
93          */
94         .exit.text : {
95                 EXIT_TEXT
96         }
97         .exit.data : {
98                 EXIT_DATA
99         }
100
101 #ifdef CONFIG_ETRAX_ARCH_V10
102 #ifdef CONFIG_BLK_DEV_INITRD
103         .init.ramfs : {
104                 __initramfs_start = .;
105                 *(.init.ramfs)
106                 __initramfs_end = .;
107         }
108 #endif
109 #endif
110         __vmlinux_end = .;              /* Last address of the physical file. */
111 #ifdef CONFIG_ETRAX_ARCH_V32
112         PERCPU_SECTION(32)
113
114         .init.ramfs : {
115                 INIT_RAM_FS
116         }
117 #endif
118
119         /*
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.
123          */
124         . = ALIGN(PAGE_SIZE);
125
126         __init_end = .;
127
128         __data_end = . ;                /* Move to _edata ? */
129         BSS_SECTION(1, 1, 1)
130
131         . =  ALIGN (0x20);
132         _end = .;
133         __end = .;
134
135         dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;
136
137         DISCARDS
138 }