pa.c (pa_trampoline_init): Emit __enable_execute_stack libcall if HAVE_ENABLE_EXECUTE...
authorMark Kettenis <kettenis@openbsd.org>
Thu, 25 Jul 2013 15:53:51 +0000 (15:53 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Thu, 25 Jul 2013 15:53:51 +0000 (15:53 +0000)
* config/pa/pa.c (pa_trampoline_init): Emit __enable_execute_stack
libcall if HAVE_ENABLE_EXECUTE_STACK is defined.

From-SVN: r201248

gcc/ChangeLog
gcc/config/pa/pa.c

index 5c911cd0c62bce8d2e93be03f44adc33c2b3d129..43d9812c98d5afcdfa0ae99bdcdce105bf738b21 100644 (file)
@@ -1,5 +1,8 @@
 2013-07-25  Mark Kettenis  <kettenis@openbsd.org>
 
+       * config/pa/pa.c (pa_trampoline_init): Emit __enable_execute_stack
+       libcall if HAVE_ENABLE_EXECUTE_STACK is defined.
+
        * config.gcc (hppa-*-openbsd*): Don't set tmake_file.
 
 2013-07-25  Vladimir Makarov  <vmakarov@redhat.com>
index 0167a5d7109b59b0f4d2ba33ec8c683d6c25495f..74a99e36a01da98d6a864b70921ed60b19077377 100644 (file)
@@ -10133,6 +10133,11 @@ pa_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
                                    gen_reg_rtx (Pmode),
                                    gen_reg_rtx (Pmode)));
     }
+
+#ifdef HAVE_ENABLE_EXECUTE_STACK
+  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
+                    LCT_NORMAL, VOIDmode, 1, XEXP (m_tramp, 0), Pmode);
+#endif
 }
 
 /* Perform any machine-specific adjustment in the address of the trampoline.