[PATCH master] sandbox: fix linker warnings with newer ld
Sascha Hauer
sha at pengutronix.de
Mon Feb 20 23:44:21 PST 2023
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 at 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 |
More information about the barebox
mailing list