You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/04/10 00:27:18 UTC

[incubator-nuttx] 02/04: riscv/riscv_exception_common.S: Allow chips to define the exception section.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit e8134a8b578b9cecf4c40cc9ff1c72462c0c08af
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Thu Apr 7 20:34:55 2022 +0200

    riscv/riscv_exception_common.S: Allow chips to define the exception
    section.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/risc-v/src/common/riscv_exception_common.S | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/risc-v/src/common/riscv_exception_common.S b/arch/risc-v/src/common/riscv_exception_common.S
index 4b4a5c57f5..d30c3f5adb 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