[PATCH] ld: Limit "readelf --got-contents" tests

H.J. Lu hjl.tools@gmail.com
Thu Sep 4 13:49:37 GMT 2025


On Thu, Sep 4, 2025 at 6:40 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> Hi H.J.,
>
> > Since "readelf --got-contents" tests use -melf_i386, -melf_x86_64 and
> > -melf32_x86_64 emulations, limit theses tests to targets with those
> > emulations.
> >
> >       PR ld/33350
> >       * testsuite/ld-i386/binutils.exp: Limit tests to targets with
> >       -melf_i386 support.
> >       * testsuite/ld-x86-64/binutils.exp: Limit tests to targets with
> >       -melf_x86_64 and -melf32_x86_64 support.
>
> TBH, this feels like pure lazyness to me: as reported in the PR, if you
> exclude the x32 tests (which are strictly Linux-only), at least
> FreeBSD/amd64 has clean results.  Solaris/x86 is partially different,
> but some of this is already addressed in the patch attached to the PR.
>
> FreeBSD/amd64 supports both -melf_i386 and -melf_x86_64, but isn't
> included in the list above.  Besides, that patch already handles the
> -melf_i386 vs. -melf_i386_sol2 (and x86_64 equivalent) difference: it's
> effectively trivial.

I'd like to make sure that readelf outputs match exactly for a given
emulation.  If Solaris doesn't support such emulation, it should be
skipped.

-- 
H.J.


More information about the Binutils mailing list