Implement Stack Smashing Protection

This commit is contained in:
Bananymous
2022-11-12 23:45:26 +02:00
parent 7ad8189e24
commit db656fe469
2 changed files with 20 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ EXEC_PREFIX?=$(PREFIX)
BOOTDIR?=$(EXEC_PREFIX)/boot
INCLUDEDIR?=$(PREFIX)/include
CFLAGS:=$(CFLAGS) -ffreestanding -Wall -Wextra
CFLAGS:=$(CFLAGS) -fstack-protector -ffreestanding -Wall -Wextra
CPPFLAGS:=$(CPPFLAGS) -D__is_kernel -Iinclude
LDFLAGS:=$(LDFLAGS)
LIBS:=$(LIBS) -nostdlib -lk -lgcc
@@ -30,6 +30,7 @@ LIBS:=$(LIBS) $(KERNEL_ARCH_LIBS)
KERNEL_OBJS=\
$(KERNEL_ARCH_OBJS) \
kernel/kernel.o \
kernel/ssp.o \
OBJS=\
$(ARCHDIR)/crti.o \