This is the mail archive of the
mailing list for the GCC project.
Re: PCH relocation ?
- From: Marc Espie <espie at nerim dot net>
- To: Geoffrey Keating <geoffk at geoffk dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 18 Jan 2005 00:24:13 +0100
- Subject: Re: PCH relocation ?
- References: <20050117215824.GA17231@tetto.home> <email@example.com>
- Reply-to: espie at nerim dot net
On Mon, Jan 17, 2005 at 02:52:03PM -0800, Geoffrey Keating wrote:
> Marc Espie <firstname.lastname@example.org> 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.