This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PCH relocation ?
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: espie at nerim dot net
- Cc: gcc at gcc dot gnu dot org
- Date: 17 Jan 2005 14:52:03 -0800
- Subject: Re: PCH relocation ?
- References: <20050117215824.GA17231@tetto.home>
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.
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.
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.