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 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.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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