+2010-06-11 Ryan S. Arnold <rsa@us.ibm.com>
+
+ * elf/dl-load.c (_dl_map_object_from_fd): Set default stack_flags to
+ no-exec for ARCH_PPC64.
+ * elf/dl-support.c [_dl_stack_flags]: Set default stack_flags to
+ no-exec for ARCH_PPC64.
+ * elf/rtld.c (_dl_starting_up): Set default stack_flags to no-exec for
+ ARCH_PPC64.
+
2009-09-04 H.J. Lu <hongjiu.lu@intel.com>
* configure.in: Support binutils 2.20.
}
}
+#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
+ /* Default to no-exec stack on PPC64. */
+ uint_fast16_t stack_flags = PF_R|PF_W;
+#else
/* Presumed absent PT_GNU_STACK. */
uint_fast16_t stack_flags = PF_R|PF_W|PF_X;
+#endif
{
/* Scan the program header table, collecting its load commands. */
size_t _dl_phnum;
uint64_t _dl_hwcap __attribute__ ((nocommon));
+
+#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
+/* Default to no-exec stack on PPC64. */
+/* Prevailing state of the stack, PF_X indicating it's executable. */
+ElfW(Word) _dl_stack_flags = PF_R|PF_W;
+#else
/* Prevailing state of the stack, PF_X indicating it's executable. */
ElfW(Word) _dl_stack_flags = PF_R|PF_W|PF_X;
+#endif
/* If loading a shared object requires that we make the stack executable
when it was not, we do it by calling this function.
struct rtld_global _rtld_global =
{
/* Default presumption without further information is executable stack. */
+#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
+ /* Default to no-exec stack on PPC64. */
+ ._dl_stack_flags = PF_R|PF_W,
+#else
._dl_stack_flags = PF_R|PF_W|PF_X,
+#endif
#ifdef _LIBC_REENTRANT
._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER
#endif