From 1290d38ac50b3afa7e5781d9d97346a1042c736c Mon Sep 17 00:00:00 2001 From: kib Date: Tue, 25 Jan 2011 21:12:31 +0000 Subject: When loading dso without PT_GNU_STACK phdr, only call __pthread_map_stacks_exec() on architectures that allow executable stacks. Reported and tested by: marcel (ia64) --- libexec/rtld-elf/map_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libexec/rtld-elf/map_object.c') diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 3f69e9b..2b33862 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -101,7 +101,7 @@ map_object(int fd, const char *path, const struct stat *sb) phdyn = phinterp = phtls = NULL; phdr_vaddr = 0; segs = alloca(sizeof(segs[0]) * hdr->e_phnum); - stack_flags = PF_X | PF_R | PF_W; + stack_flags = RTLD_DEFAULT_STACK_PF_EXEC | PF_R | PF_W; while (phdr < phlimit) { switch (phdr->p_type) { -- cgit v1.1