minios: _chk_fail and _chk canaries for minios and newlib

Add __stack_chk_fail to mini-os and __sprintf_chk __fprintf_chk to
newlib, to cope with ocaml runtimes compiled with -fstack-protector.

From: "George S. Coker, II" <gscoker@alpha.ncsc.mil>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
Keir Fraser committed 2009-03-31 11:36:11 +01:00
1 parent 49986faf5d
commit 1ecaba192c
2 files changed
+9

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
#include <kernel.h>
#include <console.h>
void __stack_chk_fail(void)
{
printk("stack smashing detected\n");
do_exit();
}
+1
View File
@@ -91,6 +91,7 @@ newlib-$(NEWLIB_VERSION).tar.gz:
newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
tar xzf $<
patch -d $@ -p0 < newlib.patch
patch -d $@ -p0 < newlib-chk.patch
touch $@
NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.