From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101191 invoked by alias); 27 Apr 2017 22:26:22 -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 101182 invoked by uid 89); 27 Apr 2017 22:26:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,NO_DNS_FOR_FROM,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga06.intel.com Received: from mga06.intel.com (HELO mga06.intel.com) (134.134.136.31) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Apr 2017 22:26:20 +0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 27 Apr 2017 15:26:20 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([172.25.70.218]) by fmsmga004.fm.intel.com with ESMTP; 27 Apr 2017 15:26:20 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 1000) id C09D92003B0; Thu, 27 Apr 2017 15:26:20 -0700 (PDT) Date: Thu, 27 Apr 2017 22:26:00 -0000 From: "H.J. Lu" To: binutils@sourceware.org Subject: [committed, PATCH] x86-64: Use "=" instead of "+=" to update 0 Message-ID: <20170427222620.GA10387@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-04/txt/msg00271.txt.bz2 Use if (htab->elf.splt->size == 0) htab->elf.splt->size = GET_PLT_ENTRY_SIZE (output_bfd); instead of if (htab->elf.splt->size == 0) htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd); * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "=" instead of "+=" to update 0. --- bfd/ChangeLog | 5 +++++ bfd/elf64-x86-64.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0d328b4..3ae5c9f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2017-04-27 H.J. Lu + * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "=" + instead of "+=" to update 0. + +2017-04-27 H.J. Lu + * elf32-i386.c (elf_i386_create_dynamic_sections): Create the .plt.got section here. (elf_i386_check_relocs): Don't create the .plt.got section. diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 5985319..6f9bc36 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -3850,7 +3850,7 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd, /* Reserve room for the initial entry. FIXME: we could probably do away with it in this case. */ if (htab->elf.splt->size == 0) - htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd); + htab->elf.splt->size = GET_PLT_ENTRY_SIZE (output_bfd); htab->tlsdesc_plt = htab->elf.splt->size; htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd); } -- 2.9.3