From 3fb4bfcafbcaff3522e7bab48ff03460fec99023 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 23 Dec 2011 14:06:09 +0100 Subject: Compatible stack protector for non Thread Local storage Before we had thread local storage the __stack_chk_guard was a global variable that was referenced to by the older binaries. We since then have changed ABI so this patch can probably go away. --- libc/misc/internals/__uClibc_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libc/misc/internals/__uClibc_main.c') diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 315365a25..78cd058b4 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -46,12 +46,7 @@ void *__libc_stack_end = NULL; # ifdef __UCLIBC_HAS_SSP__ # include static uintptr_t stack_chk_guard; -# ifndef THREAD_SET_STACK_GUARD -/* Only exported for architectures that don't store the stack guard canary - * in thread local area. */ -/* for gcc-4.1 non-TLS */ uintptr_t __stack_chk_guard attribute_relro; -# endif /* for gcc-3.x + Etoh ssp */ # ifdef __UCLIBC_HAS_SSP_COMPAT__ uintptr_t __guard attribute_relro; @@ -247,9 +242,8 @@ void __uClibc_init(void) stack_chk_guard = _dl_setup_stack_chk_guard(); # ifdef THREAD_SET_STACK_GUARD THREAD_SET_STACK_GUARD (stack_chk_guard); -# else - __stack_chk_guard = stack_chk_guard; # endif + __stack_chk_guard = stack_chk_guard; # ifdef __UCLIBC_HAS_SSP_COMPAT__ __guard = stack_chk_guard; # endif -- cgit v1.2.3