Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: martin.nichols@oxinst.co.uk
Cc: linux-mips@linux-mips.org
Subject: Re: Link errors
Date: Mon, 19 Jul 2004 09:43:47 -0700	[thread overview]
Message-ID: <40FBFA43.4080305@avtrex.com> (raw)
In-Reply-To: <DEF431FFDB15C1488464F0E57D5506642AA539@MEDNT02>

martin.nichols@oxinst.co.uk wrote:
> Hi All,
> 
> I'm new to MIPs architecture and Linux so apologies in advance!
> 
> I'm trying to build an application to run on the Au1100.
> I have a crosscompiler setup (gcc 3.2) and can build a 'hello world' that
> runs on the target.
> When I try building a more serious application using Kdevelop - with the
> appropriate settings
> for the crosstools - I get lots of errors like this:
> assert.o(.text+0x1cc): relocation truncated to fit: R_MIPS_GOT16
> __assert_program_name
> /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown
> -linux-gnu/lib/libc.a(dcigettext.o): In function `_nl_find_msg':
> dcigettext.o(.text+0x153c): relocation truncated to fit: R_MIPS_CALL16
> _nl_load_domain
> /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/mipsel-unknown
> -linux-gnu/lib/libc.a(finddomain.o): In function `_nl_find_domain':
> 
> Could someone tell me what I'm doing wrong please.
> 
This is the got overflow problem.

Later versions of binutils have multi-got support (2.15 for example),
which under most circumstances will fix the problem.

If you have extreamly large compilation units you might have to use a
32bit got index.  In GCC3.4 and later this is done with the -mxgot
option.  With eariler versions of GCC you have to pass -xgot to the
assembler (-Wa,-xgot IIRC).

David Daney.

  reply	other threads:[~2004-07-19 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-19 15:48 Link errors martin.nichols
2004-07-19 16:43 ` David Daney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-07-20 14:47 martin.nichols

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=40FBFA43.4080305@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=linux-mips@linux-mips.org \
    --cc=martin.nichols@oxinst.co.uk \
    /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