* Commit: nm: -D, no symbols and multiple files
@ 2013-10-24 9:45 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2013-10-24 9:45 UTC (permalink / raw)
To: gingold, binutils
Hi Guys,
There is a small bug in nm - when it is displaying the dynamic symbols
in multiple files and it encounters a file with no symbols in it
(dynamic or otherwise), it stops rather than carrying on to process
the next file.
The fix is simple - catch the bfd_error_no_symbols error code - so I
am applying the patch below to the mainline.
Tristan - is this OK for the 2.24 branch ?
Cheers
Nick
binutils/ChangeLog
2013-10-24 Nick Clifton <nickc@redhat.com>
* nm.c (display_rel_file): Treat bfd_error_no_symbols as
non-fatal.
Index: binutils/nm.c
===================================================================
RCS file: /cvs/src/src/binutils/nm.c,v
retrieving revision 1.71
diff -u -3 -p -r1.71 nm.c
--- binutils/nm.c 19 Aug 2013 15:08:52 -0000 1.71
+++ binutils/nm.c 24 Oct 2013 09:40:25 -0000
@@ -1010,7 +1010,15 @@ display_rel_file (bfd *abfd, bfd *archiv
symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size);
if (symcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
+ {
+ if (dynamic && bfd_get_error () == bfd_error_no_symbols)
+ {
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
+ return;
+ }
+
+ bfd_fatal (bfd_get_filename (abfd));
+ }
if (symcount == 0)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-24 9:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-24 9:45 Commit: nm: -D, no symbols and multiple files Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).