From 30950a5fd2346c43ba4fc59c16f122cfb59f9629 Mon Sep 17 00:00:00 2001 From: "Ryan S. Arnold" Date: Sun, 19 Dec 2010 22:49:01 -0500 Subject: Make PowerPC64 default to nonexecutable stack --- elf/dl-load.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'elf/dl-load.c') 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. */ -- cgit v1.2.1