]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Error messages emitted during bfd_check_format_matches
authorAlan Modra <amodra@gmail.com>
Fri, 14 Jun 2024 22:13:08 +0000 (07:43 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 17 Jun 2024 06:27:50 +0000 (15:57 +0930)
commit2df6e967098a2f48a83a2ec6000a9c53b493c737
tree017940ba576877fdaec378e5f7d3708dc791886a
parentc3d23f753daaac52ee6c788090845ff0f359cf27
Error messages emitted during bfd_check_format_matches

Error/warning messages are only printed for the target that
successfully matched, which makes sense for warnings, but not so much
for errors where the errors cause no target to match.  I noticed this
when looking at the pr20520 testcase again with objdump, which just
reports "file format not recognized" omitting the five "SHT_GROUP
section [index n] has no SHF_GROUP sections" messages.  They are
omitted because multiple ELF targets match the object file.  This is
going to be true for all ELF objects due to at least the proper ELF
target and the generic ELF target matching.

* format.c (print_and_clear_messages): Print messages if all
targets with messages have exactly the same set of messages.
bfd/format.c