This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ld: Allow section groups to be resolved as part of a relocatable link

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]