From 27d24f21abe70d0376445548a6dd75a5b957aecb Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 18 Jul 2024 21:39:21 +0200 Subject: [PATCH] Makefile.mk: Mark stack as not executable Suppress the warning: missing .note.GNU-stack section implies executable stack NOTE: This behaviour is deprecated and will be removed in a future version of the linker Since we don't need an executable stack this is fine. Some newer linkers like LLD even default to this. Change-Id: Ib787cc464e0924ab57575cec9fbfd1d59bdd3481 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/83560 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer Reviewed-by: Nico Huber --- Makefile.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.mk b/Makefile.mk index 0123bd5544..e9ad2ccbb2 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -603,6 +603,7 @@ LDFLAGS_common := --gc-sections LDFLAGS_common += -nostdlib LDFLAGS_common += --nmagic LDFLAGS_common += -static +LDFLAGS_common += -z noexecstack # Disable warning on segments with RWX. # All loadable sections are placed in the same segment for simplicity. LDFLAGS_common += --no-warn-rwx-segments