The latest binutils 2.39 throw a linker warning
"missing .note.GNU-stack section implies executable stack"
when compiling for x86.
This patch fixes the above linker warning.
Signed-off-by: Himanshu Chauhan <
hima...@thechauhan.dev>
---
arch/x86/board/x86_64_generic/
objects.mk | 2 +-
arch/x86/cpu/x86_64/
objects.mk | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/board/x86_64_generic/
objects.mk b/arch/x86/board/x86_64_generic/
objects.mk
index 4f7d0b55..e4d23b37 100644
--- a/arch/x86/board/x86_64_generic/
objects.mk
+++ b/arch/x86/board/x86_64_generic/
objects.mk
@@ -22,7 +22,7 @@
# */
board-asflags+=
-board-ldflags+=
+board-ldflags+= -z noexecstack
board-objs-y+= brd_main.o
board-objs-y+= brd_defterm.o
diff --git a/arch/x86/cpu/x86_64/
objects.mk b/arch/x86/cpu/x86_64/
objects.mk
index 2e7458f8..847f5021 100644
--- a/arch/x86/cpu/x86_64/
objects.mk
+++ b/arch/x86/cpu/x86_64/
objects.mk
@@ -32,6 +32,8 @@ cpu-cflags += -no-pie
cpu-cppflags += -no-pie
endif
+cpu-mergeflags += -z noexecstack
+
cpu-objs-y+= start.o
#These commented out files are what we will need to
--
2.43.0