[PATCH 1/1] arm: cpu: armv7m: add required .type name, %function directive
Tom Rini
trini at konsulko.com
Wed May 7 18:55:33 CEST 2025
On Wed, May 07, 2025 at 06:07:54AM +0000, Johannes Krottmayer wrote:
> Since GNU binutils version 2.44, assembly functions must include
> the assembler directive .type name, %function. If not a call to
> these functions fails with the error message 'Unknown destination
> type (ARM/Thumb)' and the error message 'dangerous relocation:
> unsupported relocation' at linking.
>
> Signed-off-by: Johannes Krottmayer <johannes at krotti42.com>
> Cc: Tom Rini <trini at konsulko.com>
> ---
> arch/arm/cpu/armv7m/start.S | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/cpu/armv7m/start.S b/arch/arm/cpu/armv7m/start.S
> index 0c07f2140c7..c20f01a0aed 100644
> --- a/arch/arm/cpu/armv7m/start.S
> +++ b/arch/arm/cpu/armv7m/start.S
> @@ -12,5 +12,6 @@ reset:
> W(b) _main
>
> .globl c_runtime_cpu_setup
> +.type c_runtime_cpu_setup, %function
> c_runtime_cpu_setup:
> mov pc, lr
Thanks for making the patch. There's an argument that this should use
the ENTRY / ENDPROC macros from <linux/linkage.h> but that also shows
that we're missing commit 5d4cae5fe2ea ("[ARM] VFP: fix section mismatch
error") from the kernel. And so I'm fine with making a TODO to clean
this up later if you don't want to embark on something a bit more
complicated here.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250507/43865ba5/attachment.sig>
More information about the U-Boot
mailing list