[PATCH 18/19] firmware: mark firmware sections as having non-executable stack

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jun 12 06:02:39 PDT 2023


allyesconfig on sandbox detects that firmware misses the annotation,
which we already have for environment, DTs and other generated assembly
files. Fix it there too.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 firmware/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/firmware/Makefile b/firmware/Makefile
index 75812cb6bf24..efdd5c0da541 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -45,6 +45,7 @@ ASM_ALIGN = $(if $(CONFIG_64BIT),3,2)
 
 filechk_fwbin = { \
 	echo "/* Generated by $(src)/Makefile */"		;\
+	echo ".section .note.GNU-stack,\"\",%progbits"		;\
 	echo "    .section $2,\"$3\""				;\
 	echo "    .p2align $(ASM_ALIGN)"			;\
 	echo ".global _fw_$(FWSTR)_start"			;\
-- 
2.39.2




More information about the barebox mailing list