This is the mail archive of the gcc@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: PCH relocation ?


On Tue, 18 Jan 2005 11:39:16 -0800, Mark Mitchell <mark@codesourcery.com> wrote:
> Marc Espie wrote:
> 
> >>PCH file, of offsets of pointers in the PCH file.  Then the relocation
> >>would be as easy as running along the list and adding the difference between
> >>the actual load address and the original expected load address.
> >
> > Now, that's a very good idea. Beats reverse-engineering the file.
> 
> I've seen a design in which the PCH gets mapped back in, and then the
> same machinery that was used to map it out walks over it, adding the
> appropriate offset to all pointers it finds.  That's nice in that no
> on-the-side list is required.

And to get the benefit of not paging in all the PCH at start you do this
per page using appropriate page protection and signal handlers?  Maybe
it's worth it - if even possible with the "machinery".

Richard.


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