]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Downgrade nm fatal errors to non-fatal
authorAlan Modra <amodra@gmail.com>
Mon, 6 Mar 2023 00:12:51 +0000 (10:42 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 6 Mar 2023 02:41:10 +0000 (13:11 +1030)
commit86a2562b0958ed988e20a8b3a1b0029ff91dda3e
tree54031bf3c5db72554e1384d1bd88bfd53925a562
parente3f450f3933ddb9ca4ef405722706f3c793d295e
Downgrade nm fatal errors to non-fatal

Many of the fatal errors in nm ought to be recoverable.  This patch
downgrades most of them.  The ones that are left are most likely due
to memory allocation failures.

* nm.c (print_symdef_entry): Don't bomb with a fatal error
on a corrupted archive symbol table.
(filter_symbols): Silently omit symbols that return NULL
from bfd_minisymbol_to_symbol rather than giving a fatal
error.
(display_rel_file): Don't give a fatal error on
bfd_read_minisymbols returning an error, or on not being able
to read dynamic symbols for synth syms.
(display_archive): Downgrade bfd_openr_next_archived_file
error.
(display_file): Don't bomb on a bfd_close failure.
binutils/nm.c