From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35310 invoked by alias); 26 Apr 2016 02:08:40 -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 34705 invoked by uid 89); 26 Apr 2016 02:08:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f181.google.com Received: from mail-pf0-f181.google.com (HELO mail-pf0-f181.google.com) (209.85.192.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 26 Apr 2016 02:08:26 +0000 Received: by mail-pf0-f181.google.com with SMTP id 206so550334pfu.0 for ; Mon, 25 Apr 2016 19:08:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ly9pB3f3g0R2By/dfrwAyCVEFOF8DofVrwhSdR9IDCE=; b=Glj0qdP8ZKwJrafDNwfNWhvfmdyGs2Dg2Hen263nAvqFZaAQ2C5TyZlyfpyOemmK6x zZ6MsiYISfJ2a/Lsl3uS3Tgf8wNh76l/+NWTJm2zo0VbHh+/ZjINFhveadJgW9WlnYs7 XersDgU4h6KlYeaRJstjPr2dBLI4SfkN2uSHxTZ/HOPMoY0MCfhqVh0Dn2ZLPLWlRyPP x6nw+kXwOvaSeNl4ObcN6XJ7ZkffSKyP6nDvPR/rp8bNU7GIn/2hKwzhZz6ZTHes85IE ziVdCPinNGPX1xd1XbuC672lmXLmw0X8/aUxWN2viIolmxNyuiVl/7Jn+3qlN7Y4g2DX +wJA== X-Gm-Message-State: AOPr4FVQrXcPNkedXx8H8bI//YNdLclG7qYrHVxufYzhrOwpYx8pCrytis1myfGwEblgjA== X-Received: by 10.98.19.131 with SMTP id 3mr7566pft.17.1461636505057; Mon, 25 Apr 2016 19:08:25 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-146-233.sa.bigpond.net.au. [58.160.146.233]) by smtp.gmail.com with ESMTPSA id p189sm31965813pfb.51.2016.04.25.19.08.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Apr 2016 19:08:24 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id D9B7DEA0157; Tue, 26 Apr 2016 11:38:19 +0930 (ACST) Date: Tue, 26 Apr 2016 02:08:00 -0000 From: Alan Modra To: "H.J. Lu" Cc: Faraz Shahbazker , Binutils Subject: Re: [committed, PATCH] Always create dynsym section with dynamic sections Message-ID: <20160426020819.GK27353@bubble.grove.modra.org> References: <571ADE8F.9000000@imgtec.com> <571B93C6.5030007@imgtec.com> <571BCC3A.6090700@imgtec.com> <571D7E59.4040802@imgtec.com> <20160425134106.GI27353@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00420.txt.bz2 On Mon, Apr 25, 2016 at 09:03:06AM -0700, H.J. Lu wrote: > On Mon, Apr 25, 2016 at 6:41 AM, Alan Modra wrote: > > On Mon, Apr 25, 2016 at 05:47:15AM -0700, H.J. Lu wrote: > >> On Sun, Apr 24, 2016 at 7:18 PM, Faraz Shahbazker > >> wrote: > >> > On 04/23/16 18:42, H.J. Lu wrote: > >> >> Here is a patch. Does it work for you? > >> > Yes, this works. > >> > > >> > >> Any other comments, feedbacks for my patch? > > > > I think you'd better look at all places that test dynsymcount. For > > instance, bfd_elf_size_dynsym_hash_dynstr. > > I checked. They look OK. > > > This should really have been done when you committed > > https://sourceware.org/ml/binutils/2016-02/msg00326.html and that > > patch should have explained why the change was made. "We should > > always create the dynsym section, even if it is empty, with dynamic > > sections" doesn't explain anything about why the change was made. In > > fact, the explanation for the patch was no better than "We should do > > what this patch does". > > The issue is some dynamic tags (sections) are mandatory in .dynamic > section even if they are empty. MIPS backend use dynsymcount, which > is intended for the mandatory DT_SYMTAB (.dynsym section), to build > static executable, which doesn't have dynamic section. Here is the > updated patch. Is it OK for master? The dynsymcount != 0 tests in bfd_elf_size_dynsym_hash_dynstr will never trigger with your patch. Please remove them. OK with that change. -- Alan Modra Australia Development Lab, IBM