Load-time relocation of Code

Ian Lance Taylor iant@google.com
Fri Mar 27 16:33:00 GMT 2009


u0606029 <surajraghavendran@gmail.com> writes:

> I am working on a TriCore/ T-Kernel based environment and I need to perform
> load time relocation. Currently, the environment does not support
> relocation, but supports Position independent code. What I want to achieve
> is, loading an application in any desired address space, although at Link
> time, an address space may have been allocated.
>
> How do I go about this? Is it enough if I change all section addresses,
> symbol table entries and got entries?

There are many possible approaches.  If the code is truly position
independent, though, then it should be very easy.  Just load it where
you want it to run.  The details of that are going to involve your
loader, which we know nothing about.

Ian



More information about the Gcc-help mailing list