trampolines: __disable_execute_stack ?

Robert Dewar dewar@adacore.com
Tue Jan 18 21:35:00 GMT 2005


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.



More information about the Gcc mailing list