Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Nigel Stephens <nigel@mips.com>
To: zhuzhenhua <zzh.hust@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: "relocation truncated to fit: R_MIPS_CALL16"
Date: Mon, 24 Apr 2006 09:45:35 +0100	[thread overview]
Message-ID: <444C902F.2050402@mips.com> (raw)
In-Reply-To: <50c9a2250604222002x37b949fbi585ed5fb31087d5@mail.gmail.com>



zhuzhenhua wrote:
> i want to write a mini bootloader for my board, so i need jump to c
> code from asm code
> but when i compile and ld, i get "relocation truncated to fit:
> R_MIPS_CALL16" messages for every function call..
> i have try the mips_4KCle-gcc(worked for u-boot),
> mips_fp_le-gcc(worked for mvita linux), and also a
> mipsel-linux-gcc(worked for my linux 2.6 kernel), but they all failed,
> even i add -G0 to gcc.
> and i only compile success by using mips-elf-gcc under cygwin.
> does it be caused by binutils version? or gcc compile CFLAGS?
> thanks for any hints
>   

This is probably because the mips-linux configuration of gcc is 
generating position-independent code by default, whereas the mips-elf 
version doesn't.

Try adding the options "-mno-abicalls -fno-pic" to your mips-liinux-gcc 
options.

HTH

Nigel

  parent reply	other threads:[~2006-04-24  8:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-23  3:02 "relocation truncated to fit: R_MIPS_CALL16" zhuzhenhua
2006-04-24  8:36 ` Niklaus
2006-04-24  8:45 ` Nigel Stephens [this message]
2006-04-24 10:09 ` 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=444C902F.2050402@mips.com \
    --to=nigel@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=zzh.hust@gmail.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