From 940c777f9d07c0cb14d960d479917258c95c0b75 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 1 Feb 2006 22:11:03 +0000 Subject: Make it build w/ HAVE_SHARED disabled and SSP enabled --- libc/misc/internals/__uClibc_main.c | 19 +++++++++++++------ 1 file 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 -#ifndef THREAD_SET_STACK_GUARD +# ifdef __UCLIBC_HAS_SSP__ +# include +# ifndef THREAD_SET_STACK_GUARD /* Only exported for architectures that don't store the stack guard canary * in thread local area. */ -#include +# include 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 -- cgit v1.2.3