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:
liang.huang 2026-07-25 13:48:50 +08:00
parent c92684faec
commit 437f8666a7
22 changed files with 27 additions and 0 deletions

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -42,6 +42,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -36,6 +36,7 @@
****************************************************************************/
.global __start
.type __start, function
/****************************************************************************
* Section: .text

View file

@ -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:

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -35,6 +35,7 @@
****************************************************************************/
.global __start
.type __start, function
/****************************************************************************
* Section: .text

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start:
/* reset mstatus to 0*/

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start:
/* reset mstatus to 0*/

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -42,6 +42,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -48,12 +48,14 @@
#ifdef CONFIG_NUTTSBI
.global __start_s
.type __start_s, function
__start_s:
#else
.global __start
.type __start, function
__start:

View file

@ -39,6 +39,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -43,6 +43,7 @@
.section .text
.global __start
.type __start, function
/****************************************************************************
* Name: __start

View file

@ -44,6 +44,7 @@
.section .start, "ax"
.global __start
.type __start, function
__start:

View file

@ -44,8 +44,10 @@
.section .start, "ax"
#ifdef CONFIG_NUTTSBI
.global __start_s
.type __start_s, function
#else
.global __start
.type __start, function
#endif
/****************************************************************************

View file

@ -39,6 +39,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -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

View file

@ -40,6 +40,7 @@
.section .text
.global __start
.type __start, function
__start:

View file

@ -38,6 +38,7 @@
.global exception_common
.global return_from_exception
.global __start
.type __start, function
.section .text

View file

@ -41,6 +41,7 @@
.section .text
.global __start
.type __start, function
__start: