From c4b9206a22e123f93d919eb6610eb5d28d30b962 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 18 Jul 2024 21:20:16 +0200 Subject: [PATCH] Makefile.mk: Remove linker warning on RWX segments Silence a linker warnings about segments with RWX. Having one segment for all sections is a good design choice as it makes parsing the elf into a loadable binary simpler. Change-Id: I1e0f51c69dabaea314ac45924474d446a9ab68f4 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/83559 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer Reviewed-by: Nico Huber --- Makefile.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.mk b/Makefile.mk index b4532c399b..0123bd5544 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -603,6 +603,9 @@ LDFLAGS_common := --gc-sections LDFLAGS_common += -nostdlib LDFLAGS_common += --nmagic LDFLAGS_common += -static +# Disable warning on segments with RWX. +# All loadable sections are placed in the same segment for simplicity. +LDFLAGS_common += --no-warn-rwx-segments # Workaround for RISC-V linker bug, merge back into above line when fixed. # https://sourceware.org/bugzilla/show_bug.cgi?id=27180