summaryrefslogtreecommitdiffstats
path: root/ldso
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-12-23 14:06:09 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2011-12-23 14:06:09 +0100
commit3fb4bfcafbcaff3522e7bab48ff03460fec99023 (patch)
treed84b6874f38c3d50d0bf7fb7d069efa167ee9453 /ldso
parent22e153b5c94c10bd10120bd34a936686514a2299 (diff)
downloaduClibc-alpine-3fb4bfcafbcaff3522e7bab48ff03460fec99023.tar.bz2
uClibc-alpine-3fb4bfcafbcaff3522e7bab48ff03460fec99023.tar.xz
Compatible stack protector for non Thread Local storage
Before we had thread local storage the __stack_chk_guard was a global variable that was referenced to by the older binaries. We since then have changed ABI so this patch can probably go away.
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/ldso.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 7ee925706..3585cb7e3 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -103,11 +103,7 @@ extern void _start(void);
#ifdef __UCLIBC_HAS_SSP__
# include <dl-osinfo.h>
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;
-# endif
# ifdef __UCLIBC_HAS_SSP_COMPAT__
uintptr_t __guard attribute_relro;
# endif
@@ -951,9 +947,8 @@ 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);
-# else
- __stack_chk_guard = stack_chk_guard;
# endif
+ __stack_chk_guard = stack_chk_guard;
# ifdef __UCLIBC_HAS_SSP_COMPAT__
__guard = stack_chk_guard;
# endif