From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH master] sandbox: fix linker warnings with newer ld
Date: Tue, 21 Feb 2023 07:50:47 +0100 [thread overview]
Message-ID: <20230221065047.1114231-1-ahmad@a3f.at> (raw)
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(+)
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
next reply other threads:[~2023-02-21 6:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 6:50 Ahmad Fatoum [this message]
2023-02-21 7:44 ` Sascha Hauer
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=20230221065047.1114231-1-ahmad@a3f.at \
--to=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