Linux 5.7.7
[linux/fpc-iii.git] / arch / arm / kernel / vmlinux.lds.h
blob381a8e105fa5389dad57f67cb787013a698c9db6
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifdef CONFIG_HOTPLUG_CPU
4 #define ARM_CPU_DISCARD(x)
5 #define ARM_CPU_KEEP(x) x
6 #else
7 #define ARM_CPU_DISCARD(x) x
8 #define ARM_CPU_KEEP(x)
9 #endif
11 #if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
12 defined(CONFIG_GENERIC_BUG) || defined(CONFIG_JUMP_LABEL)
13 #define ARM_EXIT_KEEP(x) x
14 #define ARM_EXIT_DISCARD(x)
15 #else
16 #define ARM_EXIT_KEEP(x)
17 #define ARM_EXIT_DISCARD(x) x
18 #endif
20 #ifdef CONFIG_MMU
21 #define ARM_MMU_KEEP(x) x
22 #define ARM_MMU_DISCARD(x)
23 #else
24 #define ARM_MMU_KEEP(x)
25 #define ARM_MMU_DISCARD(x) x
26 #endif
28 #define PROC_INFO \
29 . = ALIGN(4); \
30 __proc_info_begin = .; \
31 *(.proc.info.init) \
32 __proc_info_end = .;
34 #define IDMAP_TEXT \
35 ALIGN_FUNCTION(); \
36 __idmap_text_start = .; \
37 *(.idmap.text) \
38 __idmap_text_end = .; \
40 #define ARM_DISCARD \
41 *(.ARM.exidx.exit.text) \
42 *(.ARM.extab.exit.text) \
43 *(.ARM.exidx.text.exit) \
44 *(.ARM.extab.text.exit) \
45 ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) \
46 ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) \
47 ARM_EXIT_DISCARD(EXIT_TEXT) \
48 ARM_EXIT_DISCARD(EXIT_DATA) \
49 EXIT_CALL \
50 ARM_MMU_DISCARD(*(.text.fixup)) \
51 ARM_MMU_DISCARD(*(__ex_table)) \
52 *(.discard) \
53 *(.discard.*)
55 #define ARM_TEXT \
56 IDMAP_TEXT \
57 __entry_text_start = .; \
58 *(.entry.text) \
59 __entry_text_end = .; \
60 IRQENTRY_TEXT \
61 SOFTIRQENTRY_TEXT \
62 TEXT_TEXT \
63 SCHED_TEXT \
64 CPUIDLE_TEXT \
65 LOCK_TEXT \
66 KPROBES_TEXT \
67 *(.gnu.warning) \
68 *(.glue_7) \
69 *(.glue_7t) \
70 . = ALIGN(4); \
71 *(.got) /* Global offset table */ \
72 ARM_CPU_KEEP(PROC_INFO)
74 /* Stack unwinding tables */
75 #define ARM_UNWIND_SECTIONS \
76 . = ALIGN(8); \
77 .ARM.unwind_idx : { \
78 __start_unwind_idx = .; \
79 *(.ARM.exidx*) \
80 __stop_unwind_idx = .; \
81 } \
82 .ARM.unwind_tab : { \
83 __start_unwind_tab = .; \
84 *(.ARM.extab*) \
85 __stop_unwind_tab = .; \
89 * The vectors and stubs are relocatable code, and the
90 * only thing that matters is their relative offsets
92 #define ARM_VECTORS \
93 __vectors_start = .; \
94 .vectors 0xffff0000 : AT(__vectors_start) { \
95 *(.vectors) \
96 } \
97 . = __vectors_start + SIZEOF(.vectors); \
98 __vectors_end = .; \
100 __stubs_start = .; \
101 .stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \
102 *(.stubs) \
104 . = __stubs_start + SIZEOF(.stubs); \
105 __stubs_end = .; \
107 PROVIDE(vector_fiq_offset = vector_fiq - ADDR(.vectors));
109 #define ARM_TCM \
110 __itcm_start = ALIGN(4); \
111 .text_itcm ITCM_OFFSET : AT(__itcm_start - LOAD_OFFSET) { \
112 __sitcm_text = .; \
113 *(.tcm.text) \
114 *(.tcm.rodata) \
115 . = ALIGN(4); \
116 __eitcm_text = .; \
118 . = __itcm_start + SIZEOF(.text_itcm); \
120 __dtcm_start = .; \
121 .data_dtcm DTCM_OFFSET : AT(__dtcm_start - LOAD_OFFSET) { \
122 __sdtcm_data = .; \
123 *(.tcm.data) \
124 . = ALIGN(4); \
125 __edtcm_data = .; \
127 . = __dtcm_start + SIZEOF(.data_dtcm);