Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "H . J . Lu" <hjl@lucon.org>
To: Ryan Murray <rmurray@cyberhqz.com>
Cc: linux-mips@oss.sgi.com, binutils@sourceware.cygnus.com, gcc@gcc.gnu.org
Subject: Re: linker problem: relocation truncated to fit
Date: Sun, 16 Sep 2001 15:50:03 -0700	[thread overview]
Message-ID: <20010916155003.B1446@lucon.org> (raw)
In-Reply-To: <20010916153857.H22750@cyberhqz.com>; from rmurray@cyberhqz.com on Sun, Sep 16, 2001 at 03:38:57PM -0700

On Sun, Sep 16, 2001 at 03:38:57PM -0700, Ryan Murray wrote:
> 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.
> 

I don't think mips is the only platform which has this problem. Do
Alpha, PowerPC and Sparc have similar problems like that? What are
the solutions for them?

BTW, it sounds like the -fpic vs. -fPIC issue. 


H.J.

  reply	other threads:[~2001-09-16 22:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-16 12:17 linker problem: relocation truncated to fit Petter Reinholdtsen
2001-09-16 16:16 ` H . J . Lu
2001-09-16 16:29   ` Wilbern Cobb
2001-09-16 16:29     ` Wilbern Cobb
2001-09-16 22:07     ` Petter Reinholdtsen
2001-09-16 22:38       ` Ryan Murray
2001-09-16 22:50         ` H . J . Lu [this message]
2001-09-17  1:55           ` Ralf Baechle
2001-09-17 22:40             ` Richard Henderson
2001-09-17 22:53               ` H . J . Lu
2001-09-17 22:56                 ` Richard Henderson
2001-09-17 23:06                   ` H . J . Lu
2001-09-17 23:01                 ` Jakub Jelinek
2001-09-17 22:47           ` Richard Henderson
2001-09-17 22:56             ` Jakub Jelinek
2001-09-20 22:52             ` Geoff Keating
2001-09-26 10:08           ` Erik Corry
2001-09-16 22:50       ` Wilbern Cobb
2001-09-16 22:50         ` Wilbern Cobb
2001-09-17  1:50     ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010916155003.B1446@lucon.org \
    --to=hjl@lucon.org \
    --cc=binutils@sourceware.cygnus.com \
    --cc=gcc@gcc.gnu.org \
    --cc=linux-mips@oss.sgi.com \
    --cc=rmurray@cyberhqz.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox