public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: ligang@sunnorth.com.cn
Cc: binutils@sourceware.org
Subject: Re: mips multi-got error
Date: Wed, 28 Jun 2006 17:09:00 -0000	[thread overview]
Message-ID: <44A2A56C.2090307@avtrex.com> (raw)
In-Reply-To: <OF29091AE6.0760DEBD-ON4825719B.00339737-4825719B.00349078@sunnorth.com.cn>

ligang@sunnorth.com.cn wrote:
> 
> 
> 
> Hi all,
> 
> I am using mips ld to generate multi-got, but, it seems that ld can not
> generate multi-got for ld
> print a serial of "truncate..." error message. Is it a bug? or, is my usage
> not correct?
> 
> as command line is : ./mips-linux-elf-as multi-got.s -KPIC -o multi-got.o
> ld command line is : ./mips-linux-elf-ld multi-got.o
> 
> The test case is as follows:
> ===================================
> .macro  one_sym count
>         .globl  sym_1_\count
> sym_1_\count:
>         la      $2, sym_1_\count
>         .endm
> 
>         .text
>         .globl  func1
>         .ent    func1
> func1:
>         .frame  $sp,0,$31
>         .set noreorder
>         .cpload $25
>         .set reorder
>         .cprestore 8
>         .set noreorder
> 
>         .irp    milo,0,1
>         .irp    thou,0,1,2,3,4,5,6,7,8
>         .irp    hund,0,1,2,3,4,5,6,7,8,9
>         .irp    tens,0,1,2,3,4,5,6,7,8,9
>         .irp    ones,0,1,2,3,4,5,6,7,8,9
>         one_sym \milo\thou\hund\tens\ones
>         .endr
>         .endr
>         .endr
>         .endr
>         .endr
>         .end    func1
> =================================
> 
> 
> Best regards
>                      Ligang
> 

That is not supposed to work.  Multi-got linking only works if there are 
fewer than 8192 symbols per compilation unit (input .o to the linker). 
See the multi-got-1 testcase in ld/testsuite/ld-mips-elf.

If you need more than 8192 symbols per compilation unit you must use 
-xgot for the assembler.  Recent GCC versions have a -mxgot option that 
does the same thing for GCC.

David Daney.

  reply	other threads:[~2006-06-28 15:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 11:32 ligang
2006-06-28 17:09 ` David Daney [this message]
2006-06-28 17:30   ` Thiemo Seufer
2006-06-28 18:45     ` David Daney
2006-06-30 13:35       ` Thiemo Seufer
2006-07-05  7:52         ` Richard Sandiford

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=44A2A56C.2090307@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=binutils@sourceware.org \
    --cc=ligang@sunnorth.com.cn \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).