summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__uClibc_main.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-03-07 09:23:24 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-03-07 09:23:24 +0000
commit2d1097a2dab64e6d99ec2805965cc79d8189e18b (patch)
tree53f53716434ed8ecd49e40483d51b6d46f13a58b /libc/misc/internals/__uClibc_main.c
parent4ab008d3baa68978640d16ccd40ab91bd1335e65 (diff)
Add UCLIBC_HAS_SSP_COMPAT option guarding gcc-3.x ssp support
Diffstat (limited to 'libc/misc/internals/__uClibc_main.c')
-rw-r--r--libc/misc/internals/__uClibc_main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index c50244494..a63345d68 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -61,11 +61,15 @@ 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__
+# ifdef __UCLIBC_HAS_SSP_COMPAT__
+# ifdef __HAVE_SHARED__
strong_alias(__stack_chk_guard,__guard)
-# else
+# else
uintptr_t __guard attribute_relro;
+# endif
# endif
+# elif defined __UCLIBC_HAS_SSP_COMPAT__
+uintptr_t __guard attribute_relro;
# endif
# endif
@@ -210,9 +214,12 @@ void __uClibc_init(void)
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;
-# ifndef __HAVE_SHARED__
+# if !defined __HAVE_SHARED__ && defined __UCLIBC_HAS_SSP_COMPAT__
__guard = stack_chk_guard;
# endif
# endif