This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Load-time relocation of Code
- From: Ian Lance Taylor <iant at google dot com>
- To: u0606029 <surajraghavendran at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 27 Mar 2009 09:33:08 -0700
- Subject: Re: Load-time relocation of Code
- References: <22736473.post@talk.nabble.com>
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