[PATCH] elf: Remove zero-sized relocation section from section group

H.J. Lu hjl.tools@gmail.com
Sat Apr 4 02:05:22 GMT 2020


On Fri, Apr 3, 2020 at 6:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Fri, Apr 3, 2020 at 5:36 PM Alan Modra <amodra@gmail.com> wrote:
> >
> > On Fri, Apr 03, 2020 at 01:48:42PM -0700, H.J. Lu wrote:
> > > On Thu, Apr 2, 2020 at 9:45 PM Alan Modra <amodra@gmail.com> wrote:
> > > >
> > > > On Thu, Apr 02, 2020 at 08:41:18PM -0700, H.J. Lu via Binutils wrote:
> > > > > We must keep zero-sized relocation section in a section group.  Otherwise,
> > > > > the relocation section will be missing from the section group.
> > > >
> > > > Wouldn't it be better to get rid of these bogus relocation sections?
> > > > Should be possible with a change to _bfd_elf_fixup_group_sections, I
> > > > think.
> > >
> > > Here is the patch which does that.  OK for master?
> >
> > OK, thanks.
> >
> > Hmm, do we want a warning message?  I'm OK with it as a reminder to
>
> I will remove the warning.
>
> > people to fix their compilers and/or assembly, but other than that it
> > seems to me that removing an empty relocation section is hardly of
> > concern to users.  How was your testcase generated?
> >
>
> I was given an object file generated by an "unnamed" compiler :-).
> I have told them to fix their compiler.
>
> Thanks.

This is what I am checking in.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-elf-Remove-zero-sized-relocation-section-from-sectio.patch
Type: text/x-patch
Size: 2253 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200403/ffc77f0d/attachment.bin>


More information about the Binutils mailing list