aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/alpha/osf.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-06-30 20:56:35 -0700
committerRichard Henderson <rth@gcc.gnu.org>1998-06-30 20:56:35 -0700
commitc714f03d304611def7fd70e3b623e1969d8ac947 (patch)
tree593c483d2d5c85a0bb76c9322f19bc0ad855aebb /gcc/config/alpha/osf.h
parent03369c9399903579d7a4a6366fea699a06b4ee41 (diff)
downloadgcc-c714f03d304611def7fd70e3b623e1969d8ac947.zip
gcc-c714f03d304611def7fd70e3b623e1969d8ac947.tar.gz
gcc-c714f03d304611def7fd70e3b623e1969d8ac947.tar.bz2
alpha.c (alpha_initialize_trampoline): Take arguments describing the layout.
* alpha.c (alpha_initialize_trampoline): Take arguments describing the layout. Use ptr_mode. Disable hint generation. Use gen_imb. * alpha.h (INITIALIZE_TRAMPOLINE): Pass extra args to the init func. (TRANSFER_FROM_TRAMPOLINE): Move ... * alpha/osf.h: ... here. * alpha/vms.h (INITIALIZE_TRAMPOLINE): Use alpha_initialize_trampoline. (TRANSFER_FROM_TRAMPOLINE): Remove undef. * alpha/win-nt.h: Likewise. * alpha/vxworks.h: Likewise. * alpha/linux.h: Revert gcc2 merge lossage. From-SVN: r20864
Diffstat (limited to 'gcc/config/alpha/osf.h')
-rw-r--r--gcc/config/alpha/osf.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/alpha/osf.h b/gcc/config/alpha/osf.h
index 0af169c..1e8e505 100644
--- a/gcc/config/alpha/osf.h
+++ b/gcc/config/alpha/osf.h
@@ -108,3 +108,20 @@ Boston, MA 02111-1307, USA. */
#ifndef CROSS_COMPILE
#define HAVE_STAMP_H 1
#endif
+
+/* Attempt to turn on access permissions for the stack. */
+
+#define TRANSFER_FROM_TRAMPOLINE \
+void \
+__enable_execute_stack (addr) \
+ void *addr; \
+{ \
+ long size = getpagesize (); \
+ long mask = ~(size-1); \
+ char *page = (char *) (((long) addr) & mask); \
+ char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \
+ \
+ /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \
+ if (mprotect (page, end - page, 7) < 0) \
+ perror ("mprotect of trampoline code"); \
+}