This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: GP Question
Date: Wed, 9 Jun 1999 16:31:37 -0700
From: Richard Henderson <rth@cygnus.com>
> Certainly the linker script should be able to control the GP value,
> for complex situations.
I can't think of any sufficiently complex situation that requires
the user to be able to control the exact _gp address. Either
there exists a 64k span that covers all GPREL sections or not.
What else is there?
For example, for embedded systems, there is code which loads in
overlays. This is often done using separate links for the main
program and the overlays and controlling the load addresses
appropriately. It is desirable to force a particular GP value when
linking, to avoid requiring changing the GP register when branching in
and out of the overlay code.
Ian