From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32065 invoked by alias); 1 Apr 2014 22:06:42 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 32052 invoked by uid 89); 1 Apr 2014 22:06:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f171.google.com Received: from mail-vc0-f171.google.com (HELO mail-vc0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 01 Apr 2014 22:06:40 +0000 Received: by mail-vc0-f171.google.com with SMTP id lg15so10744892vcb.16 for ; Tue, 01 Apr 2014 15:06:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=EI1kpqYVZ6/qofkKsBN9K3xfQ/f05qr95y4I0G8J04c=; b=XjU5B1jjZhb9ODRGP8z/bFQ+Z12RPAN0SgMOqVInRVvfYI2KNaGjN4ZY+cPWoyeB2l 5PMG8SqrKik2I40eQSIaVij9p0dgmmaFfHChedouXRS0wD1+g9lAFq9PyneWnEWqw+4D vTWIQTOzDgbHsCBiAvUm1XElHj3F2Nd4YNBwPCH6Xnr4DSK1uVnPr7lw6ExXybZf19zy UK5VMS6NZrQehWn+kM8HHw3Ap/LtcFV1vonUEkHxoXalqaMrAgoL8gKmhzq2ipk2TrWg oAcfcU+Ctu2KIss62F5Baaibku0TnCwAVNPuSfF58K2a8AvC7oURiL+atHcu240ml6eU 61Mw== X-Gm-Message-State: ALoCoQmVEHwAmfOPzw5BL/ZVLhWM/LCWj4cTAhfUEbMqVUo0vMo70Uh8ozL+N88CizJukHW44FMxtClqCs/ipZMib9mEQy6hLuoQLwh5uo1LLZ0A97L297HdWTFPmhF6fp69qzMRMq4JIgEfoQTQBrpH35KDrBaN5im4VFBI9YK/Czh1E+BWYqI+60+F05XELg91dkXJOpdqVvdevO4hivNu8cHt4hGSiQ== MIME-Version: 1.0 X-Received: by 10.52.33.136 with SMTP id r8mr23090060vdi.2.1396389998009; Tue, 01 Apr 2014 15:06:38 -0700 (PDT) Received: by 10.52.184.202 with HTTP; Tue, 1 Apr 2014 15:06:37 -0700 (PDT) Date: Tue, 01 Apr 2014 22:06:00 -0000 Message-ID: Subject: ICF on PowerPC Bug From: Sriraman Tallam To: Alan Modra , binutils , Ian Lance Taylor Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00008.txt.bz2 Hi, This program fails with ICF on powerpc: __attribute__((noinline)) int foo () { return 1; } __attribute__((noinline)) int bar () { return 0; } __attribute__((noinline)) int fold1() { return foo (); } __attribute__((noinline)) int fold2() { return bar(); } int main() { assert (fold1() != fold2()); } because fold2 is folded onto fold1. The only way to differentiate fold1 and fold2 which have the same object code is via the relocation type and the Info value is different. However, with powerpc this is rewritten here in icf.cc: // Look through function descriptors parameters->target().function_location(&loc); if (loc.shndx != it_v->second) { it_v->second = loc.shndx; // Modify symvalue/addend to the code entry. it_a->first = loc.offset; it_a->second = 0; } I am not sure how to fix it. Thanks Sri