From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17174 invoked by alias); 21 Dec 2012 14:47:22 -0000 Received: (qmail 17165 invoked by uid 22791); 21 Dec 2012 14:47:21 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_05,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Dec 2012 14:47:10 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBLEl9fs003259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Dec 2012 09:47:09 -0500 Received: from zebedee.pink (ovpn-113-94.phx2.redhat.com [10.3.113.94]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBLEl7Dt029767; Fri, 21 Dec 2012 09:47:08 -0500 Message-ID: <50D4766B.7030804@redhat.com> Date: Fri, 21 Dec 2012 14:47:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: "Mark Galeck (CW)" CC: Jonathan Wakely , "gcc-help@gcc.gnu.org" Subject: Re: why is g++ relocation error linking only showing when listing objects explicitly? References: <1355719810.9320.ezmlm@gcc.gnu.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00121.txt.bz2 On 12/21/2012 02:36 PM, Mark Galeck (CW) wrote: >> How do I turn the foobar.a into the foobar.so ??? > > > OK, I got it > >> g++ -Wl,--whole-archive foobar.a -o foobar.so > > > > Except... of course, again I get > > relocation truncated to fit: R_PPC_PLTREL24 against symbol... > > BACK TO SQUARE ONE > > > yes foobar.a is 140MB. What to do?? I presume you're using "-mlongcall" everywhere. We need to see the symbol and the place it's used. You'll need to use objdump --reloc. Andrew.