dynamically written code problem

Paolo Bonzini paolo.bonzini@polimi.it
Mon Oct 11 08:05:00 GMT 2004


> 2) doing mmap (..., | PROT_EXEC, ...) is preferrable to allocating elsewhere
>    and then mprotecting when using exec-shield - otherwise you lose
>    execute protection for too many pages where it is not desirable

I don't have an exec-shield system, so I didn't research much on this. 
But on my system, mmap is allocating in the 0x40000000 range, and malloc 
is allocating at the brk (around 0x08000000).  Is this different when 
exec-shield is activated?

Paolo



More information about the Gcc mailing list