This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about trampolines
- From: Daniel Jacobowitz <drow at false dot org>
- To: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 13 Mar 2005 15:26:54 -0500
- Subject: Re: Questions about trampolines
- References: <1110745459.14219.83.camel@localhost.localdomain>
On Sun, Mar 13, 2005 at 09:24:19PM +0100, Øyvind Harboe wrote:
> Trampolines are strange things... :-)
>
> - Are nested functions part of the C standard or a GCC extension?
> I believe the answer is a GCC extension. I have seen evidence,
> but no proof to this effect.
That is right.
> - AFAICT, the cris target is saving the value of the
> static chain register in the trampoline. How can that work
> with recursive functions? Does the cris target PASS or FAIL
> gcc.dg/trampoline-1.c?
> - Lately e.g. the AMD CPU has added support for making it impossible
> to execute code on the stack. The town isn't big enough for
> both stack based trampolines and stack code execution protection.
> What happens now?
Search for PT_GNU_STACK in the list archives.
> - Are trampolines used for anything else but nested functions
> in C? I believe they are used by Ada.
Nested functions in other languages, presumably.
> - Many backends do not support trampolines. Are trampolines
> something that is ultimately being added to the backends?
> - Do (theoretical?) alternatives to trampolines exist? I.e. something
> that does not generate code runtime.
--
Daniel Jacobowitz
CodeSourcery, LLC