diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-02-01 22:11:03 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-02-01 22:11:03 +0000 |
commit | 940c777f9d07c0cb14d960d479917258c95c0b75 (patch) | |
tree | 03c3a361668d80737fd80ff1b06cf957399de7cf /libc/misc | |
parent | b326308200ddc31a7306966e1696e6db9642899e (diff) |
Make it build w/ HAVE_SHARED disabled and SSP enabled
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/internals/__uClibc_main.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 1318fc99e..2f81f4503 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -51,19 +51,23 @@ libc_hidden_proto(__libc_fcntl) #ifndef SHARED void *__libc_stack_end=NULL; -#ifdef __UCLIBC_HAS_SSP__ -#include <dl-osinfo.h> -#ifndef THREAD_SET_STACK_GUARD +# ifdef __UCLIBC_HAS_SSP__ +# include <dl-osinfo.h> +# ifndef THREAD_SET_STACK_GUARD /* Only exported for architectures that don't store the stack guard canary * in thread local area. */ -#include <stdint.h> +# include <stdint.h> uintptr_t stack_chk_guard; /* for gcc-4.1 non-TLS */ uintptr_t __stack_chk_guard attribute_relro; /* for gcc-3.x + Etoh ssp */ +# ifdef __HAVE_SHARED__ strong_alias(__stack_chk_guard,__guard) -#endif -#endif +# else +uintptr_t __guard attribute_relro; +# endif +# endif +# endif #endif /* !SHARED */ @@ -193,6 +197,9 @@ void __uClibc_init(void) THREAD_SET_STACK_GUARD (stack_chk_guard); # else __stack_chk_guard = stack_chk_guard; +# ifndef __HAVE_SHARED__ + __guard = stack_chk_guard; +# endif # endif # endif #endif |