mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <ahmad@a3f.at>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH master] sandbox: fix linker warnings with newer ld
Date: Tue, 21 Feb 2023 08:44:21 +0100	[thread overview]
Message-ID: <20230221074421.GW10447@pengutronix.de> (raw)
In-Reply-To: <20230221065047.1114231-1-ahmad@a3f.at>

On Tue, Feb 21, 2023 at 07:50:47AM +0100, Ahmad Fatoum wrote:
> Building with a newer ld results in two warnings:
> 
>     binutils-2.39/bin/ld: warning: defaultenv/defaultenv-2-reboot-mode.bbenv.gz.o:
>     missing .note.GNU-stack section implies executable stack
>     binutils-2.39/bin/ld: NOTE: This behaviour is deprecated and will be removed
>     in a future version of the linker
>     binutils-2.39/bin/ld: warning: barebox has a LOAD segment with RWX permissions
> 
> This is already fixed for the non-sandbox platform with a4b49c69c3ad
> ("Kbuild: link with -z noexecstack and --no-warn-rwx-segments"), but
> sandbox has its own cmd_barebox__, so add the equivalent to the sandbox
> Makefile as well.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> ---
>  arch/sandbox/Makefile | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
> index d5ba05ba866f..0f59e79e13e0 100644
> --- a/arch/sandbox/Makefile
> +++ b/arch/sandbox/Makefile
> @@ -69,6 +69,7 @@ BAREBOX_LDFLAGS += \
>  	-Wl,-T,$(BAREBOX_LDS) \
>  	-Wl,--whole-archive $(BAREBOX_OBJS) -Wl,--no-whole-archive \
>  	-lrt -pthread $(SDL_LIBS) $(FTDI1_LIBS) \
> +	-Wl,-z noexecstack $(call cc-option,-Wl$(comma)--no-warn-rwx-segments) \
>  	$(SANITIZER_LIBS)
>  
>  cmd_barebox__ = $(CC) -o $@ $(BAREBOX_LDFLAGS)
> -- 
> 2.38.3
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2023-02-21  7:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21  6:50 Ahmad Fatoum
2023-02-21  7:44 ` Sascha Hauer [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=20230221074421.GW10447@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=ahmad@a3f.at \
    --cc=barebox@lists.infradead.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