diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-03-07 09:23:24 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-03-07 09:23:24 +0000 |
commit | 2d1097a2dab64e6d99ec2805965cc79d8189e18b (patch) | |
tree | 53f53716434ed8ecd49e40483d51b6d46f13a58b /ldso | |
parent | 4ab008d3baa68978640d16ccd40ab91bd1335e65 (diff) |
Add UCLIBC_HAS_SSP_COMPAT option guarding gcc-3.x ssp support
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/ldso.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 050569573..eebd26ebe 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -89,11 +89,16 @@ extern void _start(void); #ifdef __UCLIBC_HAS_SSP__ #include <dl-osinfo.h> uintptr_t stack_chk_guard; -#ifndef THREAD_SET_STACK_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 __UCLIBC_HAS_SSP_COMPAT__ +uintptr_t __guard attribute_relro; +# endif #endif #endif @@ -268,6 +273,9 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long 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 |