Re: [PATCH] readelf: Don't dump GOT section after seeing error

Jan Beulich <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
On 06.08.2026 04:42, H.J. Lu wrote:
> Don't dump GOT section contents after seeing errors in input:
> 
> readelf: Error: Section 10 has invalid sh_entsize of 0
> readelf: Error: (Using the expected size of 18 for the rest of this dump)
> readelf: Error: Too many program headers - 0x3030 - the file is not that big
> 
> PR binutils/34473
> * elfcomm.c (seen_error): New.
> (seen_elf_error): Likewise.
> (clear_elf_error): Likewise.
> (error): Set seen_error to true.
> * elfcomm.h (seen_elf_error): New.
> (clear_elf_error): Likewise.
> * readelf.c (process_got_section_contents): Return false if
> seen_elf_error returns true.
> (main): Call clear_elf_error before calling process_file.

Okay. And this model may want widening to elsewhere, not limited to readelf.

Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.