This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: linker problem: relocation truncated to fit
In article <20010918010107.G2189@sunsite.ms.mff.cuni.cz> you write:
>On Mon, Sep 17, 2001 at 03:53:25PM -0700, H . J . Lu wrote:
>> Can you mix object files compiled with -fPIC/-fpic on Sparc/Alpha?
>
>At least on the Sparc, you can mix them as you want, if you don't
>overflow the signed 13bit relocs in -fpic objects. The linker will tell
>you...
Depends on sparc linkers. Historically, some older linkers don't allow the
mix. This is usually easy to fix. The next step would be to try and reorder
relocations so that the -fpic stuff is nearer the GOT. Then the -fPIC stuff
can overflow without harming the -fpic part.
Of course, I haven't checked the gnu linker recently. Maybe it already
implements that ?