From 39d4b348e0aaee43a27602961b0281df99c06957 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 21 Feb 2023 14:14:41 -0500 Subject: [PATCH] ld: Don't warn about RWX segment maps Newer gnu ld complains about RWX segment maps, and since we build with "--fatal-warnings" we get the following: ld -nostdlib --warn-common --no-undefined --fatal-warnings \ --build-id=sha1 -shared -Bsymbolic \ -L/builddir/build/BUILD/gnu-efi-3.0.9//apps/../aa64/lib \ -L/builddir/build/BUILD/gnu-efi-3.0.9//apps/../aa64/gnuefi \ /builddir/build/BUILD/gnu-efi-3.0.9//apps/../aa64/gnuefi/crt0-efi-aa64.o \ --defsym=EFI_SUBSYSTEM=0xa t.o -o t.so -lefi -lgnuefi \ /usr/lib/gcc/aarch64-redhat-linux/13/libgcc.a \ -T /builddir/build/BUILD/gnu-efi-3.0.9//apps/../gnuefi/elf_aa64_efi.lds ld: warning: t.so has a LOAD segment with RWX permissions Since the final linked binary will be PE, rather than ELF, and won't even *have* segment maps, this should be safe to just disable. This patch adds "--no-warn-rwx-segments" to the ld command lines. Signed-off-by: Peter Jones --- Make.defaults | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Make.defaults b/Make.defaults index 3b56150..59b6508 100755 --- a/Make.defaults +++ b/Make.defaults @@ -205,7 +205,7 @@ endif ASFLAGS += $(ARCH3264) LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings \ - --build-id=sha1 + --build-id=sha1 --no-warn-rwx-segments ifneq ($(ARCH),arm) export LIBGCC=$(shell $(CC) $(CFLAGS) $(ARCH3264) -print-libgcc-file-name)