mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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 <liang.huang@houmo.ai> Assisted-by: Claude Code:claude-sonnet-5
This commit is contained in:
parent
c92684faec
commit
437f8666a7
22 changed files with 27 additions and 0 deletions
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
/****************************************************************************
|
||||
* Section: .text
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
/****************************************************************************
|
||||
* Section: .text
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
/* reset mstatus to 0*/
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
/* reset mstatus to 0*/
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -48,12 +48,14 @@
|
|||
#ifdef CONFIG_NUTTSBI
|
||||
|
||||
.global __start_s
|
||||
.type __start_s, function
|
||||
|
||||
__start_s:
|
||||
|
||||
#else
|
||||
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
/****************************************************************************
|
||||
* Name: __start
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
.section .start, "ax"
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@
|
|||
.section .start, "ax"
|
||||
#ifdef CONFIG_NUTTSBI
|
||||
.global __start_s
|
||||
.type __start_s, function
|
||||
#else
|
||||
.global __start
|
||||
.type __start, function
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
.global exception_common
|
||||
.global return_from_exception
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
.section .text
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
.section .text
|
||||
.global __start
|
||||
.type __start, function
|
||||
|
||||
__start:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue