mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
49986faf5d
commit
1ecaba192c
2 files changed
+9
No files matched your search
@@ -0,0 +1,8 @@
|
||||
#include <kernel.h>
|
||||
#include <console.h>
|
||||
|
||||
void __stack_chk_fail(void)
|
||||
{
|
||||
printk("stack smashing detected\n");
|
||||
do_exit();
|
||||
}
|
||||
@@ -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
|
||||
|
||||