46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
|
|
From 051c723a6463a579b05dcaa81f204516737a3645 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Ross Burton <ross.burton@arm.com>
|
||
|
|
Date: Wed, 9 Aug 2023 15:56:03 -0400
|
||
|
|
Subject: [PATCH] Binutils 2.39 now warns when a segment has RXW
|
||
|
|
permissions[1]:
|
||
|
|
|
||
|
|
aarch64-none-elf-ld.bfd: warning: bl31.elf has a LOAD segment with RWX
|
||
|
|
permissions
|
||
|
|
|
||
|
|
However, TF-A passes --fatal-warnings to LD, so this is a build failure.
|
||
|
|
|
||
|
|
There is a ticket filed upstream[2], so until that is resolved just
|
||
|
|
remove --fatal-warnings.
|
||
|
|
|
||
|
|
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||
|
|
[2] https://developer.trustedfirmware.org/T996
|
||
|
|
|
||
|
|
Upstream-Status: Inappropriate
|
||
|
|
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||
|
|
---
|
||
|
|
Makefile | 4 ++--
|
||
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/Makefile b/Makefile
|
||
|
|
index 1ddb7b84417d..9eae30c923ec 100644
|
||
|
|
--- a/Makefile
|
||
|
|
+++ b/Makefile
|
||
|
|
@@ -425,7 +425,7 @@ TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
|
||
|
|
# LD = gcc (used when GCC LTO is enabled)
|
||
|
|
else ifneq ($(findstring gcc,$(notdir $(LD))),)
|
||
|
|
# Pass ld options with Wl or Xlinker switches
|
||
|
|
-TF_LDFLAGS += -Wl,--fatal-warnings -O1
|
||
|
|
+TF_LDFLAGS += -O1
|
||
|
|
TF_LDFLAGS += -Wl,--gc-sections
|
||
|
|
ifeq ($(ENABLE_LTO),1)
|
||
|
|
ifeq (${ARCH},aarch64)
|
||
|
|
@@ -442,7 +442,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||
|
|
|
||
|
|
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||
|
|
else
|
||
|
|
-TF_LDFLAGS += --fatal-warnings -O1
|
||
|
|
+TF_LDFLAGS += -O1
|
||
|
|
TF_LDFLAGS += --gc-sections
|
||
|
|
# ld.lld doesn't recognize the errata flags,
|
||
|
|
# therefore don't add those in that case
|