diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-02-26 21:49:38 +0100 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-03 18:22:49 +0100 |
commit | 2e9d2266c0cea250f7a87dc6aa2b02d0bd5a0aea (patch) | |
tree | edcf4df26d09584490cf70dc77c194793ba6d19d /ldso | |
parent | f00e553e4b084007781df5e4b5accc2e152da231 (diff) |
Correct ssp code
Avoid using strong_alias in ssp, some archs dislike it.
Make stack_chk_guard static.
Export __stack_smash_handler only if compatibility option is enabled.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/ldso.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 89af5a505..4d79d4665 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -102,15 +102,13 @@ extern void _start(void); #ifdef __UCLIBC_HAS_SSP__ # include <dl-osinfo.h> -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 @@ -944,12 +942,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 |