From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18725 invoked by alias); 28 Jun 2006 15:51:16 -0000 Received: (qmail 18703 invoked by uid 22791); 28 Jun 2006 15:51:14 -0000 X-Spam-Check-By: sourceware.org Received: from adsl-67-116-42-147.dsl.sntc01.pacbell.net (HELO avtrex.com) (67.116.42.147) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 28 Jun 2006 15:51:10 +0000 Received: from [192.168.7.26] ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 28 Jun 2006 08:51:09 -0700 Message-ID: <44A2A56C.2090307@avtrex.com> Date: Wed, 28 Jun 2006 17:09:00 -0000 From: David Daney User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) MIME-Version: 1.0 To: ligang@sunnorth.com.cn CC: binutils@sourceware.org Subject: Re: mips multi-got error References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00418.txt.bz2 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.