diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2016-12-26 10:08:41 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-12-26 10:08:41 +0100 |
commit | de6591238b478bc86b8cf5af01a484114e399213 (patch) | |
tree | 2717c115fbc7518fcbe9348239ff536eb914d267 /sysdeps/powerpc/ifunc-sel.h | |
parent | 003a27e8195470f470f4d9384ca70d4e9fc8bd1b (diff) | |
download | glibc-de6591238b478bc86b8cf5af01a484114e399213.zip glibc-de6591238b478bc86b8cf5af01a484114e399213.tar.gz glibc-de6591238b478bc86b8cf5af01a484114e399213.tar.bz2 |
Do not stack-protect ifunc resolvers [BZ #7065]
When dynamically linking, ifunc resolvers are called before TLS is
initialized, so they cannot be safely stack-protected.
We avoid disabling stack-protection on large numbers of files by
using __attribute__ ((__optimize__ ("-fno-stack-protector")))
to turn it off just for the resolvers themselves. (We provide
the attribute even when statically linking, because we will later
use it elsewhere too.)
Diffstat (limited to 'sysdeps/powerpc/ifunc-sel.h')
-rw-r--r-- | sysdeps/powerpc/ifunc-sel.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/powerpc/ifunc-sel.h b/sysdeps/powerpc/ifunc-sel.h index ac589bd..bdb00bf 100644 --- a/sysdeps/powerpc/ifunc-sel.h +++ b/sysdeps/powerpc/ifunc-sel.h @@ -5,6 +5,7 @@ extern int global; static inline void * +inhibit_stack_protector ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void)) { register void *ret __asm__ ("r3"); @@ -32,6 +33,7 @@ ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void)) } static inline void * +inhibit_stack_protector ifunc_one (int (*f1) (void)) { register void *ret __asm__ ("r3"); |