From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107368 invoked by alias); 2 Mar 2015 08:50:17 -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 107316 invoked by uid 48); 2 Mar 2015 08:50:13 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/65252] Link time optimization breaks use of filenames in linker scripts Date: Mon, 02 Mar 2015 08:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED 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_status cc resolution Message-ID: In-Reply-To: References: 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-03/txt/msg00094.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65252 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |hubicka at gcc dot gnu.org Resolution|--- |WONTFIX --- Comment #3 from Richard Biener --- LTO doesn't know about linker scripts and their effects (see other related bugreports). For your case LTO partitioning might simply tear boot.o and early.o apart and put parts in differen LTRANS units. I don't see any way to fix this but to teach WPA to parse linker scripts and guide partitioning. That means basically a WONTFIX with the known workaround to compile boot.o and early.o without -flto. Another workaround that might work is to use -flto-partition=1to1 (but the filenames will still get wrong I think).