[PATCH] readelf: Report if no GOT section found

Alan Modra amodra@gmail.com
Wed Sep 3 02:05:57 GMT 2025


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
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


More information about the Binutils mailing list