GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / m32r / kernel / vmlinux.lds.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* ld script to make M32R Linux kernel
3  */
4
5 #include <asm-generic/vmlinux.lds.h>
6 #include <asm/addrspace.h>
7 #include <asm/page.h>
8 #include <asm/thread_info.h>
9
10 OUTPUT_ARCH(m32r)
11 #if defined(__LITTLE_ENDIAN__)
12        jiffies = jiffies_64;
13 #else
14        jiffies = jiffies_64 + 4;
15 #endif
16
17 kernel_entry = boot - 0x80000000;
18 ENTRY(kernel_entry)
19
20 SECTIONS
21 {
22   . = CONFIG_MEMORY_START + __PAGE_OFFSET;
23   eit_vector = .;
24
25   . = . + 0x1000;
26   .empty_zero_page : { *(.empty_zero_page) } = 0
27
28   /* read-only */
29   _text = .;                    /* Text and read-only data */
30   .boot : { *(.boot) } = 0
31   .text : {
32         HEAD_TEXT
33         TEXT_TEXT
34         SCHED_TEXT
35         CPUIDLE_TEXT
36         LOCK_TEXT
37         *(.fixup)
38         *(.gnu.warning)
39         } = 0x9090
40 #ifdef CONFIG_SMP
41   . = ALIGN(65536);
42   .eit_vector4 : { *(.eit_vector4) }
43 #endif
44   _etext = .;                   /* End of text section */
45
46   EXCEPTION_TABLE(16)
47   NOTES
48
49   _sdata = .;                   /* Start of data section */
50   RODATA
51   RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
52   _edata = .;                   /* End of data section */
53
54   /* will be freed after init */
55   . = ALIGN(PAGE_SIZE);         /* Init code and data */
56   __init_begin = .;
57   INIT_TEXT_SECTION(PAGE_SIZE)
58   INIT_DATA_SECTION(16)
59   PERCPU_SECTION(32)
60   . = ALIGN(PAGE_SIZE);
61   __init_end = .;
62   /* freed after init ends here */
63
64   BSS_SECTION(0, 0, 4)
65
66   _end = . ;
67
68   /* Stabs debugging sections.  */
69   .stab 0 : { *(.stab) }
70   .stabstr 0 : { *(.stabstr) }
71   .stab.excl 0 : { *(.stab.excl) }
72   .stab.exclstr 0 : { *(.stab.exclstr) }
73   .stab.index 0 : { *(.stab.index) }
74   .stab.indexstr 0 : { *(.stab.indexstr) }
75   .comment 0 : { *(.comment) }
76
77   /* Sections to be discarded */
78   DISCARDS
79 }