This is the mail archive of the
mailing list for the GCC project.
Re: trampolines: __disable_execute_stack ?
On Tue, Jan 18, 2005 at 09:39:18PM +0100, Marc Espie wrote:
> `Normal' code can be audited for mprotect calls, but trampoline
> stuff happens `behind the scene' so to speak...
Given a sufficiently current toolchain, the auditing can happen
via looking for PT_GNU_STACK headers with the execute bit set.
It might be worth your while to modify the kernel and ld.so to
honor that header rather than using an __enable_execute_stack
call at runtime. This isolates the places in which stack
execution is enabled, and forces the application to advertize
its need for an executable stack.