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

Re: PR/15448: add a compiler timestamp to PCH files


Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> writes:

> On Wed, 2005-02-16 at 20:12 -0500, Ian Lance Taylor wrote:
> > Paolo Bonzini <paolo.bonzini@lu.unisi.ch> writes:
> 
> > I think it would be simpler and more efficient to pick a set of
> > relevant compiler global variables and functions and hash their
> > addresses together.  If those are well chosen, it will be very
> > unlikely to generate a PCH with same hash code that will not work.
> 
> But wouldn't this fail with Position Independent Executable ? At least,
> differences of adresses must be used, and I do not even know whether
> this would be sufficient...
> 
> Then, of course, PCH is not currently working with PIE....

I don't see how the current PCH implementation could work with PIE, so
I don't think this matters.  If somebody fixes PCH to work with PIE,
then it should be straightforward to extend that fix to improve this
algorithm for detecting an incompatible compiler version.

Ian


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