This is the mail archive of the gcc-bugs@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]

[Bug target/14206] Mention that exec-shield (linux) conflicts with PCH


------- Additional Comments From geoffk at geoffk dot org  2004-02-19 21:45 -------
Subject: Re:  Mention that exec-shield (linux) conflicts with PCH

"aoliva at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> ------- Additional Comments From aoliva at gcc dot gnu dot org  2004-02-19 05:46 -------
> FWIW, the conflict is not with exec-shield per se, but rather with
> exec-shield-randomize, the feature that gets the kernel to randomize memory
> mappings.  It turns out that the PCH mechanism was built upon the mis-assumption
> that memory maps are invariant.  I'd rather qualify this as a bug in the PCH
> implementation.

The host is supposed to ensure that the memory region it chooses will
be available in future invocations of the compiler; there's a host
hook so it can communicate the region it chose to the PCH machinery.
However, the hook is not implemented for linux, because no-one has
stepped forward to do it, so the PCH machinery falls back to a
heuristic that works on many systems (but apparantly not on linux if
exec-shield-randomize is switched on).

Alternatively, the PCH implementation was designed to allow PCH files
to be relocated.  However, this support was never implemented, because
(a) no interesting host seemed to need it, (b) relocation would be
very expensive, so it's usually worthwhile to put a bit of effort into
ensuring that relocation is not needed, and (c) in practise it turns
out that avoiding the need for relocation is easier than implementing
relocation.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14206


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