about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/stackinfo.h8
-rw-r--r--sysdeps/ia64/stackinfo.h8
-rw-r--r--sysdeps/powerpc/stackinfo.h13
-rw-r--r--sysdeps/s390/stackinfo.h8
-rw-r--r--sysdeps/sh/stackinfo.h8
-rw-r--r--sysdeps/sparc/stackinfo.h8
-rw-r--r--sysdeps/x86_64/stackinfo.h8
7 files changed, 54 insertions, 7 deletions
diff --git a/sysdeps/i386/stackinfo.h b/sysdeps/i386/stackinfo.h
index 2530ea7234..166c1d14ae 100644
--- a/sysdeps/i386/stackinfo.h
+++ b/sysdeps/i386/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,15 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On x86 the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 /* Access to the stack pointer.  The macros are used in alloca_account
    for which they need to act as barriers as well, hence the additional
    (unnecessary) parameters.  */
diff --git a/sysdeps/ia64/stackinfo.h b/sysdeps/ia64/stackinfo.h
index b7dc5d91dd..a7446e665d 100644
--- a/sysdeps/ia64/stackinfo.h
+++ b/sysdeps/ia64/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,14 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On IA-64 the stack grows down.  The register stack is of no concern
    here.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 #endif	/* stackinfo.h */
diff --git a/sysdeps/powerpc/stackinfo.h b/sysdeps/powerpc/stackinfo.h
index 839758a4e3..aac86a48a2 100644
--- a/sysdeps/powerpc/stackinfo.h
+++ b/sysdeps/powerpc/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,18 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On PPC the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+#if __WORDSIZE == 64
+/* PPC64 doesn't need an executable stack and doesn't need PT_GNU_STACK
+ * to make the stack nonexecutable.  */
+# define DEFAULT_STACK_PERMS (PF_R|PF_W)
+#else
+/* PF_X can be overridden if PT_GNU_STACK is present but is presumed absent.  */
+# define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+#endif
+
 #endif	/* stackinfo.h */
diff --git a/sysdeps/s390/stackinfo.h b/sysdeps/s390/stackinfo.h
index 7e09c85b9b..058dff6bad 100644
--- a/sysdeps/s390/stackinfo.h
+++ b/sysdeps/s390/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,13 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On s390 the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 #endif	/* stackinfo.h */
diff --git a/sysdeps/sh/stackinfo.h b/sysdeps/sh/stackinfo.h
index e65338f256..f1c0977457 100644
--- a/sysdeps/sh/stackinfo.h
+++ b/sysdeps/sh/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,13 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On SH the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 #endif	/* stackinfo.h */
diff --git a/sysdeps/sparc/stackinfo.h b/sysdeps/sparc/stackinfo.h
index fd34e2deb0..189e4b6fa1 100644
--- a/sysdeps/sparc/stackinfo.h
+++ b/sysdeps/sparc/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,13 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On sparc the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 #endif	/* stackinfo.h */
diff --git a/sysdeps/x86_64/stackinfo.h b/sysdeps/x86_64/stackinfo.h
index b11849d9ab..d4fc25f457 100644
--- a/sysdeps/x86_64/stackinfo.h
+++ b/sysdeps/x86_64/stackinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,15 @@
 #ifndef _STACKINFO_H
 #define _STACKINFO_H	1
 
+#include <elf.h>
+
 /* On x86_64 the stack grows down.  */
 #define _STACK_GROWS_DOWN	1
 
+/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent.  */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
 /* Access to the stack pointer.  The macros are used in alloca_account
    for which they need to act as barriers as well, hence the additional
    (unnecessary) parameters.  */