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

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

commit 95e348dc17fdd5eab85ab441b15451083e30daa9
Author: liang.huang <[email protected]>
AuthorDate: Sat Jul 25 13:48:50 2026 +0800

    arch/risc-v: add .type directives to exception/boot assembly labels
    
    Several risc-v assembly labels are .global but untyped, so mkallsyms.py
    (which only collects STT_FUNC symbols) silently drops them from the
    ALLSYMS table, and backtraces/%pS print raw addresses instead of names.
    
    Add .type <name>, function to the affected labels, matching existing
    convention elsewhere in the tree.
    
    Signed-off-by: liang.huang <[email protected]>
    Assisted-by: Claude Code:claude-sonnet-5
---
 arch/risc-v/src/bl808/bl808_head.S              | 1 +
 arch/risc-v/src/c906/c906_head.S                | 1 +
 arch/risc-v/src/common/espressif/esp_head.S     | 1 +
 arch/risc-v/src/common/riscv_exception_common.S | 3 +++
 arch/risc-v/src/eic7700x/eic7700x_head.S        | 1 +
 arch/risc-v/src/esp32c3-legacy/esp32c3_head.S   | 1 +
 arch/risc-v/src/fe310/fe310_head.S              | 1 +
 arch/risc-v/src/gd32vw55x/gd32vw55x_head.S      | 1 +
 arch/risc-v/src/hpm6000/hpm_head.S              | 1 +
 arch/risc-v/src/hpm6750/hpm6750_head.S          | 1 +
 arch/risc-v/src/jh7110/jh7110_head.S            | 1 +
 arch/risc-v/src/k210/k210_head.S                | 1 +
 arch/risc-v/src/k230/k230_head.S                | 2 ++
 arch/risc-v/src/litex/litex_head.S              | 1 +
 arch/risc-v/src/litex/litex_shead.S             | 1 +
 arch/risc-v/src/mpfs/mpfs_head.S                | 1 +
 arch/risc-v/src/mpfs/mpfs_shead.S               | 2 ++
 arch/risc-v/src/nuttsbi/sbi_head.S              | 1 +
 arch/risc-v/src/qemu-rv/qemu_rv_head.S          | 2 ++
 arch/risc-v/src/rp23xx-rv/rp23xx_head.S         | 1 +
 arch/risc-v/src/rv32m1/rv32m1_head.S            | 1 +
 arch/risc-v/src/sg2000/sg2000_head.S            | 1 +
 22 files changed, 27 insertions(+)

diff --git a/arch/risc-v/src/bl808/bl808_head.S 
b/arch/risc-v/src/bl808/bl808_head.S
index 1c1aa0d16a7..e835c45b03e 100644
--- a/arch/risc-v/src/bl808/bl808_head.S
+++ b/arch/risc-v/src/bl808/bl808_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/c906/c906_head.S b/arch/risc-v/src/c906/c906_head.S
index 3560ef4b260..716bc964a31 100644
--- a/arch/risc-v/src/c906/c906_head.S
+++ b/arch/risc-v/src/c906/c906_head.S
@@ -42,6 +42,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/common/espressif/esp_head.S 
b/arch/risc-v/src/common/espressif/esp_head.S
index 9b85bac5fff..d71ce3aae82 100644
--- a/arch/risc-v/src/common/espressif/esp_head.S
+++ b/arch/risc-v/src/common/espressif/esp_head.S
@@ -36,6 +36,7 @@
  ****************************************************************************/
 
   .global  __start
+  .type    __start, function
 
 /****************************************************************************
  * Section: .text
diff --git a/arch/risc-v/src/common/riscv_exception_common.S 
b/arch/risc-v/src/common/riscv_exception_common.S
index 442407d0371..11570b3d69f 100644
--- a/arch/risc-v/src/common/riscv_exception_common.S
+++ b/arch/risc-v/src/common/riscv_exception_common.S
@@ -108,6 +108,8 @@
   .global exception_common
   .global return_from_exception
   .global return_from_syscall
+  .type   exception_common, function
+  .type   return_from_exception, function
   .align  8
 
 exception_common:
@@ -337,6 +339,7 @@ return_from_exception:
 
   .section EXCEPTION_SECTION
   .global riscv_jump_to_user
+  .type   riscv_jump_to_user, function
 
 riscv_jump_to_user:
 
diff --git a/arch/risc-v/src/eic7700x/eic7700x_head.S 
b/arch/risc-v/src/eic7700x/eic7700x_head.S
index 24a659fefb6..795411b0f99 100644
--- a/arch/risc-v/src/eic7700x/eic7700x_head.S
+++ b/arch/risc-v/src/eic7700x/eic7700x_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/esp32c3-legacy/esp32c3_head.S 
b/arch/risc-v/src/esp32c3-legacy/esp32c3_head.S
index 9b274aa129f..b975e3914cd 100644
--- a/arch/risc-v/src/esp32c3-legacy/esp32c3_head.S
+++ b/arch/risc-v/src/esp32c3-legacy/esp32c3_head.S
@@ -35,6 +35,7 @@
  ****************************************************************************/
 
   .global  __start
+  .type    __start, function
 
 /****************************************************************************
  * Section: .text
diff --git a/arch/risc-v/src/fe310/fe310_head.S 
b/arch/risc-v/src/fe310/fe310_head.S
index 80a575d5343..a38bd613536 100644
--- a/arch/risc-v/src/fe310/fe310_head.S
+++ b/arch/risc-v/src/fe310/fe310_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/gd32vw55x/gd32vw55x_head.S 
b/arch/risc-v/src/gd32vw55x/gd32vw55x_head.S
index 8a089ad3da4..cb4f67a78d9 100644
--- a/arch/risc-v/src/gd32vw55x/gd32vw55x_head.S
+++ b/arch/risc-v/src/gd32vw55x/gd32vw55x_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/hpm6000/hpm_head.S 
b/arch/risc-v/src/hpm6000/hpm_head.S
index af8af5435a3..b618b8d2b69 100644
--- a/arch/risc-v/src/hpm6000/hpm_head.S
+++ b/arch/risc-v/src/hpm6000/hpm_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
   /* reset mstatus to 0*/
diff --git a/arch/risc-v/src/hpm6750/hpm6750_head.S 
b/arch/risc-v/src/hpm6750/hpm6750_head.S
index a8a704ded15..e8c5d031fc0 100644
--- a/arch/risc-v/src/hpm6750/hpm6750_head.S
+++ b/arch/risc-v/src/hpm6750/hpm6750_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
   /* reset mstatus to 0*/
diff --git a/arch/risc-v/src/jh7110/jh7110_head.S 
b/arch/risc-v/src/jh7110/jh7110_head.S
index 05993c3663f..ce07af60c5c 100644
--- a/arch/risc-v/src/jh7110/jh7110_head.S
+++ b/arch/risc-v/src/jh7110/jh7110_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/k210/k210_head.S b/arch/risc-v/src/k210/k210_head.S
index b59e3a38026..208aad0bbb8 100644
--- a/arch/risc-v/src/k210/k210_head.S
+++ b/arch/risc-v/src/k210/k210_head.S
@@ -42,6 +42,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/k230/k230_head.S b/arch/risc-v/src/k230/k230_head.S
index e7daca2f34b..7fbdc66de8e 100644
--- a/arch/risc-v/src/k230/k230_head.S
+++ b/arch/risc-v/src/k230/k230_head.S
@@ -48,12 +48,14 @@
 #ifdef CONFIG_NUTTSBI
 
   .global __start_s
+  .type   __start_s, function
 
 __start_s:
 
 #else
 
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/litex/litex_head.S 
b/arch/risc-v/src/litex/litex_head.S
index cd4312232fe..f5059dac7ac 100644
--- a/arch/risc-v/src/litex/litex_head.S
+++ b/arch/risc-v/src/litex/litex_head.S
@@ -39,6 +39,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/litex/litex_shead.S 
b/arch/risc-v/src/litex/litex_shead.S
index 5d5236287e8..de36680104d 100644
--- a/arch/risc-v/src/litex/litex_shead.S
+++ b/arch/risc-v/src/litex/litex_shead.S
@@ -43,6 +43,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 /****************************************************************************
  * Name: __start
diff --git a/arch/risc-v/src/mpfs/mpfs_head.S b/arch/risc-v/src/mpfs/mpfs_head.S
index a3f666fa80c..144b38451ae 100644
--- a/arch/risc-v/src/mpfs/mpfs_head.S
+++ b/arch/risc-v/src/mpfs/mpfs_head.S
@@ -44,6 +44,7 @@
 
   .section .start, "ax"
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/mpfs/mpfs_shead.S 
b/arch/risc-v/src/mpfs/mpfs_shead.S
index d6bf508c2ca..64825ae7ffc 100644
--- a/arch/risc-v/src/mpfs/mpfs_shead.S
+++ b/arch/risc-v/src/mpfs/mpfs_shead.S
@@ -44,8 +44,10 @@
   .section .start, "ax"
 #ifdef CONFIG_NUTTSBI
   .global __start_s
+  .type   __start_s, function
 #else
   .global __start
+  .type   __start, function
 #endif
 
 /****************************************************************************
diff --git a/arch/risc-v/src/nuttsbi/sbi_head.S 
b/arch/risc-v/src/nuttsbi/sbi_head.S
index a3bfb10351e..6f742b065ed 100644
--- a/arch/risc-v/src/nuttsbi/sbi_head.S
+++ b/arch/risc-v/src/nuttsbi/sbi_head.S
@@ -39,6 +39,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/qemu-rv/qemu_rv_head.S 
b/arch/risc-v/src/qemu-rv/qemu_rv_head.S
index 7a91c9e7284..9dd11e91f36 100644
--- a/arch/risc-v/src/qemu-rv/qemu_rv_head.S
+++ b/arch/risc-v/src/qemu-rv/qemu_rv_head.S
@@ -42,10 +42,12 @@
   .section .text
 #ifndef CONFIG_NUTTSBI
   .global __start
+  .type   __start, function
 
 __start:
 #else
   .global __start_s
+  .type   __start_s, function
 
 __start_s:
 #endif
diff --git a/arch/risc-v/src/rp23xx-rv/rp23xx_head.S 
b/arch/risc-v/src/rp23xx-rv/rp23xx_head.S
index 772545d8004..520ed4b8b02 100644
--- a/arch/risc-v/src/rp23xx-rv/rp23xx_head.S
+++ b/arch/risc-v/src/rp23xx-rv/rp23xx_head.S
@@ -40,6 +40,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 
diff --git a/arch/risc-v/src/rv32m1/rv32m1_head.S 
b/arch/risc-v/src/rv32m1/rv32m1_head.S
index db1bbf12e3c..6ab26e654ed 100644
--- a/arch/risc-v/src/rv32m1/rv32m1_head.S
+++ b/arch/risc-v/src/rv32m1/rv32m1_head.S
@@ -38,6 +38,7 @@
   .global exception_common
   .global return_from_exception
   .global __start
+  .type   __start, function
 
   .section .text
 
diff --git a/arch/risc-v/src/sg2000/sg2000_head.S 
b/arch/risc-v/src/sg2000/sg2000_head.S
index 325911fa15d..ee876ad9741 100644
--- a/arch/risc-v/src/sg2000/sg2000_head.S
+++ b/arch/risc-v/src/sg2000/sg2000_head.S
@@ -41,6 +41,7 @@
 
   .section .text
   .global __start
+  .type   __start, function
 
 __start:
 

Reply via email to