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 Mon, Jan 17, 2005 at 02:52:03PM -0800, Geoffrey Keating wrote:
> Marc Espie <espie@nerim.net> writes:
> 
> > Does anyone have basic code that can relocate pre-compiled headers ?
> 
> Nope.  But if you write some, please share it.

No, I'm going to keep it for myself. MINE, ALL MINE, (evil cackle).
... Sorry. Happens from time to time. 

;-)
Of course I'm going to share it, if I manage to write it. I'm not that
familiar with ggc, which is probably not the simplest part of gcc.

> What I was planning to do was to simply have a list, at the end of the
> 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.

> That just leaves the question of how to generate the list of pointer
> offsets at PCH save time, which I would do using the existing
> GC-walking machinery.


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