From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110578 invoked by alias); 1 Sep 2015 04:52:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 110523 invoked by uid 48); 1 Sep 2015 04:52:44 -0000 From: "amodra at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67417] New: powerpc64 bootstrap with -mcmodel=small results in linker error Date: Tue, 01 Sep 2015 04:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amodra at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg00003.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67417 Bug ID: 67417 Summary: powerpc64 bootstrap with -mcmodel=small results in linker error Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: amodra at gmail dot com Target Milestone: --- To test recent powerpc64 linker changes I attempted to bootstrap gcc-5 with -mcmodel=small, and ran into /home/amodra/gnu/powerpc64-linux/bin/ld: libbackend.a(sel-sched-ir.o): In function `loop_iterator::loop_iterator(loop**, unsigned int)': sel-sched-ir.c:(.text+0x116f0): call to `loop_iterator::loop_iterator(loop**, unsigned int)' lacks nop, can't restore toc; (-mcmodel=small toc adjust stub) On investigating, I see there really isn't a nop, and the call is to a group with a different toc pointer. This despite the destination being defined in the same file. However, it is weak and there's another definition. nm -o gcc/*.o | grep _ZN13loop_iteratorC1EPP4loopj gcc/ipa-inline-analysis.o:0000000000000420 W _ZN13loop_iteratorC1EPP4loopj gcc/sel-sched-ir.o:00000000000013e0 W _ZN13loop_iteratorC1EPP4loopj