From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22891 invoked by alias); 2 Apr 2014 16:49:21 -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 22875 invoked by uid 89); 2 Apr 2014 16:49:20 -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; Wed, 02 Apr 2014 16:49:19 +0000 Received: by mail-vc0-f171.google.com with SMTP id lg15so697411vcb.16 for ; Wed, 02 Apr 2014 09:49:16 -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:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=leu/VCMXkZZNWVuL3NeLLPnXwhUhOCY3+VCFcIKO6aA=; b=Cv2dwl2t774h32ezAIkgcjlwSxC7ZGk8lJIuGHiOHZ/TZHtWus1PjT7f1CllilKewg 8hk7ZoQNJ7k1tBSK+EBEQj62XjF+8rjzDMIXN/RdfFCFS6IlRcVNcZjLMCpxX2BbWqhA O4cMpVz4ulpnodhMQH3PFFgy1HNHVYq5TBPGkwkmdQ2PvqJNIZJm7uci2DRhsnPzZn5T tVYMQsq0jCFR+ySsV333tO0WZX+ktt954AVBkAa1NgdiRh0lmExQBKpvHXVc4MC7Vyzj lANCFlijB9GPXqsMta8yhTlTeGV6llzyjakmVAuxQIvHMK1EfudxWp3yogfZwAtDmJWb jm4A== X-Gm-Message-State: ALoCoQk5L1mnmxWQ/Rbws398bplkN2FjfEqeMGvSm5prSj/qD4pQY5gHxT7by/58RbKuCeOpd+N/sWOZq+cUrOVmq4nj9L6lPaVAwFUHpbZQHxFBLkxEZxagRKWRCWGUMb0Mh8YsflRM30UMYwqEvoC11e0udkFd6mYEbaGgBvYlcMJtrKfXcfPf1a8YTGqxiVknmSMBWXH4PbP0K/lhCuKx481u2lznVA== MIME-Version: 1.0 X-Received: by 10.52.7.69 with SMTP id h5mr85335vda.68.1396457356640; Wed, 02 Apr 2014 09:49:16 -0700 (PDT) Received: by 10.52.184.202 with HTTP; Wed, 2 Apr 2014 09:49:16 -0700 (PDT) In-Reply-To: <20140402065443.GA18201@bubble.grove.modra.org> References: <20140402065443.GA18201@bubble.grove.modra.org> Date: Wed, 02 Apr 2014 16:49:00 -0000 Message-ID: Subject: Re: ICF on PowerPC Bug From: Sriraman Tallam To: Sriraman Tallam , binutils , Ian Lance Taylor Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00023.txt.bz2 On Tue, Apr 1, 2014 at 11:54 PM, Alan Modra wrote: > On Tue, Apr 01, 2014 at 03:06:37PM -0700, Sriraman Tallam wrote: >> 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. > > The following patch fixes the problem, but did you really mean to copy > all the vectors here? Yikes!, no did not intend that. I will make these references and send a patch. Thanks Sri > > Icf::Sections_reachable_info v = > (it_reloc_info_list->second).section_info; > // Stores the information of the symbol pointed to by the reloc. > Icf::Symbol_info s = (it_reloc_info_list->second).symbol_info; > // Stores the addend and the symbol value. > Icf::Addend_info a = (it_reloc_info_list->second).addend_info; > // Stores the offset of the reloc. > Icf::Offset_info o = (it_reloc_info_list->second).offset_info; > Icf::Reloc_addend_size_info reloc_addend_size_info = > (it_reloc_info_list->second).reloc_addend_size_info; > > > diff --git a/gold/icf.cc b/gold/icf.cc > index f30eb41..920514c 100644 > --- a/gold/icf.cc > +++ b/gold/icf.cc > @@ -288,8 +288,7 @@ get_section_contents(bool first_iteration, > > for (; it_v != v.end(); ++it_v, ++it_s, ++it_a, ++it_o, ++it_addend_size) > { > - if (first_iteration > - && it_v->first != NULL) > + if (it_v->first != NULL) > { > Symbol_location loc; > loc.object = it_v->first; > > -- > Alan Modra > Australia Development Lab, IBM