diff options
Diffstat (limited to 'sys/rt')
-rw-r--r-- | sys/rt/boot.c | 2 | ||||
-rw-r--r-- | sys/rt/stack.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/rt/boot.c b/sys/rt/boot.c index 76f5599..320a596 100644 --- a/sys/rt/boot.c +++ b/sys/rt/boot.c @@ -4,6 +4,7 @@ /* tell linker to go find */ int __libc_start_main(int (*main)(int,char **,char **), int argc, char **argv); +void rt·guardstack(void); #define NAUX 38 static void @@ -19,6 +20,7 @@ rt·init(char **env, char *program) rt·context.sysinfo = aux[AT_SYSINFO]; rt·context.pagesize = aux[AT_PAGESZ]; + rt·guardstack(); } int diff --git a/sys/rt/stack.c b/sys/rt/stack.c index 5ab7a8a..0785760 100644 --- a/sys/rt/stack.c +++ b/sys/rt/stack.c @@ -2,7 +2,8 @@ #include <arch/atomic.h> /* unprefixed names determined by gcc */ -uintptr __stack_chk_guard; +uintptr rt·stackguard; +weakalias(rt·stackguard, __stack_chk_guard); void rt·guardstack(void) @@ -11,7 +12,8 @@ rt·guardstack(void) } void -__stack_chk_fail(void) +rt·stackfail(void) { atomic·crash(); } +weakalias(rt·stackfail, __stack_chk_fail); |