diff options
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 6 |
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. */ |