This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PCH and exec-shield...
- From: Mike Stump <mrs at apple dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Ian Lance Taylor <ian at wasabisystems dot com>, law at redhat dot com, Eric Christopher <echristo at redhat dot com>, David Daney <ddaney at avtrex dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 15 Mar 2004 19:36:53 -0800
- Subject: Re: PCH and exec-shield...
On Monday, March 8, 2004, at 01:04 PM, Mark Mitchell wrote:
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.
Using a feature that serves no purpose other than to slow down
compilations can reasonably be considered a bug. By having PCH swizzle
on load, we permit the introductions of bugs into the compiler. This
is bad. This is why it hasn't been done.
For robustness we should fall back to the normal .h file and pretend
the PCH file doesn't exist. I think we might just give a sorry now,
that might be wrong.
We may one day have a reason to swizzle on load, but I don't think
we've found it yet.