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 ?


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.


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