[Skiboot] [PATCH] Makefile: Link final elf with --no-warn-rwx-segments

Joel Stanley joel at jms.id.au
Wed Jul 19 15:07:58 AEST 2023


No system loads skiboot as an ELF, so the segment information is not
used.

Avoids these warnings with binutils as of 2.39:

 powerpc64-linux-gnu-ld: warning: skiboot.tmp.elf has a LOAD segment with RWX permissions
 powerpc64-linux-gnu-ld: warning: skiboot.elf has a LOAD segment with RWX permissions

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 Makefile.main | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.main b/Makefile.main
index bfa24f61342f..934d4c2aa133 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -190,6 +190,7 @@ LDFLAGS += -Wl,--oformat,elf64-powerpc
 LDFLAGS_FINAL = -m elf64lppc --no-multi-toc -N --build-id=none --whole-archive
 LDFLAGS_FINAL += -static -nostdlib -pie -Ttext-segment=$(LD_TEXT) --oformat=elf64-powerpc
 LDFLAGS_FINAL += --orphan-handling=warn
+LDFLAGS_FINAL += --no-warn-rwx-segments
 
 LDRFLAGS=-melf64ppc
 # Debug stuff
-- 
2.40.1



More information about the Skiboot mailing list