From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45925 invoked by alias); 10 May 2017 02:46:00 -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 45546 invoked by uid 89); 10 May 2017 02:45:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=disappeared, 0930, H*f:sk:1490368, emails X-HELO: mail-pf0-f180.google.com Received: from mail-pf0-f180.google.com (HELO mail-pf0-f180.google.com) (209.85.192.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 May 2017 02:45:35 +0000 Received: by mail-pf0-f180.google.com with SMTP id v14so8875153pfd.2 for ; Tue, 09 May 2017 19:45:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eh7x38lkxO+wbMV0alAwQXYt8n+qC3kRg+iqSBI7UbU=; b=YrKcQeeI3lZL6sZCiMZrKB13XBQARMOBHcmv9t2RMqSa8350PpNey7IfDnlU2VNlaG p1GgSP66EfZKDqzuxrl5YuFDxzf6RanVn0IhcQ7yxGqOt57b+FfolLg6M0auEFUbKtqE vkrKhNF7iNRnxDlb+iaiP0Z/LD1Z2wFXwC8YUsVmp31Ya7XK6uDpTgl/Y++D06mOB8cm Cq/27UgAUyvtSIBMJ8f2yF2giv2sagJDKfdizGrX909STEIG4LHQxkeofIOOwiW1mKnE lI3vR41M2XkQwSzVhLog7t8EJF8B9TGxcRKoUsXaF3rrtVlDrN37wHX/OJcISNDpouaU ExIw== X-Gm-Message-State: AODbwcB9EnLjtydAGmM9ooVdGr9gMplfxrvLsuVEFqBeu5Kohh69K4C+ FUw7D1ENv6M6YDoU X-Received: by 10.98.157.83 with SMTP id i80mr3608651pfd.166.1494384335850; Tue, 09 May 2017 19:45:35 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-71-80.tyqh2.lon.bigpond.net.au. [58.160.71.80]) by smtp.gmail.com with ESMTPSA id s16sm2266143pgo.39.2017.05.09.19.45.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 19:45:35 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 18071C029D; Wed, 10 May 2017 12:15:31 +0930 (ACST) Date: Wed, 10 May 2017 02:46:00 -0000 From: Alan Modra To: Andrew Burgess Cc: binutils@sourceware.org Subject: Re: [PATCH] ld: Allow section groups to be resolved as part of a relocatable link Message-ID: <20170510024530.GB30859@bubble.grove.modra.org> References: <1490368289-27049-1-git-send-email-andrew.burgess@embecosm.com> <20170404100120.GE16711@bubble.grove.modra.org> <20170413220713.GH28064@embecosm.com> <20170509172942.GR16262@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170509172942.GR16262@embecosm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00111.txt.bz2 On Tue, May 09, 2017 at 06:29:42PM +0100, Andrew Burgess wrote: > Any followup to the below? Sorry, I put this aside as being a little difficult, and it disappeared among too many other emails. > * Andrew Burgess [2017-04-13 23:07:13 +0100]: > > > * Alan Modra [2017-04-04 19:31:21 +0930]: > > > > > On Fri, Mar 24, 2017 at 03:11:29PM +0000, Andrew Burgess wrote: > > > > This commit adds a new linker feature: the ability to resolve section > > > > groups as part of a relocatable link. > > > > > > What happens with dwarf debug or .eh_frame info for discarded > > > sections? > > > > Alan, > > > > Thanks for the feedback, sorry for the slow reply. > > > > I wasn't totally sure what you're asking for, as far as I'm aware > > debug and eh_frame sections will work largely as before. However, > > given your question I suspect you've spotted something that I'm still > > not getting. One of the "little difficulties" is admitting that when I wrote the email, I was thinking that ld -r kept all the groups. ;-) It doesn't, so the change isn't as major as I was thinking. > +@item --inhibit-group-allocation > +This option prevents the linker from resolving sections groups, > +sections that are part of a group remain group members in the output > +file and the section groups are retained. This is the default > +behaviour for a relocatable link (@samp{-r}) but this option can be > +used to change the behaviour of a final link. The script command > +@code{INHIBIT_GROUP_ALLOCATION} has the same > +effect. @xref{Miscellaneous Commands}. This part is a problem. The ELF gABI says "Sections of type SHT_GROUP may appear only in relocatable objects". Did you add the option for symmetry? If so, let's drop this part. -- Alan Modra Australia Development Lab, IBM