aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.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-load.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-load.c')
-rw-r--r--elf/dl-load.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 4c14f08e55..41b5ce7691 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -984,8 +984,10 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
}
}
- /* Presumed absent PT_GNU_STACK. */
- uint_fast16_t stack_flags = PF_R|PF_W|PF_X;
+ /* On most platforms presume that PT_GNU_STACK is absent and the stack is
+ * executable. Other platforms default to a nonexecutable stack and don't
+ * need PT_GNU_STACK to do so. */
+ uint_fast16_t stack_flags = DEFAULT_STACK_PERMS;
{
/* Scan the program header table, collecting its load commands. */