IB/uverbs: Add device memory registration ioctl support
[linux-2.6-block.git] / include / asm-generic / vmlinux.lds.h
CommitLineData
ef53dae8
SR
1/*
2 * Helper macros to support writing architecture specific
3 * linker scripts.
4 *
5 * A minimal linker scripts has following content:
6 * [This is a sample, architectures may have special requiriements]
7 *
8 * OUTPUT_FORMAT(...)
9 * OUTPUT_ARCH(...)
10 * ENTRY(...)
11 * SECTIONS
12 * {
13 * . = START;
14 * __init_begin = .;
7923f90f 15 * HEAD_TEXT_SECTION
ef53dae8
SR
16 * INIT_TEXT_SECTION(PAGE_SIZE)
17 * INIT_DATA_SECTION(...)
0415b00d 18 * PERCPU_SECTION(CACHELINE_SIZE)
ef53dae8
SR
19 * __init_end = .;
20 *
21 * _stext = .;
22 * TEXT_SECTION = 0
23 * _etext = .;
24 *
25 * _sdata = .;
26 * RO_DATA_SECTION(PAGE_SIZE)
27 * RW_DATA_SECTION(...)
28 * _edata = .;
29 *
30 * EXCEPTION_TABLE(...)
31 * NOTES
32 *
04e448d9 33 * BSS_SECTION(0, 0, 0)
ef53dae8
SR
34 * _end = .;
35 *
ef53dae8
SR
36 * STABS_DEBUG
37 * DWARF_DEBUG
023bf6f1
TH
38 *
39 * DISCARDS // must be the last
ef53dae8
SR
40 * }
41 *
42 * [__init_begin, __init_end] is the init section that may be freed after init
562c85ca
YW
43 * // __init_begin and __init_end should be page aligned, so that we can
44 * // free the whole .init memory
ef53dae8
SR
45 * [_stext, _etext] is the text section
46 * [_sdata, _edata] is the data section
47 *
48 * Some of the included output section have their own set of constants.
49 * Examples are: [__initramfs_start, __initramfs_end] for initramfs and
50 * [__nosave_begin, __nosave_end] for the nosave data
51 */
c80d471a 52
1da177e4
LT
53#ifndef LOAD_OFFSET
54#define LOAD_OFFSET 0
55#endif
56
b92021b0 57#include <linux/export.h>
1da177e4 58
6d30e3a8
SR
59/* Align . to a 8 byte boundary equals to maximum function alignment. */
60#define ALIGN_FUNCTION() . = ALIGN(8)
61
cb87481e
NP
62/*
63 * LD_DEAD_CODE_DATA_ELIMINATION option enables -fdata-sections, which
64 * generates .data.identifier sections, which need to be pulled in with
65 * .data. We don't want to pull in .data..other sections, which Linux
66 * has defined. Same for text and bss.
67 */
68#ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
69#define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
70#define DATA_MAIN .data .data.[0-9a-zA-Z_]*
71#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]*
72#else
73#define TEXT_MAIN .text
74#define DATA_MAIN .data
75#define BSS_MAIN .bss
76#endif
77
07fca0e5
SR
78/*
79 * Align to a 32 byte boundary equal to the
80 * alignment gcc 4.5 uses for a struct
81 */
aab94339
DB
82#define STRUCT_ALIGNMENT 32
83#define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
07fca0e5 84
eb8f6890
SR
85/* The actual configuration determine if the init/exit sections
86 * are handled as text/data or they can be discarded (which
87 * often happens at runtime)
88 */
eb8f6890
SR
89#ifdef CONFIG_HOTPLUG_CPU
90#define CPU_KEEP(sec) *(.cpu##sec)
91#define CPU_DISCARD(sec)
92#else
93#define CPU_KEEP(sec)
94#define CPU_DISCARD(sec) *(.cpu##sec)
95#endif
96
1a3fb6d4 97#if defined(CONFIG_MEMORY_HOTPLUG)
eb8f6890
SR
98#define MEM_KEEP(sec) *(.mem##sec)
99#define MEM_DISCARD(sec)
100#else
101#define MEM_KEEP(sec)
102#define MEM_DISCARD(sec) *(.mem##sec)
103#endif
104
8da3821b 105#ifdef CONFIG_FTRACE_MCOUNT_RECORD
4b3b4c5e
JR
106#define MCOUNT_REC() . = ALIGN(8); \
107 VMLINUX_SYMBOL(__start_mcount_loc) = .; \
8da3821b
SR
108 *(__mcount_loc) \
109 VMLINUX_SYMBOL(__stop_mcount_loc) = .;
110#else
111#define MCOUNT_REC()
112#endif
eb8f6890 113
2ed84eeb 114#ifdef CONFIG_TRACE_BRANCH_PROFILING
45b79749
SR
115#define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
116 *(_ftrace_annotated_branch) \
117 VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
1f0d69a9
SR
118#else
119#define LIKELY_PROFILE()
120#endif
121
2bcd521a
SR
122#ifdef CONFIG_PROFILE_ALL_BRANCHES
123#define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \
124 *(_ftrace_branch) \
125 VMLINUX_SYMBOL(__stop_branch_profile) = .;
126#else
127#define BRANCH_PROFILE()
128#endif
129
376e2424 130#ifdef CONFIG_KPROBES
69902c71
VG
131#define KPROBE_BLACKLIST() . = ALIGN(8); \
132 VMLINUX_SYMBOL(__start_kprobe_blacklist) = .; \
4b89b7f7 133 KEEP(*(_kprobe_blacklist)) \
376e2424
MH
134 VMLINUX_SYMBOL(__stop_kprobe_blacklist) = .;
135#else
136#define KPROBE_BLACKLIST()
137#endif
138
540adea3 139#ifdef CONFIG_FUNCTION_ERROR_INJECTION
663faf9f 140#define ERROR_INJECT_WHITELIST() STRUCT_ALIGN(); \
540adea3
MH
141 VMLINUX_SYMBOL(__start_error_injection_whitelist) = .;\
142 KEEP(*(_error_injection_whitelist)) \
143 VMLINUX_SYMBOL(__stop_error_injection_whitelist) = .;
92ace999 144#else
540adea3 145#define ERROR_INJECT_WHITELIST()
92ace999
JB
146#endif
147
5f77a88b 148#ifdef CONFIG_EVENT_TRACING
e4a9ea5e
SR
149#define FTRACE_EVENTS() . = ALIGN(8); \
150 VMLINUX_SYMBOL(__start_ftrace_events) = .; \
4b89b7f7 151 KEEP(*(_ftrace_events)) \
0c564a53 152 VMLINUX_SYMBOL(__stop_ftrace_events) = .; \
02fd7f68
JL
153 VMLINUX_SYMBOL(__start_ftrace_eval_maps) = .; \
154 KEEP(*(_ftrace_eval_map)) \
155 VMLINUX_SYMBOL(__stop_ftrace_eval_maps) = .;
b77e38aa
SR
156#else
157#define FTRACE_EVENTS()
158#endif
159
1ba28e02
LJ
160#ifdef CONFIG_TRACING
161#define TRACE_PRINTKS() VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .; \
4b89b7f7 162 KEEP(*(__trace_printk_fmt)) /* Trace_printk fmt' pointer */ \
1ba28e02 163 VMLINUX_SYMBOL(__stop___trace_bprintk_fmt) = .;
102c9323 164#define TRACEPOINT_STR() VMLINUX_SYMBOL(__start___tracepoint_str) = .; \
4b89b7f7 165 KEEP(*(__tracepoint_str)) /* Trace_printk fmt' pointer */ \
102c9323 166 VMLINUX_SYMBOL(__stop___tracepoint_str) = .;
1ba28e02
LJ
167#else
168#define TRACE_PRINTKS()
102c9323 169#define TRACEPOINT_STR()
1ba28e02
LJ
170#endif
171
bed1ffca 172#ifdef CONFIG_FTRACE_SYSCALLS
3d56e331
SR
173#define TRACE_SYSCALLS() . = ALIGN(8); \
174 VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \
4b89b7f7 175 KEEP(*(__syscalls_metadata)) \
bed1ffca
FW
176 VMLINUX_SYMBOL(__stop_syscalls_metadata) = .;
177#else
178#define TRACE_SYSCALLS()
179#endif
180
470ca0de 181#ifdef CONFIG_SERIAL_EARLYCON
99492c39 182#define EARLYCON_TABLE() STRUCT_ALIGN(); \
470ca0de 183 VMLINUX_SYMBOL(__earlycon_table) = .; \
4b89b7f7 184 KEEP(*(__earlycon_table)) \
2eaa7909 185 VMLINUX_SYMBOL(__earlycon_table_end) = .;
470ca0de
PH
186#else
187#define EARLYCON_TABLE()
188#endif
aab94339 189
06309288
RH
190#define ___OF_TABLE(cfg, name) _OF_TABLE_##cfg(name)
191#define __OF_TABLE(cfg, name) ___OF_TABLE(cfg, name)
5ee02af1 192#define OF_TABLE(cfg, name) __OF_TABLE(IS_ENABLED(cfg), name)
06309288
RH
193#define _OF_TABLE_0(name)
194#define _OF_TABLE_1(name) \
f6e916b8 195 . = ALIGN(8); \
06309288 196 VMLINUX_SYMBOL(__##name##_of_table) = .; \
4b89b7f7
NP
197 KEEP(*(__##name##_of_table)) \
198 KEEP(*(__##name##_of_table_end))
06309288 199
bb0eb050 200#define TIMER_OF_TABLES() OF_TABLE(CONFIG_TIMER_OF, timer)
06309288
RH
201#define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
202#define CLK_OF_TABLES() OF_TABLE(CONFIG_COMMON_CLK, clk)
1cd076bf 203#define IOMMU_OF_TABLES() OF_TABLE(CONFIG_OF_IOMMU, iommu)
06309288
RH
204#define RESERVEDMEM_OF_TABLES() OF_TABLE(CONFIG_OF_RESERVED_MEM, reservedmem)
205#define CPU_METHOD_OF_TABLES() OF_TABLE(CONFIG_SMP, cpu_method)
449e056c 206#define CPUIDLE_METHOD_OF_TABLES() OF_TABLE(CONFIG_CPU_IDLE, cpuidle_method)
6c3ff8b1 207
e647b532
MZ
208#ifdef CONFIG_ACPI
209#define ACPI_PROBE_TABLE(name) \
210 . = ALIGN(8); \
211 VMLINUX_SYMBOL(__##name##_acpi_probe_table) = .; \
4b89b7f7 212 KEEP(*(__##name##_acpi_probe_table)) \
e647b532
MZ
213 VMLINUX_SYMBOL(__##name##_acpi_probe_table_end) = .;
214#else
215#define ACPI_PROBE_TABLE(name)
216#endif
217
aab94339
DB
218#define KERNEL_DTB() \
219 STRUCT_ALIGN(); \
220 VMLINUX_SYMBOL(__dtb_start) = .; \
4b89b7f7 221 KEEP(*(.dtb.init.rodata)) \
aab94339
DB
222 VMLINUX_SYMBOL(__dtb_end) = .;
223
b67067f1
NP
224/*
225 * .data section
b67067f1 226 */
ca967258 227#define DATA_DATA \
129f6c48 228 *(.xiptext) \
cb87481e 229 *(DATA_MAIN) \
312b1485 230 *(.ref.data) \
d356c0b6 231 *(.data..shared_aligned) /* percpu related */ \
eb8f6890
SR
232 MEM_KEEP(init.data) \
233 MEM_KEEP(exit.data) \
7ccaba53 234 *(.data.unlikely) \
b1fca27d
AK
235 VMLINUX_SYMBOL(__start_once) = .; \
236 *(.data.once) \
237 VMLINUX_SYMBOL(__end_once) = .; \
65498646 238 STRUCT_ALIGN(); \
97e1c18e 239 *(__tracepoints) \
e9d376f0 240 /* implement dynamic printk debug */ \
d430d3d7
JB
241 . = ALIGN(8); \
242 VMLINUX_SYMBOL(__start___jump_table) = .; \
4b89b7f7 243 KEEP(*(__jump_table)) \
d430d3d7 244 VMLINUX_SYMBOL(__stop___jump_table) = .; \
e9d376f0
JB
245 . = ALIGN(8); \
246 VMLINUX_SYMBOL(__start___verbose) = .; \
4b89b7f7 247 KEEP(*(__verbose)) \
e9d376f0 248 VMLINUX_SYMBOL(__stop___verbose) = .; \
2bcd521a 249 LIKELY_PROFILE() \
b77e38aa 250 BRANCH_PROFILE() \
102c9323
SRRH
251 TRACE_PRINTKS() \
252 TRACEPOINT_STR()
ca967258 253
ef53dae8
SR
254/*
255 * Data section helpers
256 */
257#define NOSAVE_DATA \
258 . = ALIGN(PAGE_SIZE); \
259 VMLINUX_SYMBOL(__nosave_begin) = .; \
07b3bb1e 260 *(.data..nosave) \
ef53dae8
SR
261 . = ALIGN(PAGE_SIZE); \
262 VMLINUX_SYMBOL(__nosave_end) = .;
263
264#define PAGE_ALIGNED_DATA(page_align) \
265 . = ALIGN(page_align); \
75b13483 266 *(.data..page_aligned)
ef53dae8
SR
267
268#define READ_MOSTLY_DATA(align) \
269 . = ALIGN(align); \
8369744f
SL
270 *(.data..read_mostly) \
271 . = ALIGN(align);
ef53dae8
SR
272
273#define CACHELINE_ALIGNED_DATA(align) \
274 . = ALIGN(align); \
4af57b78 275 *(.data..cacheline_aligned)
ef53dae8 276
39a449d9 277#define INIT_TASK_DATA(align) \
ef53dae8 278 . = ALIGN(align); \
91ed140d 279 VMLINUX_SYMBOL(__start_init_task) = .; \
0500871f
DH
280 VMLINUX_SYMBOL(init_thread_union) = .; \
281 VMLINUX_SYMBOL(init_stack) = .; \
91ed140d 282 *(.data..init_task) \
0500871f
DH
283 *(.data..init_thread_info) \
284 . = VMLINUX_SYMBOL(__start_init_task) + THREAD_SIZE; \
91ed140d 285 VMLINUX_SYMBOL(__end_init_task) = .;
ef53dae8 286
32fb2fc5
HC
287/*
288 * Allow architectures to handle ro_after_init data on their
289 * own by defining an empty RO_AFTER_INIT_DATA.
290 */
291#ifndef RO_AFTER_INIT_DATA
d7c19b06 292#define RO_AFTER_INIT_DATA \
d79bf21e 293 VMLINUX_SYMBOL(__start_ro_after_init) = .; \
d7c19b06 294 *(.data..ro_after_init) \
d79bf21e 295 VMLINUX_SYMBOL(__end_ro_after_init) = .;
32fb2fc5
HC
296#endif
297
ef53dae8
SR
298/*
299 * Read only Data
300 */
301#define RO_DATA_SECTION(align) \
4096b46f 302 . = ALIGN((align)); \
1da177e4 303 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
6569580d 304 VMLINUX_SYMBOL(__start_rodata) = .; \
1da177e4 305 *(.rodata) *(.rodata.*) \
32fb2fc5 306 RO_AFTER_INIT_DATA /* Read only after init */ \
4b89b7f7 307 KEEP(*(__vermagic)) /* Kernel version magic */ \
65498646
MD
308 . = ALIGN(8); \
309 VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .; \
4b89b7f7 310 KEEP(*(__tracepoints_ptrs)) /* Tracepoints: pointer array */ \
65498646 311 VMLINUX_SYMBOL(__stop___tracepoints_ptrs) = .; \
97e1c18e 312 *(__tracepoints_strings)/* Tracepoints: strings */ \
1da177e4
LT
313 } \
314 \
315 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
316 *(.rodata1) \
317 } \
318 \
319 /* PCI quirks */ \
320 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
321 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \
4b89b7f7 322 KEEP(*(.pci_fixup_early)) \
1da177e4
LT
323 VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \
324 VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \
4b89b7f7 325 KEEP(*(.pci_fixup_header)) \
1da177e4
LT
326 VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \
327 VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
4b89b7f7 328 KEEP(*(.pci_fixup_final)) \
1da177e4
LT
329 VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
330 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
4b89b7f7 331 KEEP(*(.pci_fixup_enable)) \
1da177e4 332 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
1597cacb 333 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
4b89b7f7 334 KEEP(*(.pci_fixup_resume)) \
1597cacb 335 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
e1a2a51e 336 VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .; \
4b89b7f7 337 KEEP(*(.pci_fixup_resume_early)) \
e1a2a51e
RW
338 VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .; \
339 VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .; \
4b89b7f7 340 KEEP(*(.pci_fixup_suspend)) \
e1a2a51e 341 VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .; \
7d2a01b8 342 VMLINUX_SYMBOL(__start_pci_fixups_suspend_late) = .; \
4b89b7f7 343 KEEP(*(.pci_fixup_suspend_late)) \
7d2a01b8 344 VMLINUX_SYMBOL(__end_pci_fixups_suspend_late) = .; \
1da177e4
LT
345 } \
346 \
5658c769
DW
347 /* Built-in firmware blobs */ \
348 .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \
349 VMLINUX_SYMBOL(__start_builtin_fw) = .; \
4b89b7f7 350 KEEP(*(.builtin_fw)) \
5658c769
DW
351 VMLINUX_SYMBOL(__end_builtin_fw) = .; \
352 } \
353 \
63687a52
JB
354 TRACEDATA \
355 \
1da177e4
LT
356 /* Kernel symbol table: Normal symbols */ \
357 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
358 VMLINUX_SYMBOL(__start___ksymtab) = .; \
b67067f1 359 KEEP(*(SORT(___ksymtab+*))) \
1da177e4
LT
360 VMLINUX_SYMBOL(__stop___ksymtab) = .; \
361 } \
362 \
363 /* Kernel symbol table: GPL-only symbols */ \
364 __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
365 VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
b67067f1 366 KEEP(*(SORT(___ksymtab_gpl+*))) \
1da177e4
LT
367 VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
368 } \
369 \
f71d20e9
AV
370 /* Kernel symbol table: Normal unused symbols */ \
371 __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \
372 VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \
b67067f1 373 KEEP(*(SORT(___ksymtab_unused+*))) \
f71d20e9
AV
374 VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \
375 } \
376 \
377 /* Kernel symbol table: GPL-only unused symbols */ \
378 __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
379 VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \
b67067f1 380 KEEP(*(SORT(___ksymtab_unused_gpl+*))) \
f71d20e9
AV
381 VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \
382 } \
383 \
9f28bb7e
GKH
384 /* Kernel symbol table: GPL-future-only symbols */ \
385 __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
386 VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \
b67067f1 387 KEEP(*(SORT(___ksymtab_gpl_future+*))) \
9f28bb7e
GKH
388 VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
389 } \
390 \
1da177e4
LT
391 /* Kernel symbol table: Normal symbols */ \
392 __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
393 VMLINUX_SYMBOL(__start___kcrctab) = .; \
b67067f1 394 KEEP(*(SORT(___kcrctab+*))) \
1da177e4
LT
395 VMLINUX_SYMBOL(__stop___kcrctab) = .; \
396 } \
397 \
398 /* Kernel symbol table: GPL-only symbols */ \
399 __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
400 VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
b67067f1 401 KEEP(*(SORT(___kcrctab_gpl+*))) \
1da177e4
LT
402 VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
403 } \
404 \
f71d20e9
AV
405 /* Kernel symbol table: Normal unused symbols */ \
406 __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \
407 VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \
b67067f1 408 KEEP(*(SORT(___kcrctab_unused+*))) \
f71d20e9
AV
409 VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \
410 } \
411 \
412 /* Kernel symbol table: GPL-only unused symbols */ \
413 __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
414 VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \
b67067f1 415 KEEP(*(SORT(___kcrctab_unused_gpl+*))) \
f71d20e9
AV
416 VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \
417 } \
418 \
9f28bb7e
GKH
419 /* Kernel symbol table: GPL-future-only symbols */ \
420 __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
421 VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \
b67067f1 422 KEEP(*(SORT(___kcrctab_gpl_future+*))) \
9f28bb7e
GKH
423 VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \
424 } \
425 \
1da177e4
LT
426 /* Kernel symbol table: strings */ \
427 __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
4b89b7f7 428 *(__ksymtab_strings) \
1da177e4
LT
429 } \
430 \
eb8f6890
SR
431 /* __*init sections */ \
432 __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
312b1485 433 *(.ref.rodata) \
eb8f6890
SR
434 MEM_KEEP(init.rodata) \
435 MEM_KEEP(exit.rodata) \
436 } \
437 \
1da177e4
LT
438 /* Built-in module parameters. */ \
439 __param : AT(ADDR(__param) - LOAD_OFFSET) { \
440 VMLINUX_SYMBOL(__start___param) = .; \
4b89b7f7 441 KEEP(*(__param)) \
1da177e4 442 VMLINUX_SYMBOL(__stop___param) = .; \
e94965ed
DT
443 } \
444 \
445 /* Built-in module versions. */ \
446 __modver : AT(ADDR(__modver) - LOAD_OFFSET) { \
447 VMLINUX_SYMBOL(__start___modver) = .; \
4b89b7f7 448 KEEP(*(__modver)) \
e94965ed 449 VMLINUX_SYMBOL(__stop___modver) = .; \
edeed305 450 . = ALIGN((align)); \
6569580d 451 VMLINUX_SYMBOL(__end_rodata) = .; \
7583ddfd 452 } \
4096b46f
SR
453 . = ALIGN((align));
454
ef53dae8 455/* RODATA & RO_DATA provided for backward compatibility.
4096b46f 456 * All archs are supposed to use RO_DATA() */
ef53dae8
SR
457#define RODATA RO_DATA_SECTION(4096)
458#define RO_DATA(align) RO_DATA_SECTION(align)
1da177e4
LT
459
460#define SECURITY_INIT \
60bad7fa 461 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
1da177e4 462 VMLINUX_SYMBOL(__security_initcall_start) = .; \
b67067f1 463 KEEP(*(.security_initcall.init)) \
1da177e4
LT
464 VMLINUX_SYMBOL(__security_initcall_end) = .; \
465 }
466
cb87481e
NP
467/*
468 * .text section. Map to function alignment to avoid address changes
0f4c4af0 469 * during second ld run in second ld pass when generating System.map
cb87481e
NP
470 *
471 * TEXT_MAIN here will match .text.fixup and .text.unlikely if dead
472 * code elimination is enabled, so these sections should be converted
473 * to use ".." first.
474 */
7664709b
SR
475#define TEXT_TEXT \
476 ALIGN_FUNCTION(); \
cb87481e 477 *(.text.hot TEXT_MAIN .text.fixup .text.unlikely) \
564c9cc8 478 *(.text..refcount) \
312b1485 479 *(.ref.text) \
eb8f6890 480 MEM_KEEP(init.text) \
fb5e2b37 481 MEM_KEEP(exit.text) \
eb8f6890 482
7664709b 483
6d30e3a8
SR
484/* sched.text is aling to function alignment to secure we have same
485 * address even at second ld pass when generating System.map */
1da177e4 486#define SCHED_TEXT \
6d30e3a8 487 ALIGN_FUNCTION(); \
1da177e4
LT
488 VMLINUX_SYMBOL(__sched_text_start) = .; \
489 *(.sched.text) \
490 VMLINUX_SYMBOL(__sched_text_end) = .;
491
6d30e3a8
SR
492/* spinlock.text is aling to function alignment to secure we have same
493 * address even at second ld pass when generating System.map */
1da177e4 494#define LOCK_TEXT \
6d30e3a8 495 ALIGN_FUNCTION(); \
1da177e4
LT
496 VMLINUX_SYMBOL(__lock_text_start) = .; \
497 *(.spinlock.text) \
498 VMLINUX_SYMBOL(__lock_text_end) = .;
d0aaff97 499
6727ad9e
CM
500#define CPUIDLE_TEXT \
501 ALIGN_FUNCTION(); \
502 VMLINUX_SYMBOL(__cpuidle_text_start) = .; \
503 *(.cpuidle.text) \
504 VMLINUX_SYMBOL(__cpuidle_text_end) = .;
505
d0aaff97
PP
506#define KPROBES_TEXT \
507 ALIGN_FUNCTION(); \
508 VMLINUX_SYMBOL(__kprobes_text_start) = .; \
509 *(.kprobes.text) \
510 VMLINUX_SYMBOL(__kprobes_text_end) = .;
a7d0c210 511
ea714547
JO
512#define ENTRY_TEXT \
513 ALIGN_FUNCTION(); \
514 VMLINUX_SYMBOL(__entry_text_start) = .; \
515 *(.entry.text) \
516 VMLINUX_SYMBOL(__entry_text_end) = .;
517
a0343e82
FW
518#define IRQENTRY_TEXT \
519 ALIGN_FUNCTION(); \
520 VMLINUX_SYMBOL(__irqentry_text_start) = .; \
521 *(.irqentry.text) \
522 VMLINUX_SYMBOL(__irqentry_text_end) = .;
a0343e82 523
be7635e7
AP
524#define SOFTIRQENTRY_TEXT \
525 ALIGN_FUNCTION(); \
526 VMLINUX_SYMBOL(__softirqentry_text_start) = .; \
527 *(.softirqentry.text) \
528 VMLINUX_SYMBOL(__softirqentry_text_end) = .;
be7635e7 529
37c514e3 530/* Section used for early init (in .S files) */
7923f90f 531#define HEAD_TEXT *(.head.text)
37c514e3 532
7923f90f 533#define HEAD_TEXT_SECTION \
ef53dae8
SR
534 .head.text : AT(ADDR(.head.text) - LOAD_OFFSET) { \
535 HEAD_TEXT \
536 }
537
538/*
539 * Exception table
540 */
541#define EXCEPTION_TABLE(align) \
542 . = ALIGN(align); \
543 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { \
544 VMLINUX_SYMBOL(__start___ex_table) = .; \
4b89b7f7 545 KEEP(*(__ex_table)) \
ef53dae8
SR
546 VMLINUX_SYMBOL(__stop___ex_table) = .; \
547 }
548
549/*
550 * Init task
551 */
39a449d9 552#define INIT_TASK_DATA_SECTION(align) \
ef53dae8 553 . = ALIGN(align); \
da5e37ef 554 .data..init_task : AT(ADDR(.data..init_task) - LOAD_OFFSET) { \
39a449d9 555 INIT_TASK_DATA(align) \
ef53dae8 556 }
37c514e3 557
b99b87f7 558#ifdef CONFIG_CONSTRUCTORS
2a2325e6
HC
559#define KERNEL_CTORS() . = ALIGN(8); \
560 VMLINUX_SYMBOL(__ctors_start) = .; \
4b89b7f7
NP
561 KEEP(*(.ctors)) \
562 KEEP(*(SORT(.init_array.*))) \
563 KEEP(*(.init_array)) \
b99b87f7
PO
564 VMLINUX_SYMBOL(__ctors_end) = .;
565#else
566#define KERNEL_CTORS()
567#endif
568
01ba2bdc 569/* init and exit section handling */
eb8f6890 570#define INIT_DATA \
b67067f1 571 KEEP(*(SORT(___kentry+*))) \
eb8f6890 572 *(.init.data) \
eb8f6890 573 MEM_DISCARD(init.data) \
b99b87f7 574 KERNEL_CTORS() \
4b3b4c5e 575 MCOUNT_REC() \
9fd49328 576 *(.init.rodata) \
e4a9ea5e 577 FTRACE_EVENTS() \
3d56e331 578 TRACE_SYSCALLS() \
376e2424 579 KPROBE_BLACKLIST() \
540adea3 580 ERROR_INJECT_WHITELIST() \
aab94339 581 MEM_DISCARD(init.rodata) \
f2f6c255 582 CLK_OF_TABLES() \
f618c470 583 RESERVEDMEM_OF_TABLES() \
2fcc112a 584 TIMER_OF_TABLES() \
1cd076bf 585 IOMMU_OF_TABLES() \
6c3ff8b1 586 CPU_METHOD_OF_TABLES() \
449e056c 587 CPUIDLE_METHOD_OF_TABLES() \
f6e916b8 588 KERNEL_DTB() \
b0b6abd3 589 IRQCHIP_OF_MATCH_TABLE() \
46e589a3 590 ACPI_PROBE_TABLE(irqchip) \
2fcc112a
DL
591 ACPI_PROBE_TABLE(timer) \
592 ACPI_PROBE_TABLE(iort) \
2eaa7909 593 EARLYCON_TABLE()
eb8f6890
SR
594
595#define INIT_TEXT \
596 *(.init.text) \
e41f501d 597 *(.text.startup) \
eb8f6890
SR
598 MEM_DISCARD(init.text)
599
600#define EXIT_DATA \
601 *(.exit.data) \
e41f501d
DV
602 *(.fini_array) \
603 *(.dtors) \
eb8f6890
SR
604 MEM_DISCARD(exit.data) \
605 MEM_DISCARD(exit.rodata)
01ba2bdc 606
eb8f6890
SR
607#define EXIT_TEXT \
608 *(.exit.text) \
e41f501d 609 *(.text.exit) \
eb8f6890 610 MEM_DISCARD(exit.text)
01ba2bdc 611
7923f90f
SR
612#define EXIT_CALL \
613 *(.exitcall.exit)
614
ef53dae8
SR
615/*
616 * bss (Block Started by Symbol) - uninitialized data
617 * zeroed during startup
618 */
04e448d9
TA
619#define SBSS(sbss_align) \
620 . = ALIGN(sbss_align); \
ef53dae8 621 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \
83a092cf 622 *(.dynsbss) \
ef53dae8
SR
623 *(.sbss) \
624 *(.scommon) \
625 }
626
c87728ca
DD
627/*
628 * Allow archectures to redefine BSS_FIRST_SECTIONS to add extra
629 * sections to the front of bss.
630 */
631#ifndef BSS_FIRST_SECTIONS
632#define BSS_FIRST_SECTIONS
633#endif
634
ef53dae8
SR
635#define BSS(bss_align) \
636 . = ALIGN(bss_align); \
637 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \
c87728ca 638 BSS_FIRST_SECTIONS \
7c74df07 639 *(.bss..page_aligned) \
ef53dae8 640 *(.dynbss) \
cb87481e 641 *(BSS_MAIN) \
ef53dae8 642 *(COMMON) \
ef53dae8
SR
643 }
644
645/*
646 * DWARF debug sections.
647 * Symbols in the DWARF debugging sections are relative to
648 * the beginning of the section so we begin them at 0.
649 */
a7d0c210
PBG
650#define DWARF_DEBUG \
651 /* DWARF 1 */ \
652 .debug 0 : { *(.debug) } \
653 .line 0 : { *(.line) } \
654 /* GNU DWARF 1 extensions */ \
655 .debug_srcinfo 0 : { *(.debug_srcinfo) } \
656 .debug_sfnames 0 : { *(.debug_sfnames) } \
657 /* DWARF 1.1 and DWARF 2 */ \
658 .debug_aranges 0 : { *(.debug_aranges) } \
659 .debug_pubnames 0 : { *(.debug_pubnames) } \
660 /* DWARF 2 */ \
661 .debug_info 0 : { *(.debug_info \
662 .gnu.linkonce.wi.*) } \
663 .debug_abbrev 0 : { *(.debug_abbrev) } \
664 .debug_line 0 : { *(.debug_line) } \
665 .debug_frame 0 : { *(.debug_frame) } \
666 .debug_str 0 : { *(.debug_str) } \
667 .debug_loc 0 : { *(.debug_loc) } \
668 .debug_macinfo 0 : { *(.debug_macinfo) } \
83a092cf
NP
669 .debug_pubtypes 0 : { *(.debug_pubtypes) } \
670 /* DWARF 3 */ \
671 .debug_ranges 0 : { *(.debug_ranges) } \
a7d0c210
PBG
672 /* SGI/MIPS DWARF 2 extensions */ \
673 .debug_weaknames 0 : { *(.debug_weaknames) } \
674 .debug_funcnames 0 : { *(.debug_funcnames) } \
675 .debug_typenames 0 : { *(.debug_typenames) } \
676 .debug_varnames 0 : { *(.debug_varnames) } \
83a092cf
NP
677 /* GNU DWARF 2 extensions */ \
678 .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) } \
679 .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) } \
680 /* DWARF 4 */ \
681 .debug_types 0 : { *(.debug_types) } \
682 /* DWARF 5 */ \
683 .debug_macro 0 : { *(.debug_macro) } \
684 .debug_addr 0 : { *(.debug_addr) }
a7d0c210
PBG
685
686 /* Stabs debugging sections. */
687#define STABS_DEBUG \
688 .stab 0 : { *(.stab) } \
689 .stabstr 0 : { *(.stabstr) } \
690 .stab.excl 0 : { *(.stab.excl) } \
691 .stab.exclstr 0 : { *(.stab.exclstr) } \
692 .stab.index 0 : { *(.stab.index) } \
693 .stab.indexstr 0 : { *(.stab.indexstr) } \
694 .comment 0 : { *(.comment) }
9c9b8b38 695
6360b1fb 696#ifdef CONFIG_GENERIC_BUG
7664c5a1
JF
697#define BUG_TABLE \
698 . = ALIGN(8); \
699 __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
c6de0026 700 VMLINUX_SYMBOL(__start___bug_table) = .; \
4b89b7f7 701 KEEP(*(__bug_table)) \
c6de0026 702 VMLINUX_SYMBOL(__stop___bug_table) = .; \
7664c5a1 703 }
6360b1fb
JB
704#else
705#define BUG_TABLE
706#endif
7664c5a1 707
11af8474 708#ifdef CONFIG_UNWINDER_ORC
ee9f8fce
JP
709#define ORC_UNWIND_TABLE \
710 . = ALIGN(4); \
711 .orc_unwind_ip : AT(ADDR(.orc_unwind_ip) - LOAD_OFFSET) { \
712 VMLINUX_SYMBOL(__start_orc_unwind_ip) = .; \
713 KEEP(*(.orc_unwind_ip)) \
714 VMLINUX_SYMBOL(__stop_orc_unwind_ip) = .; \
715 } \
716 . = ALIGN(6); \
717 .orc_unwind : AT(ADDR(.orc_unwind) - LOAD_OFFSET) { \
718 VMLINUX_SYMBOL(__start_orc_unwind) = .; \
719 KEEP(*(.orc_unwind)) \
720 VMLINUX_SYMBOL(__stop_orc_unwind) = .; \
721 } \
722 . = ALIGN(4); \
723 .orc_lookup : AT(ADDR(.orc_lookup) - LOAD_OFFSET) { \
724 VMLINUX_SYMBOL(orc_lookup) = .; \
725 . += (((SIZEOF(.text) + LOOKUP_BLOCK_SIZE - 1) / \
726 LOOKUP_BLOCK_SIZE) + 1) * 4; \
727 VMLINUX_SYMBOL(orc_lookup_end) = .; \
728 }
729#else
730#define ORC_UNWIND_TABLE
731#endif
732
63687a52
JB
733#ifdef CONFIG_PM_TRACE
734#define TRACEDATA \
735 . = ALIGN(4); \
736 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
c6de0026 737 VMLINUX_SYMBOL(__tracedata_start) = .; \
4b89b7f7 738 KEEP(*(.tracedata)) \
c6de0026 739 VMLINUX_SYMBOL(__tracedata_end) = .; \
63687a52
JB
740 }
741#else
742#define TRACEDATA
743#endif
744
9c9b8b38 745#define NOTES \
cbe87121
RM
746 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \
747 VMLINUX_SYMBOL(__start_notes) = .; \
748 *(.note.*) \
749 VMLINUX_SYMBOL(__stop_notes) = .; \
750 }
61ce1efe 751
ef53dae8
SR
752#define INIT_SETUP(initsetup_align) \
753 . = ALIGN(initsetup_align); \
754 VMLINUX_SYMBOL(__setup_start) = .; \
4b89b7f7 755 KEEP(*(.init.setup)) \
ef53dae8
SR
756 VMLINUX_SYMBOL(__setup_end) = .;
757
026cee00
PM
758#define INIT_CALLS_LEVEL(level) \
759 VMLINUX_SYMBOL(__initcall##level##_start) = .; \
b67067f1
NP
760 KEEP(*(.initcall##level##.init)) \
761 KEEP(*(.initcall##level##s.init)) \
61ce1efe 762
ef53dae8
SR
763#define INIT_CALLS \
764 VMLINUX_SYMBOL(__initcall_start) = .; \
b67067f1 765 KEEP(*(.initcallearly.init)) \
026cee00
PM
766 INIT_CALLS_LEVEL(0) \
767 INIT_CALLS_LEVEL(1) \
768 INIT_CALLS_LEVEL(2) \
769 INIT_CALLS_LEVEL(3) \
770 INIT_CALLS_LEVEL(4) \
771 INIT_CALLS_LEVEL(5) \
772 INIT_CALLS_LEVEL(rootfs) \
773 INIT_CALLS_LEVEL(6) \
774 INIT_CALLS_LEVEL(7) \
ef53dae8
SR
775 VMLINUX_SYMBOL(__initcall_end) = .;
776
777#define CON_INITCALL \
778 VMLINUX_SYMBOL(__con_initcall_start) = .; \
b67067f1 779 KEEP(*(.con_initcall.init)) \
ef53dae8
SR
780 VMLINUX_SYMBOL(__con_initcall_end) = .;
781
782#define SECURITY_INITCALL \
783 VMLINUX_SYMBOL(__security_initcall_start) = .; \
b67067f1 784 KEEP(*(.security_initcall.init)) \
ef53dae8
SR
785 VMLINUX_SYMBOL(__security_initcall_end) = .;
786
787#ifdef CONFIG_BLK_DEV_INITRD
788#define INIT_RAM_FS \
d8826262 789 . = ALIGN(4); \
ef53dae8 790 VMLINUX_SYMBOL(__initramfs_start) = .; \
b67067f1 791 KEEP(*(.init.ramfs)) \
ffe8018c 792 . = ALIGN(8); \
b67067f1 793 KEEP(*(.init.ramfs.info))
ef53dae8 794#else
eadfe219 795#define INIT_RAM_FS
ef53dae8
SR
796#endif
797
ac26963a
BS
798/*
799 * Memory encryption operates on a page basis. Since we need to clear
800 * the memory encryption mask for this section, it needs to be aligned
801 * on a page boundary and be a page-size multiple in length.
802 *
803 * Note: We use a separate section so that only this section gets
804 * decrypted to avoid exposing more than we wish.
805 */
806#ifdef CONFIG_AMD_MEM_ENCRYPT
807#define PERCPU_DECRYPTED_SECTION \
808 . = ALIGN(PAGE_SIZE); \
809 *(.data..percpu..decrypted) \
810 . = ALIGN(PAGE_SIZE);
811#else
812#define PERCPU_DECRYPTED_SECTION
813#endif
814
815
023bf6f1
TH
816/*
817 * Default discarded sections.
818 *
819 * Some archs want to discard exit text/data at runtime rather than
820 * link time due to cross-section references such as alt instructions,
821 * bug table, eh_frame, etc. DISCARDS must be the last of output
822 * section definitions so that such archs put those in earlier section
823 * definitions.
824 */
405d967d
TH
825#define DISCARDS \
826 /DISCARD/ : { \
827 EXIT_TEXT \
828 EXIT_DATA \
023bf6f1 829 EXIT_CALL \
405d967d 830 *(.discard) \
c7f52cdc 831 *(.discard.*) \
405d967d
TH
832 }
833
6ea0c34d
MF
834/**
835 * PERCPU_INPUT - the percpu input sections
836 * @cacheline: cacheline size
837 *
838 * The core percpu section names and core symbols which do not rely
839 * directly upon load addresses.
840 *
841 * @cacheline is used to align subsections to avoid false cacheline
842 * sharing between subsections for different purposes.
843 */
844#define PERCPU_INPUT(cacheline) \
845 VMLINUX_SYMBOL(__per_cpu_start) = .; \
846 *(.data..percpu..first) \
847 . = ALIGN(PAGE_SIZE); \
848 *(.data..percpu..page_aligned) \
849 . = ALIGN(cacheline); \
330d2822 850 *(.data..percpu..read_mostly) \
6ea0c34d
MF
851 . = ALIGN(cacheline); \
852 *(.data..percpu) \
853 *(.data..percpu..shared_aligned) \
ac26963a 854 PERCPU_DECRYPTED_SECTION \
6ea0c34d
MF
855 VMLINUX_SYMBOL(__per_cpu_end) = .;
856
3e5d8f97 857/**
6b7c38d5 858 * PERCPU_VADDR - define output section for percpu area
19df0c2f 859 * @cacheline: cacheline size
3e5d8f97
TH
860 * @vaddr: explicit base address (optional)
861 * @phdr: destination PHDR (optional)
862 *
19df0c2f
TH
863 * Macro which expands to output section for percpu area.
864 *
865 * @cacheline is used to align subsections to avoid false cacheline
866 * sharing between subsections for different purposes.
867 *
868 * If @vaddr is not blank, it specifies explicit base address and all
869 * percpu symbols will be offset from the given address. If blank,
870 * @vaddr always equals @laddr + LOAD_OFFSET.
3e5d8f97
TH
871 *
872 * @phdr defines the output PHDR to use if not blank. Be warned that
873 * output PHDR is sticky. If @phdr is specified, the next output
874 * section in the linker script will go there too. @phdr should have
875 * a leading colon.
876 *
3ac6cffe
TH
877 * Note that this macros defines __per_cpu_load as an absolute symbol.
878 * If there is no need to put the percpu section at a predetermined
0415b00d 879 * address, use PERCPU_SECTION.
3e5d8f97 880 */
19df0c2f 881#define PERCPU_VADDR(cacheline, vaddr, phdr) \
dba3d36b 882 VMLINUX_SYMBOL(__per_cpu_load) = .; \
3d9a854c 883 .data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
6b7c38d5 884 - LOAD_OFFSET) { \
6ea0c34d 885 PERCPU_INPUT(cacheline) \
6b7c38d5 886 } phdr \
3d9a854c 887 . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu);
3e5d8f97
TH
888
889/**
0415b00d 890 * PERCPU_SECTION - define output section for percpu area, simple version
19df0c2f 891 * @cacheline: cacheline size
3e5d8f97 892 *
0415b00d
TH
893 * Align to PAGE_SIZE and outputs output section for percpu area. This
894 * macro doesn't manipulate @vaddr or @phdr and __per_cpu_load and
3e5d8f97 895 * __per_cpu_start will be identical.
3ac6cffe 896 *
0415b00d 897 * This macro is equivalent to ALIGN(PAGE_SIZE); PERCPU_VADDR(@cacheline,,)
19df0c2f
TH
898 * except that __per_cpu_load is defined as a relative symbol against
899 * .data..percpu which is required for relocatable x86_32 configuration.
3e5d8f97 900 */
0415b00d
TH
901#define PERCPU_SECTION(cacheline) \
902 . = ALIGN(PAGE_SIZE); \
3d9a854c 903 .data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \
3ac6cffe 904 VMLINUX_SYMBOL(__per_cpu_load) = .; \
6ea0c34d 905 PERCPU_INPUT(cacheline) \
3ac6cffe 906 }
ef53dae8
SR
907
908
909/*
910 * Definition of the high level *_SECTION macros
911 * They will fit only a subset of the architectures
912 */
913
914
915/*
916 * Writeable data.
917 * All sections are combined in a single .data section.
918 * The sections following CONSTRUCTORS are arranged so their
919 * typical alignment matches.
920 * A cacheline is typical/always less than a PAGE_SIZE so
921 * the sections that has this restriction (or similar)
922 * is located before the ones requiring PAGE_SIZE alignment.
923 * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which
25985edc 924 * matches the requirement of PAGE_ALIGNED_DATA.
ef53dae8 925 *
7923f90f 926 * use 0 as page_align if page_aligned data is not used */
73f1d939 927#define RW_DATA_SECTION(cacheline, pagealigned, inittask) \
ef53dae8
SR
928 . = ALIGN(PAGE_SIZE); \
929 .data : AT(ADDR(.data) - LOAD_OFFSET) { \
39a449d9 930 INIT_TASK_DATA(inittask) \
1b208622
TA
931 NOSAVE_DATA \
932 PAGE_ALIGNED_DATA(pagealigned) \
ef53dae8
SR
933 CACHELINE_ALIGNED_DATA(cacheline) \
934 READ_MOSTLY_DATA(cacheline) \
935 DATA_DATA \
936 CONSTRUCTORS \
19d43626 937 } \
ee9f8fce 938 BUG_TABLE \
ef53dae8
SR
939
940#define INIT_TEXT_SECTION(inittext_align) \
941 . = ALIGN(inittext_align); \
942 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { \
943 VMLINUX_SYMBOL(_sinittext) = .; \
944 INIT_TEXT \
945 VMLINUX_SYMBOL(_einittext) = .; \
946 }
947
948#define INIT_DATA_SECTION(initsetup_align) \
949 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { \
950 INIT_DATA \
951 INIT_SETUP(initsetup_align) \
952 INIT_CALLS \
953 CON_INITCALL \
954 SECURITY_INITCALL \
955 INIT_RAM_FS \
956 }
957
04e448d9
TA
958#define BSS_SECTION(sbss_align, bss_align, stop_align) \
959 . = ALIGN(sbss_align); \
960 VMLINUX_SYMBOL(__bss_start) = .; \
961 SBSS(sbss_align) \
ef53dae8 962 BSS(bss_align) \
04e448d9
TA
963 . = ALIGN(stop_align); \
964 VMLINUX_SYMBOL(__bss_stop) = .;