From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12695 invoked by alias); 16 Mar 2010 19:28:28 -0000 Received: (qmail 12686 invoked by uid 22791); 16 Mar 2010 19:28:28 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RDNS_DYNAMIC X-Spam-Check-By: sourceware.org Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net (HELO sunset.davemloft.net) (74.93.104.97) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 19:28:24 +0000 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id A7A7924C094; Tue, 16 Mar 2010 12:28:44 -0700 (PDT) Date: Tue, 16 Mar 2010 19:34:00 -0000 Message-Id: <20100316.122844.141234369.davem@davemloft.net> To: rth@redhat.com Cc: gcc@gcc.gnu.org Subject: Re: LTO and asm specs... From: David Miller In-Reply-To: <4B9FCE90.9040808@redhat.com> References: <20100312.213314.26520911.davem@davemloft.net> <4B9FCE90.9040808@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2010-03/txt/msg00191.txt.bz2 From: Richard Henderson Date: Tue, 16 Mar 2010 11:31:44 -0700 > On 03/12/2010 09:33 PM, David Miller wrote: >> I couldn't figure out immediately how to fix this as the >> way LTO does spec overriding and such looked non-trivial. > > It would not be a bad thing, IMO, if the sparc assembler > were extended to be able to emit any reloc directly, without > needing a specific command-line option. Then you'd only > encounter this problem with legacy assemblers. It's not the assemblers fault. We're using %hi() and expecting the assembler to emit a PC relative relcation just because the symbol name happens to be _GLOBAL_OFFSET_TABLE_ And it will do this, but only when -PIC. Changing that is pretty dangerous. But even if we got past that, we need to get the assembler options right in order to enable instruction classes. For example we have to get -Av9a there when using VIS instructions. Other platforms are going to hit things like this too. LTO really needs to evaluate the specs correctly.