From e7a742ec9624db7b29d824a7b9899b73554322e3 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 17 Jul 2004 23:09:14 +0200 Subject: libgcc2.c (__enable_execute_stack): New symbol. * libgcc2.c (__enable_execute_stack): New symbol. * libgcc-std.ver (GCC_3.4.2): New version. Inherit from GCC_3.4 and declare __enable_execute_stack. * mklibgcc.in (lib2funcs): Add _enable_execute_stack. * config/netbsd.h (NETBSD_ENABLE_EXECUTE_STACK): ANSIfy. * config/sol2.h (TRANSFER_FROM_TRAMPOLINE): Rename into ENABLE_EXECUTE_STACK. * config/alpha/alpha.c (alpha_initialize_trampoline): Conditionalize on ENABLE_EXECUTE_STACK instead of TRANSFER_FROM_TRAMPOLINE. * config/alpha/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Rename into ENABLE_EXECUTE_STACK. * config/alpha/osf.h (TRANSFER_FROM_TRAMPOLINE): Likewise. * config/i386/i386.c (x86_initialize_trampoline): Conditionalize on ENABLE_EXECUTE_STACK instead of TRANSFER_FROM_TRAMPOLINE. * config/i386/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Rename into ENABLE_EXECUTE_STACK. * config/i386/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Likewise. * config/i386/netbsd64.h (TRANSFER_FROM_TRAMPOLINE): Likewise. * config/sparc/freebsd.h (TRANSFER_FROM_TRAMPOLINE): Likewise. * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Likewise. * config/sparc/sparc.c (sparc_initialize_trampoline): Conditionalize on ENABLE_EXECUTE_STACK instead of TRANSFER_FROM_TRAMPOLINE. (sparc64_initialize_trampoline): Likewise. * doc/tm.texi (trampolines): Add ENABLE_EXECUTE_STACK macro. From-SVN: r84880 --- gcc/doc/tm.texi | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index ca5c995..c7aade3 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -4694,6 +4694,19 @@ typically be a series of @code{asm} statements. Both @var{beg} and @var{end} are both pointer expressions. @end defmac +The operating system may also require the stack to be made executable +before calling the trampoline. To implement this requirement, define +the following macro. + +@defmac ENABLE_EXECUTE_STACK +Define this macro if certain operations must be performed before executing +code located on the stack. The macro should expand to a series of C +file-scope constructs (e.g. functions) and provide a unique entry point +named @code{__enable_execute_stack}. The target is responsible for +emitting calls to the entry point in the code, for example from the +@code{INITIALIZE_TRAMPOLINE} macro. +@end defmac + To use a standard subroutine, define the following macro. In addition, you must make sure that the instructions in a trampoline fill an entire cache line with identical instructions, or else ensure that the -- cgit v1.1