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
7 #define ARM_CPU_DISCARD(x) x
8 #define ARM_CPU_KEEP(x)
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)
16 #define ARM_EXIT_KEEP(x)
17 #define ARM_EXIT_DISCARD(x) x
21 #define ARM_MMU_KEEP(x) x
22 #define ARM_MMU_DISCARD(x)
24 #define ARM_MMU_KEEP(x)
25 #define ARM_MMU_DISCARD(x) x
30 __proc_info_begin = .; \
36 __idmap_text_start = .; \
38 __idmap_text_end = .; \
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) \
50 ARM_MMU_DISCARD(*(.text.fixup)) \
51 ARM_MMU_DISCARD(*(__ex_table)) \
57 __entry_text_start = .; \
59 __entry_text_end = .; \
71 *(.got) /* Global offset table */ \
72 ARM_CPU_KEEP(PROC_INFO)
74 /* Stack unwinding tables */
75 #define ARM_UNWIND_SECTIONS \
78 __start_unwind_idx = .; \
80 __stop_unwind_idx = .; \
83 __start_unwind_tab = .; \
85 __stop_unwind_tab = .; \
89 * The vectors and stubs are relocatable code, and the
90 * only thing that matters is their relative offsets
93 __vectors_start = .; \
94 .vectors 0xffff0000 : AT(__vectors_start) { \
97 . = __vectors_start + SIZEOF(.vectors); \
101 .stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) { \
104 . = __stubs_start + SIZEOF(.stubs); \
107 PROVIDE(vector_fiq_offset = vector_fiq - ADDR(.vectors));
110 __itcm_start = ALIGN(4); \
111 .text_itcm ITCM_OFFSET : AT(__itcm_start - LOAD_OFFSET) { \
118 . = __itcm_start + SIZEOF(.text_itcm); \
121 .data_dtcm DTCM_OFFSET : AT(__dtcm_start - LOAD_OFFSET) { \
127 . = __dtcm_start + SIZEOF(.data_dtcm);