All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Krottmayer <johannes@krotti42.com>
To: u-boot@lists.denx.de
Cc: Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2 1/1] arm: cpu: armv7m: add ENTRY/ENDPROC macros
Date: Thu, 08 May 2025 19:09:33 +0000	[thread overview]
Message-ID: <a88cd4e4-c558-4fc3-86a5-e25e581d7b5d@krotti42.com> (raw)
In-Reply-To: <20250508185943.628503-1-johannes@krotti42.com>

Hi Tom!

I have tested the patch on real hardware and it works. But have
must add an additional board which is currently not in the U-Boot
tree from STMicroelectronis. Maybe I will release a patch series
too.

On 5/8/25 21:00, 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.
> 
> The macros ENTRY/ENDPROC includes this directive and should be
> used for all assembly functions.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>   arch/arm/cpu/armv7m/start.S | 20 +++++++++++++-------
>   1 file changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7m/start.S b/arch/arm/cpu/armv7m/start.S
> index 0c07f2140c7..3355167b3b0 100644
> --- a/arch/arm/cpu/armv7m/start.S
> +++ b/arch/arm/cpu/armv7m/start.S
> @@ -4,13 +4,19 @@
>    * Kamil Lulko, <kamil.lulko@gmail.com>
>    */
>   
> +#include <linux/linkage.h>
>   #include <asm/assembler.h>
>   
> -.globl	reset
> -.type reset, %function
> -reset:
> -	W(b)	_main
> +/*
> + * Startup code (reset vector)
> + */
> +ENTRY(reset)
> +	W(b)	_main	@ Jump to _main (C runtime crt0.S)
> +ENDPROC(reset)
>   
> -.globl	c_runtime_cpu_setup
> -c_runtime_cpu_setup:
> -	mov	pc, lr
> +/*
> + * Setup CPU for C runtime
> + */
> +ENTRY(c_runtime_cpu_setup)
> +	mov pc, lr			@ Jump back to caller
> +ENDPROC(c_runtime_cpu_setup)

Kind regards,

Johannes


  reply	other threads:[~2025-05-08 19:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07  6:07 [PATCH 0/1] arm: add required assembler directive (binutils >=2.44) Johannes Krottmayer
2025-05-07  6:07 ` [PATCH 1/1] arm: cpu: armv7m: add required .type name, %function directive Johannes Krottmayer
2025-05-07 16:55   ` Tom Rini
2025-05-07 18:17     ` Johannes Krottmayer
2025-05-07 19:07       ` Johannes Krottmayer
2025-05-07 21:18         ` Johannes Krottmayer
2025-05-07 22:51         ` Tom Rini
2025-05-07 23:36           ` Johannes Krottmayer
2025-05-08 19:00           ` [PATCH v2 1/1] arm: cpu: armv7m: add ENTRY/ENDPROC macros Johannes Krottmayer
2025-05-08 19:09             ` Johannes Krottmayer [this message]
2025-05-08 19:34               ` Tom Rini
2025-05-08 19:33             ` Tom Rini
2025-05-22 19:36             ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a88cd4e4-c558-4fc3-86a5-e25e581d7b5d@krotti42.com \
    --to=johannes@krotti42.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.