1
2
3
4
5
6
7
8#define RO_AFTER_INIT_DATA
9
10#include <linux/sizes.h>
11
12#include <asm-generic/vmlinux.lds.h>
13#include <asm/cache.h>
14#include <asm/thread_info.h>
15#include <asm/memory.h>
16#include <asm/mpu.h>
17#include <asm/page.h>
18
19#include "vmlinux.lds.h"
20
21OUTPUT_ARCH(arm)
22ENTRY(stext)
23
24#ifndef __ARMEB__
25jiffies = jiffies_64;
26#else
27jiffies = jiffies_64 + 4;
28#endif
29
30SECTIONS
31{
32
33
34
35
36
37
38
39
40
41 /DISCARD/ : {
42 ARM_DISCARD
43 *(.alt.smp.init)
44 *(.pv_table)
45 }
46
47 . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
48 _xiprom = .;
49
50 .head.text : {
51 _text = .;
52 HEAD_TEXT
53 }
54
55 .text : {
56 _stext = .;
57 ARM_TEXT
58 }
59
60 RO_DATA(PAGE_SIZE)
61
62 . = ALIGN(4);
63 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
64 __start___ex_table = .;
65 ARM_MMU_KEEP(*(__ex_table))
66 __stop___ex_table = .;
67 }
68
69#ifdef CONFIG_ARM_UNWIND
70 ARM_UNWIND_SECTIONS
71#endif
72
73 NOTES
74
75 _etext = .;
76
77 ARM_VECTORS
78 INIT_TEXT_SECTION(8)
79 .exit.text : {
80 ARM_EXIT_KEEP(EXIT_TEXT)
81 }
82 .init.proc.info : {
83 ARM_CPU_DISCARD(PROC_INFO)
84 }
85 .init.arch.info : {
86 __arch_info_begin = .;
87 *(.arch.info.init)
88 __arch_info_end = .;
89 }
90 .init.tagtable : {
91 __tagtable_begin = .;
92 *(.taglist.init)
93 __tagtable_end = .;
94 }
95 .init.rodata : {
96 INIT_SETUP(16)
97 INIT_CALLS
98 CON_INITCALL
99 INIT_RAM_FS
100 }
101
102#ifdef CONFIG_ARM_MPU
103 . = ALIGN(SZ_128K);
104#endif
105 _exiprom = .;
106
107
108
109
110 __data_loc = ALIGN(4);
111 . = PAGE_OFFSET + TEXT_OFFSET;
112#undef LOAD_OFFSET
113#define LOAD_OFFSET (PAGE_OFFSET + TEXT_OFFSET - __data_loc)
114
115 . = ALIGN(THREAD_SIZE);
116 _sdata = .;
117 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
118 .data.ro_after_init : AT(ADDR(.data.ro_after_init) - LOAD_OFFSET) {
119 *(.data..ro_after_init)
120 }
121 _edata = .;
122
123 . = ALIGN(PAGE_SIZE);
124 __init_begin = .;
125 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
126 INIT_DATA
127 }
128 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
129 ARM_EXIT_KEEP(EXIT_DATA)
130 }
131#ifdef CONFIG_SMP
132 PERCPU_SECTION(L1_CACHE_BYTES)
133#endif
134
135#ifdef CONFIG_HAVE_TCM
136 ARM_TCM
137#endif
138
139
140
141
142
143
144 .data.endmark : AT(ADDR(.data.endmark) - LOAD_OFFSET) { }
145 _edata_loc = LOADADDR(.data.endmark);
146
147 . = ALIGN(PAGE_SIZE);
148 __init_end = .;
149
150 BSS_SECTION(0, 0, 8)
151#ifdef CONFIG_ARM_MPU
152 . = ALIGN(PMSAv8_MINALIGN);
153#endif
154 _end = .;
155
156 STABS_DEBUG
157}
158
159
160
161
162
163
164ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
165ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
166
167
168
169
170
171
172ASSERT(__hyp_idmap_text_end - (__hyp_idmap_text_start & PAGE_MASK) <= PAGE_SIZE,
173 "HYP init code too big or misaligned")
174
175#ifdef CONFIG_XIP_DEFLATED_DATA
176
177
178
179
180ASSERT((_end - __bss_start) >= 12288, ".bss too small for CONFIG_XIP_DEFLATED_DATA")
181#endif
182
183#ifdef CONFIG_ARM_MPU
184
185
186
187
188
189
190
191
192
193
194
195
196
197ASSERT(!(_xiprom & (SZ_1M - 1)), "XIP start address may cause MPU programming issues")
198ASSERT(!(_exiprom & (SZ_128K - 1)), "XIP end address may cause MPU programming issues")
199#endif
200