summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-10-28 03:30:32 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-10-28 03:30:32 +0000
commita49af505567f853bccdbf75bd8daac87f5250df4 (patch)
treed9c8fb21f861ca8e8d9de478adfb99ddf32aa75a /gnu/usr.bin/gcc
parent8e05428e7f06f5c294b5dd36ac0f8ecd845fd704 (diff)
Make stack executable when doing trampolines on macppc
Okay espie@, kettenis@
Diffstat (limited to 'gnu/usr.bin/gcc')
-rw-r--r--gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h3
-rw-r--r--gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h b/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
index 17cb85e46bd..25e92a18bec 100644
--- a/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
+++ b/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
@@ -127,3 +127,6 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
+#undef TRAMPOLINE_SIZE
+#define TRAMPOLINE_SIZE 40
+
diff --git a/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c b/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c
index 0ba733942fa..991b81e1848 100644
--- a/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c
+++ b/gnu/usr.bin/gcc/gcc/config/rs6000/rs6000.c
@@ -12510,6 +12510,13 @@ rs6000_initialize_trampoline (addr, fnaddr, cxt)
break;
}
+ /* Call __enable_execute_stack after writing onto the stack to make sure
+ the stack address is accessible. */
+#ifdef TRANSFER_FROM_TRAMPOLINE
+ emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
+ LCT_NORMAL, VOIDmode, 1, addr, Pmode);
+#endif
+
return;
}