summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-02-23 08:38:23 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-02-23 08:38:23 +0000
commit8a754ff657ff7fbda1de90d1d2c5a4be92cfe409 (patch)
tree017a23f158612fa60b9e1326531b3fa05da82c35
parent040ae6a6231128c06e707ea8370082cf6cd5bc69 (diff)
downloaduClibc-alpine-8a754ff657ff7fbda1de90d1d2c5a4be92cfe409.tar.bz2
uClibc-alpine-8a754ff657ff7fbda1de90d1d2c5a4be92cfe409.tar.xz
- fix weak ssp symbol on some arches (Peter S. Mazinger) (r25417 from trunk)
Work around alleged binutils glitch with weak symbols on some arches. See binutils ML, weak psm and vapier.
-rw-r--r--ldso/ldso/ldso.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 28f434147..ebb6ddb3e 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -97,15 +97,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
@@ -233,12 +231,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,