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

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

commit fbfd9d62da045f1b566029828093ef8554175850
Author: Xiang Xiao <xiaoxi...@xiaomi.com>
AuthorDate: Sun Jun 28 18:18:53 2020 +0800

    libelf: Parse .ARM.exidx only for ARM architecture
    
    since other arch has the different unwind approach
    
    Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com>
    Change-Id: Icefa0d4bc31bff967372949216d337770cd7e768
---
 binfmt/libelf/Kconfig       | 2 +-
 binfmt/libelf/libelf_load.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/binfmt/libelf/Kconfig b/binfmt/libelf/Kconfig
index 859ae66..ff91164 100644
--- a/binfmt/libelf/Kconfig
+++ b/binfmt/libelf/Kconfig
@@ -42,7 +42,7 @@ config ELF_DUMPBUFFER
 config ELF_EXIDX_SECTNAME
        string "ELF Section Name for Exception Index"
        default ".ARM.exidx"
-       depends on CXX_EXCEPTION
+       depends on CXX_EXCEPTION && ARCH_ARM
        ---help---
                Set the name string for the exception index section on the ELF 
modules to
                be loaded by the ELF binary loader.
diff --git a/binfmt/libelf/libelf_load.c b/binfmt/libelf/libelf_load.c
index 5eaf8d3..0b73aa5 100644
--- a/binfmt/libelf/libelf_load.c
+++ b/binfmt/libelf/libelf_load.c
@@ -342,7 +342,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo)
     }
 #endif
 
-#ifdef CONFIG_CXX_EXCEPTION
+#ifdef CONFIG_ELF_EXIDX_SECTNAME
   exidx = elf_findsection(loadinfo, CONFIG_ELF_EXIDX_SECTNAME);
   if (exidx < 0)
     {

Reply via email to