aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-support.c
diff options
context:
space:
mode:
authorRyan S. Arnold <rsa@us.ibm.com>2010-12-19 22:49:01 -0500
committerUlrich Drepper <drepper@gmail.com>2010-12-19 22:49:01 -0500
commit30950a5fd2346c43ba4fc59c16f122cfb59f9629 (patch)
tree400aceac60bdb17ec66caf2850d173ad8554e135 /elf/dl-support.c
parentdb753e2cfb2051ebf20dc089f87c5b1297cc2cff (diff)
downloadglibc-30950a5fd2346c43ba4fc59c16f122cfb59f9629.tar
glibc-30950a5fd2346c43ba4fc59c16f122cfb59f9629.tar.gz
glibc-30950a5fd2346c43ba4fc59c16f122cfb59f9629.tar.bz2
glibc-30950a5fd2346c43ba4fc59c16f122cfb59f9629.zip
Make PowerPC64 default to nonexecutable stack
Diffstat (limited to 'elf/dl-support.c')
-rw-r--r--elf/dl-support.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 5897b32e8c..1b128c37ff 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -32,6 +32,7 @@
#include <dl-procinfo.h>
#include <unsecvars.h>
#include <hp-timing.h>
+#include <stackinfo.h>
extern char *__progname;
char **_dl_argv = &__progname; /* This is checked for some error messages. */
@@ -134,8 +135,9 @@ uint64_t _dl_hwcap __attribute__ ((nocommon));
setting _dl_hwcap nonzero below, but we do anyway. */
uint64_t _dl_hwcap_mask __attribute__ ((nocommon));
-/* Prevailing state of the stack, PF_X indicating it's executable. */
-ElfW(Word) _dl_stack_flags = PF_R|PF_W|PF_X;
+/* Prevailing state of the stack. Generally this includes PF_X, indicating it's
+ * executable but this isn't true for all platforms. */
+ElfW(Word) _dl_stack_flags = DEFAULT_STACK_PERMS;
/* If loading a shared object requires that we make the stack executable
when it was not, we do it by calling this function.