linux-mips
[Top] [All Lists]

Re: linker problem: relocation truncated to fit

To: linux-mips@oss.sgi.com
Subject: Re: linker problem: relocation truncated to fit
From: Ryan Murray <rmurray@cyberhqz.com>
Date: Sun, 16 Sep 2001 15:38:57 -0700
In-reply-to: <20010917000719.B25531@false.linpro.no>; from pere@hungry.com on Mon, Sep 17, 2001 at 12:07:19AM +0200
References: <20010916091654.C1812@lucon.org> <Pine.BSO.4.33.0109161323280.14503-100000@oddbox.cn> <20010917000719.B25531@false.linpro.no>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.3.17i
On Mon, Sep 17, 2001 at 12:07:19AM +0200, Petter Reinholdtsen wrote:
> [Wilbern Cobb]
> > This is a `feature' of the MIPS toolchain. Global and static items <= n
> > bytes are placed into the small data or small bss sections instead of
> > the normal data or bss sections as an optimization. Excess items would
> > cause these linker errors.
> > 
> > Pass the compiler the -Gn flag (default is 8 bytes), ie. -G4 should work
> > for most purposes.
> 
> I tried -G4, -G2 and -G1 without any luck.  Even with -G1 there are still

I don't think -G is the problem here.  The problem is that the GOT
needs to be bigger than a 16 bit value.  The only way to do this is to
recompile everything that is going to be linked in statically
(libc_noshared.a and libgcc.a included) with -Wa,-xgot This problem
currently affects openh323 and mozilla, among other things.

-- 
Ryan Murray, Debian Developer (rmurray@cyberhqz.com, rmurray@debian.org)
The opinions expressed here are my own.

Attachment: pgpWYuubOS6x_.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>