diff options
author | Cedric Schieli <cschieli@gmail.com> | 2010-06-01 12:37:47 +0000 |
---|---|---|
committer | Cedric Schieli <cschieli@gmail.com> | 2010-06-01 12:37:47 +0000 |
commit | 10b8b99e48384b4470cac1330080c12d2ade01de (patch) | |
tree | 7bb4ad6cd94a2c9a960fd9a4532d123eee5151d5 /main/libc0.9.32/compat-stack-guard.patch | |
parent | 9252f1cfd78299b137400ed8169a79f7f833daac (diff) | |
parent | c6c0b6f9dbde1244e7b31f74c703178a867e873f (diff) | |
download | aports-to-upstream.tar.bz2 aports-to-upstream.tar.xz |
Merge remote branch 'upstream/master' into to-upstreamto-upstream
Diffstat (limited to 'main/libc0.9.32/compat-stack-guard.patch')
-rw-r--r-- | main/libc0.9.32/compat-stack-guard.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/main/libc0.9.32/compat-stack-guard.patch b/main/libc0.9.32/compat-stack-guard.patch new file mode 100644 index 00000000..71d78bac --- /dev/null +++ b/main/libc0.9.32/compat-stack-guard.patch @@ -0,0 +1,51 @@ +diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c +index 125cf96..bb47952 100644 +--- a/ldso/ldso/ldso.c ++++ b/ldso/ldso/ldso.c +@@ -101,10 +101,10 @@ extern void _start(void); + #ifdef __UCLIBC_HAS_SSP__ + # include <dl-osinfo.h> + uintptr_t stack_chk_guard; ++uintptr_t __stack_chk_guard attribute_relro; + # 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 +@@ -935,13 +935,12 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr, + #ifdef __UCLIBC_HAS_SSP__ + /* Set up the stack checker's canary. */ + stack_chk_guard = _dl_setup_stack_chk_guard (); ++ __stack_chk_guard = 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 + #endif + +diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c +index f7e45c6..b527068 100644 +--- a/libc/misc/internals/__uClibc_main.c ++++ b/libc/misc/internals/__uClibc_main.c +@@ -43,13 +43,13 @@ void *__libc_stack_end = NULL; + + # ifdef __UCLIBC_HAS_SSP__ + # include <dl-osinfo.h> ++/* for gcc-4.1 non-TLS */ ++uintptr_t __stack_chk_guard attribute_relro; + # ifndef THREAD_SET_STACK_GUARD + /* Only exported for architectures that don't store the stack guard canary + * in thread local area. */ + # include <stdint.h> + 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 __UCLIBC_HAS_SSP_COMPAT__ + # ifdef __HAVE_SHARED__ |