diff --git a/arch/risc-v/src/common/riscv_exception_common.S b/arch/risc-v/src/common/riscv_exception_common.S index 4b4a5c57f57..d30c3f5adb0 100644 --- a/arch/risc-v/src/common/riscv_exception_common.S +++ b/arch/risc-v/src/common/riscv_exception_common.S @@ -49,6 +49,12 @@ # endif #endif +/* Provide a default section for the exeception handler. */ + +#ifndef EXCEPTION_SECTION +# define EXCEPTION_SECTION .text +#endif + /**************************************************************************** * Public Symbols ****************************************************************************/ @@ -62,7 +68,7 @@ * ****************************************************************************/ - .section .text + .section EXCEPTION_SECTION .global exception_common .align 8