From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27908 invoked by alias); 13 Mar 2011 20:55:18 -0000 Received: (qmail 27898 invoked by uid 22791); 13 Mar 2011 20:55:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sun, 13 Mar 2011 20:55:13 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 9732CB2DE2; Sun, 13 Mar 2011 16:55:11 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id p2DKtBbD013981; Sun, 13 Mar 2011 16:55:11 -0400 Date: Sun, 13 Mar 2011 20:55:00 -0000 From: Jack Howarth To: Steven Bosscher Cc: Chris Lattner , GCC Mailing List Subject: Re: darwin LTO broken under Xcode 3.2.6/4.0 Message-ID: <20110313205511.GA13966@bromo.med.uc.edu> References: <20110313200334.GA13188@bromo.med.uc.edu> <20110313204109.GA13854@bromo.med.uc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg00168.txt.bz2 Heh, so I guess it's my fault... > I dug through radar and found the bug that triggered the change to as(1): > > possible assembler bug exposed by LTO > > The bug was written (ironically) by Jack Howarth! At the time 4/28/10), gcc's LTO was putting some LTO section first in the file and that pushed some real sections like __text past >the 255. Then the n_sect field for symbols in the __text section could not contain the section index, resulting in the linker complaining about the .o file. > > >The fix in 7920267 was to just error when the assembler sees the 255th section, regardless of which sections have symbols. That is what you are seeing in Xocde4. > > >The suggestion of using different segment names will not work. Segments aren't really used in mach-o object files. All mach-o object files have exactly one LC_SEGMENT load >command. It is final linked images that support multiple LC_SEGMENT load commands. > >It is possible to fix this in Xcode 4.x, but I think a solution that just uses one section for all gcc LTO data (and have your own sub-section scheme) will work with all darwin > assembler versions. > > -Nick Oh, well. The danger of filing radar bug reports with Apple. On the otherhand, if they weren't so secretive about posting Xcode previews to the general ADC accounts these days, we would have caught this problem well before Xcode 4.0 was released. So there is a lot of blame to go around. Jack