[PATCH] readelf: Report if no GOT section found

Alan Modra amodra@gmail.com
Wed Sep 3 08:12:03 GMT 2025


On Tue, Sep 02, 2025 at 07:47:17PM -0700, H.J. Lu wrote:
> On Tue, Sep 2, 2025 at 7:06 PM Alan Modra <amodra@gmail.com> wrote:
> >
> > On Mon, Sep 01, 2025 at 11:00:43AM -0700, H.J. Lu wrote:
> > > Update "readelf --got-contents" to report if no GOT section found.
> > >
> > >       * readelf.c (process_got_section_contents): Report if no GOT
> > >       section found.
> > >       * testsuite/binutils-all/readelf-got.d: New file.
> > >       * testsuite/binutils-all/readelf.exp: Run readelf-got.
> >
> > The new test fails on mips, for the obvious reason that
> 
> This
> 
> https://patchwork.sourceware.org/project/binutils/list/?series=51506
> 
> should fix the test.

Well then, the test does nothing but check a particular readelf
message.  That's a waste of test time and just adds more work should
someone decide the message needs tweaking.  Please delete the test
when you commit the EXEC/DYN change, which is OK.

> > process_got_section_contents blindly sets "found" whether or not there
> > are got sections to dump on mips.  That ought to be fixed, and you
> > ought to test your patches more thoroughly.
> >
> > --
> > Alan Modra
> 
> 
> 
> -- 
> H.J.

-- 
Alan Modra


More information about the Binutils mailing list