Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-microblaze.git] / arch / c6x / kernel / vmlinux.lds.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * ld script for the c6x kernel
4  *
5  *  Copyright (C) 2010, 2011 Texas Instruments Incorporated
6  *  Mark Salter <msalter@redhat.com>
7  */
8
9 #define RO_EXCEPTION_TABLE_ALIGN        16
10
11 #include <asm-generic/vmlinux.lds.h>
12 #include <asm/thread_info.h>
13 #include <asm/page.h>
14
15 ENTRY(_c_int00)
16
17 #if defined(CONFIG_CPU_BIG_ENDIAN)
18 jiffies = jiffies_64 + 4;
19 #else
20 jiffies = jiffies_64;
21 #endif
22
23 #define READONLY_SEGMENT_START  \
24         . = PAGE_OFFSET;
25 #define READWRITE_SEGMENT_START \
26         . = ALIGN(128);         \
27         _data_lma = .;
28
29 SECTIONS
30 {
31         /*
32          * Start kernel read only segment
33          */
34         READONLY_SEGMENT_START
35
36         .vectors :
37         {
38                 _vectors_start = .;
39                 *(.vectors)
40                 . = ALIGN(0x400);
41                 _vectors_end = .;
42         }
43
44         /*
45          * This section contains data which may be shared with other
46          * cores. It needs to be a fixed offset from PAGE_OFFSET
47          * regardless of kernel configuration.
48          */
49         .virtio_ipc_dev :
50         {
51                 *(.virtio_ipc_dev)
52         }
53
54         . = ALIGN(PAGE_SIZE);
55         __init_begin = .;
56         .init :
57         {
58                 _sinittext = .;
59                 HEAD_TEXT
60                 INIT_TEXT
61                 _einittext = .;
62         }
63
64         INIT_DATA_SECTION(16)
65
66         PERCPU_SECTION(128)
67
68         . = ALIGN(PAGE_SIZE);
69         __init_end = .;
70
71         .text :
72         {
73                 _text = .;
74                 _stext = .;
75                 TEXT_TEXT
76                 SCHED_TEXT
77                 CPUIDLE_TEXT
78                 LOCK_TEXT
79                 IRQENTRY_TEXT
80                 SOFTIRQENTRY_TEXT
81                 KPROBES_TEXT
82                 *(.fixup)
83                 *(.gnu.warning)
84         }
85
86         RO_DATA(PAGE_SIZE)
87         .const :
88         {
89                 *(.const .const.* .gnu.linkonce.r.*)
90                 *(.switch)
91         }
92
93         _etext = .;
94
95         /*
96          * Start kernel read-write segment.
97          */
98         READWRITE_SEGMENT_START
99         _sdata = .;
100
101         .fardata : AT(ADDR(.fardata) - LOAD_OFFSET)
102         {
103                 INIT_TASK_DATA(THREAD_SIZE)
104                 NOSAVE_DATA
105                 PAGE_ALIGNED_DATA(PAGE_SIZE)
106                 CACHELINE_ALIGNED_DATA(128)
107                 READ_MOSTLY_DATA(128)
108                 DATA_DATA
109                 CONSTRUCTORS
110                 *(.data1)
111                 *(.fardata .fardata.*)
112                 *(.data.debug_bpt)
113         }
114
115         .neardata ALIGN(8) : AT(ADDR(.neardata) - LOAD_OFFSET)
116         {
117                 *(.neardata2 .neardata2.* .gnu.linkonce.s2.*)
118                 *(.neardata .neardata.* .gnu.linkonce.s.*)
119                 . = ALIGN(8);
120         }
121
122         BUG_TABLE
123
124         _edata = .;
125
126         __bss_start = .;
127         SBSS(8)
128         BSS(8)
129         .far :
130         {
131                 . = ALIGN(8);
132                 *(.dynfar)
133                 *(.far .far.* .gnu.linkonce.b.*)
134                 . = ALIGN(8);
135         }
136         __bss_stop = .;
137
138         _end = .;
139
140         DWARF_DEBUG
141
142         /DISCARD/ :
143         {
144                   EXIT_TEXT
145                   EXIT_DATA
146                   EXIT_CALL
147                   *(.discard)
148                   *(.discard.*)
149                   *(.interp)
150         }
151 }