public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: Christophe Lyon <christophe.lyon@linaro.org>, newlib@sourceware.org
Subject: Re: [PATCH] arm: emit .type %function directive in FUNC_START macro
Date: Wed, 26 Jun 2024 12:56:21 +0100	[thread overview]
Message-ID: <4f02f09f-967a-4f68-a4ec-2f0bab60ea21@arm.com> (raw)
In-Reply-To: <20240626090703.3736501-1-christophe.lyon@linaro.org>

On 26/06/2024 10:07, Christophe Lyon wrote:
> 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.

OK.

R.

> ---
>  libgloss/arm/crt0.S         | 2 ++
>  libgloss/arm/redboot-crt0.S | 2 ++
>  newlib/libc/sys/arm/crt0.S  | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/libgloss/arm/crt0.S b/libgloss/arm/crt0.S
> index cd1a20d61..9ff0e6323 100644
> --- a/libgloss/arm/crt0.S
> +++ b/libgloss/arm/crt0.S
> @@ -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
> diff --git a/libgloss/arm/redboot-crt0.S b/libgloss/arm/redboot-crt0.S
> index 0e3a9b4e2..c9f3440ac 100644
> --- a/libgloss/arm/redboot-crt0.S
> +++ b/libgloss/arm/redboot-crt0.S
> @@ -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
> diff --git a/newlib/libc/sys/arm/crt0.S b/newlib/libc/sys/arm/crt0.S
> index 90d5be393..dae0f0465 100644
> --- a/newlib/libc/sys/arm/crt0.S
> +++ b/newlib/libc/sys/arm/crt0.S
> @@ -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


      reply	other threads:[~2024-06-26 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  9:07 Christophe Lyon
2024-06-26 11:56 ` Richard Earnshaw (lists) [this message]

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=4f02f09f-967a-4f68-a4ec-2f0bab60ea21@arm.com \
    --to=richard.earnshaw@arm.com \
    --cc=christophe.lyon@linaro.org \
    --cc=newlib@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).