[PATCH] ELF: Don't sort output note section by alignments in ascending order

H.J. Lu hjl.tools@gmail.com
Fri Oct 5 11:59:00 GMT 2018


On Thu, Oct 4, 2018 at 1:09 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Oct 4, 2018 at 11:30 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Thu, Oct 4, 2018 at 7:57 AM Nick Clifton <nickc@redhat.com> wrote:
> > >
> > > Hi H.J.
> > >
> > >  We are getting some new linker testsuite failures:
> > >
> > > cr16-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > crx-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > d30v-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > dlx-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > fr30-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > frv-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > ft32-elf/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > > iq2000-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > mips64el-openbsd/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > > mips64-openbsd/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > > mn10200-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > moxie-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > ms1-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > msp430-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > mt-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > or1k-elf/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > > pj-elf/ld/ld.sum:XFAIL: ld-elf/pr23658-1
> > > pru-elf/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > > visium-elf/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > > xc16x-elf/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > > xgate-elf/ld/ld.sum:FAIL: ld-elf/pr23658-1
> > >
> > >   Would you mind taking a look please ?
> > >
> >
> > ft32-elf and xgate-elf fail since they use the generic linker.  I am checking
> > in this:
> >
> > diff --git a/ld/testsuite/ld-elf/pr23658-1.d b/ld/testsuite/ld-elf/pr23658-1.d
> > index 252fb872ed..e21206b38a 100644
> > --- a/ld/testsuite/ld-elf/pr23658-1.d
> > +++ b/ld/testsuite/ld-elf/pr23658-1.d
> > @@ -7,8 +7,8 @@
> >  #readelf: -l --wide
> >  # Since generic linker targets don't place SHT_NOTE sections as orphan,
> >  # SHT_NOTE sections aren't grouped nor sorted.
> > -#xfail: cr16-* crx-* d30v-* dlx-* fr30-* frv-* iq2000-*
> > -#xfail: m68hc12-* mn10200-* moxie-* mt-* msp430-* pj-*
> > +#xfail: cr16-* crx-* d30v-* dlx-* fr30-* frv-* ft32-* iq2000-*
> > +#xfail: m68hc12-* mn10200-* moxie-* mt-* msp430-* pj-* xgate-*
> >
> >  #...
> >   +[0-9]+ +\.note\.4 \.note\.1 +
> >
> > I am investigating others.
> >
>
> -shared isn't right:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=23658#c6
>

Since we can only insert a note section after another note section, the
alignment order is determined by the alignment of the first note section.
We should just group and sort output note section by alignments in the
order as they are being processed.

OK for trunk?

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ELF-Don-t-sort-output-note-section-by-alignments-in-.patch
Type: application/x-patch
Size: 8693 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20181005/154f1fea/attachment.bin>


More information about the Binutils mailing list