]> Zhao Yanbai Git Server - kernel.git/commitdiff
fix missing .note.GNU-stack section implies executable stack
authoracevest <zhaoyanbai@126.com>
Mon, 15 May 2023 11:25:00 +0000 (11:25 +0000)
committeracevest <zhaoyanbai@126.com>
Mon, 15 May 2023 11:25:00 +0000 (11:25 +0000)
Makefile

index e3db78e3ed8013dd92599d0c7038c8eb1d0c19f6..a12c79e816f9c36fe4b0f8fe6405d5a98969ff7e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ HEADER_FILES := $(foreach DIR, $(INC_DIRS), $(wildcard $(DIR)/*.h))
 OBJS := $(patsubst %,%.o,$(SOURCE_FILES))
 
 ${KERNELBIN}: ${OBJS}
-       ${LD} -m elf_i386 -M -T$(LINKSCRIPT) $(OBJS) -o $@ > $(SYSTEMMAP)
+       ${LD} -z noexecstack -m elf_i386 -M -T$(LINKSCRIPT) $(OBJS) -o $@ > $(SYSTEMMAP)
        nm -a $@ > kernel.sym
        rm kernel/setup.c.o