arm: emit .type %function directive in FUNC_START macro

The linker needs to know whether a symbol is STT_FUNCTION when
deciding which farcall stub to emit (if needed), this patch adds this
to the FUNC_START macro which is used in crt0.
This commit is contained in:
Christophe Lyon 2024-06-19 15:48:30 +00:00
parent 7e3c833592
commit c2091f706c
3 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,7 @@
.thumb
.macro FUNC_START name
.global \name
.type \name, %function
.thumb_func
\name:
.endm
@ -55,6 +56,7 @@
.code 32
.macro FUNC_START name
.global \name
.type \name, %function
\name:
.endm
#endif

View File

@ -17,6 +17,7 @@
#ifdef PREFER_THUMB
.macro FUNC_START name
.global \name
.type \name, %function
.thumb_func
\name:
.endm
@ -24,6 +25,7 @@
#else
.macro FUNC_START name
.global \name
.type \name, %function
\name:
.endm
.code 32

View File

@ -48,6 +48,7 @@
.thumb
.macro FUNC_START name
.global \name
.type \name, %function
.thumb_func
\name:
.endm
@ -55,6 +56,7 @@
.code 32
.macro FUNC_START name
.global \name
.type \name, %function
\name:
.endm
#endif