diff --git a/arch/arm/core/aarch64/cpu_idle.S b/arch/arm/core/aarch64/cpu_idle.S index 39412ab549b..35fe80e302a 100644 --- a/arch/arm/core/aarch64/cpu_idle.S +++ b/arch/arm/core/aarch64/cpu_idle.S @@ -13,6 +13,8 @@ #include #include +_ASM_FILE_PROLOGUE + GTEXT(arch_cpu_idle) SECTION_FUNC(TEXT, arch_cpu_idle) #ifdef CONFIG_TRACING diff --git a/arch/arm/core/aarch64/isr_wrapper.S b/arch/arm/core/aarch64/isr_wrapper.S index 88248aab8e6..b0dc7f561da 100644 --- a/arch/arm/core/aarch64/isr_wrapper.S +++ b/arch/arm/core/aarch64/isr_wrapper.S @@ -15,6 +15,8 @@ #include #include +_ASM_FILE_PROLOGUE + GDATA(_sw_isr_table) /** diff --git a/arch/arm/core/aarch64/reset.S b/arch/arm/core/aarch64/reset.S index 4b510295ed4..a3afd786166 100644 --- a/arch/arm/core/aarch64/reset.S +++ b/arch/arm/core/aarch64/reset.S @@ -17,6 +17,8 @@ #include "vector_table.h" #include "macro.h" +_ASM_FILE_PROLOGUE + /** * * @brief Reset vector diff --git a/arch/arm/core/aarch64/swap_helper.S b/arch/arm/core/aarch64/swap_helper.S index 564f6297595..18d6e15fa62 100644 --- a/arch/arm/core/aarch64/swap_helper.S +++ b/arch/arm/core/aarch64/swap_helper.S @@ -19,6 +19,8 @@ #include #include "macro.h" +_ASM_FILE_PROLOGUE + GDATA(_kernel) GDATA(_k_neg_eagain) diff --git a/arch/arm/core/aarch64/vector_table.S b/arch/arm/core/aarch64/vector_table.S index 089a06fcdb6..7c7f1208a89 100644 --- a/arch/arm/core/aarch64/vector_table.S +++ b/arch/arm/core/aarch64/vector_table.S @@ -13,6 +13,8 @@ #include #include "vector_table.h" +_ASM_FILE_PROLOGUE + /* * Four types of exceptions: * - synchronous: aborts from MMU, SP/CP alignment checking, unallocated diff --git a/include/toolchain/gcc.h b/include/toolchain/gcc.h index b5efc80165c..e413d89c043 100644 --- a/include/toolchain/gcc.h +++ b/include/toolchain/gcc.h @@ -363,7 +363,9 @@ do { \ #else #define _ASM_FILE_PROLOGUE .text; .code 32 #endif /* CONFIG_ASSEMBLER_ISA_THUMB2 */ -#endif /* CONFIG_ARM && !CONFIG_ARM64 */ +#elif defined(CONFIG_ARM64) +#define _ASM_FILE_PROLOGUE .text +#endif /* CONFIG_ARM64 || (CONFIG_ARM && !CONFIG_ARM64)*/ #endif /* _ASMLANGUAGE */ /*