This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: trampolines: __disable_execute_stack ?
- From: Robert Dewar <dewar at adacore dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: espie at nerim dot net, gcc at gcc dot gnu dot org
- Date: Tue, 18 Jan 2005 15:47:49 -0500
- Subject: Re: trampolines: __disable_execute_stack ?
- References: <20050118112146.GA3526@tetto.home> <878y6q7fnr.fsf@codesourcery.com>
Zack Weinberg wrote:
I wouldn't be surprised if that was just as fast or faster than
calling mprotect() twice per trampoline.
I would guess that the overhead would be intolerable in either case.
For GNAT, we really want to get rid of the trampolines entirely. There
is no reason for us to restrict pointer-to-procedure types to be a
single word (strictly speaking I don't think there is a requirement
for this in C, though in practice, you lose a lot of you stray from
the single pointer model).
It's not an easy change, but trampolines have terrible overhead even
without introducing either of the above, and they are used much
more often in Ada code than in C code for obvious reasons.