This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: trampolines: __disable_execute_stack ?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]