klibs: add stack smashing protection
Now that klibs are dynamically linked to the kernel via standard
ELF relocations, the kernel can do the necessary relocations for
klibs to access the kernel symbols used by the stack protector.
@@ -155,8 +155,6 @@ endif
CFLAGS+= $(KERNCFLAGS) -O3 $(INCLUDES) -fPIC $(DEFINES)
-# TODO should add stack protection to klibs...
-CFLAGS+= -fno-stack-protector
LDFLAGS+= -shared -Bsymbolic -nostdlib -T$(ARCHDIR)/klib.lds
CLEANFILES+= $(KLIB_SYMS)
