From 17c7994988c08f229ee024467e0983f86461bd2b Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 23 Feb 2009 08:37:35 +0000 Subject: - fix weak ssp symbol on some arches (Peter S. Mazinger) Work around alleged binutils glitch with weak symbols on some arches. See binutils ML, weak psm and vapier. --- ldso/ldso/ldso.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'ldso') diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 449328cac..37247cd9a 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -96,15 +96,13 @@ extern void _start(void); #ifdef __UCLIBC_HAS_SSP__ # include -uintptr_t stack_chk_guard; +static uintptr_t stack_chk_guard; # ifndef THREAD_SET_STACK_GUARD /* Only exported for architectures that don't store the stack guard canary * in local thread area. */ uintptr_t __stack_chk_guard attribute_relro; -# ifdef __UCLIBC_HAS_SSP_COMPAT__ -strong_alias(__stack_chk_guard,__guard) -# endif -# elif defined __UCLIBC_HAS_SSP_COMPAT__ +# endif +# ifdef __UCLIBC_HAS_SSP_COMPAT__ uintptr_t __guard attribute_relro; # endif #endif @@ -344,12 +342,12 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr, stack_chk_guard = _dl_setup_stack_chk_guard (); # ifdef THREAD_SET_STACK_GUARD THREAD_SET_STACK_GUARD (stack_chk_guard); -# ifdef __UCLIBC_HAS_SSP_COMPAT__ - __guard = stack_chk_guard; -# endif # else __stack_chk_guard = stack_chk_guard; # endif +# ifdef __UCLIBC_HAS_SSP_COMPAT__ + __guard = stack_chk_guard; +# endif #endif /* At this point we are now free to examine the user application, -- cgit v1.2.3