PCH and exec-shield...

Mark Mitchell mark@codesourcery.com
Mon Mar 8 21:04:00 GMT 2004


Ian Lance Taylor wrote:

>law@redhat.com writes:
>
>  
>
>>Alternately, I believe we could have the build process mark cc1plus and
>>friends as not needing/wanting the exec-shield functionality.  IIRC there
>>is a program you can run which twiddles bits in the ELF headers/sections
>>which allow you to control exec-shield on a per-binary basis.
>>    
>>
>
>Not to get too far out, but is there any way that PCH could work even
>when exec-shield is enabled?
>  
>
Geoff has already given you the current, platform-specific, approach.

There is a more general approach used by other PCH implementations which 
involves walking the loaded PCH and swizzling pointers.  That would be a 
superior approach as it would make PCH more robust on all platforms, and 
would permit people to use exec-shield randomization (and similar 
features on other operating systems) with PCH.

Until that is implemented, many people will probably complain that PCH 
is broken.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com



More information about the Gcc mailing list