[binutils/f19] Stop NM from halting if it encounters a file with no symbols when displaying dynamic symbols in mult

Nicholas Clifton nickc at fedoraproject.org
Thu Oct 24 11:11:27 UTC 2013


commit e21ffd0fb7820563222040b7ee8b38fb2647b8c8
Author: Nick Clifton <nickc at redhat.com>
Date:   Thu Oct 24 12:09:15 2013 +0100

    Stop NM from halting if it encounters a file with no symbols when displaying dynamic symbols in multiple files.
    Resolves: #1022845

 binutils-2.23.52.0.1-nm-dynsym.patch |   27 +++++++++++++++++++++++++++
 binutils.spec                        |    8 +++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/binutils-2.23.52.0.1-nm-dynsym.patch b/binutils-2.23.52.0.1-nm-dynsym.patch
new file mode 100644
index 0000000..f4a3da5
--- /dev/null
+++ b/binutils-2.23.52.0.1-nm-dynsym.patch
@@ -0,0 +1,27 @@
+*** ../binutils-2.23.52.0.1.orig/binutils/nm.c	2013-10-24 11:18:31.468318979 +0100
+--- binutils/nm.c	2013-10-24 11:19:42.297316738 +0100
+*************** display_rel_file (bfd *abfd, bfd *archiv
+*** 1018,1024 ****
+  
+    symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size);
+    if (symcount < 0)
+!     bfd_fatal (bfd_get_filename (abfd));
+  
+    if (symcount == 0)
+      {
+--- 1018,1032 ----
+  
+    symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size);
+    if (symcount < 0)
+!     {
+!       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)
+      {
diff --git a/binutils.spec b/binutils.spec
index 8eb3a7e..93bab8a 100644
--- a/binutils.spec
+++ b/binutils.spec
@@ -17,7 +17,7 @@
 Summary: A GNU collection of binary utilities
 Name: %{?cross}binutils%{?_with_debug:-debug}
 Version: 2.23.52.0.1
-Release: 11%{?dist}
+Release: 12%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
@@ -58,6 +58,8 @@ Patch17: binutils-2.23.52.0.1-avx512-mpx-sha.patch
 Patch18: binutils-2.23.52.0.1-x86-64-mcmodel=large-tls.patch
 # Make readelf flush stdout before emitting an error or warning message.
 Patch19: binutils-2.23.51.0.1-readelf-flush-stdout.patch
+# Fix NM when displaying dynamic symbols in multiple files.  BZ #1022845
+Patch20: binutils-2.23.52.0.1-nm-dynsym.patch
 
 Provides: bundled(libiberty)
 
@@ -175,6 +177,7 @@ using libelf instead of BFD.
 %patch17 -p0 -b .avx512-mpx-sha~
 %patch18 -p0 -b .x86-64-mcmodel=large-tls~
 %patch19 -p0 -b .flush~ 
+%patch20 -p0 -b .nm-dynsym~ 
 
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
@@ -474,6 +477,9 @@ exit 0
 %endif # %{isnative}
 
 %changelog
+* Thu Oct 24 2013 Nick Clifton <nickc at redhat.com> - 2.23.52.0.1-12
+- Stop NM from halting if it encounters a file with no symbols when displaying dynamic symbols in multiple files.  (#1022845)
+
 * Mon Sep 09 2013 Nick Clifton <nickc at redhat.com> - 2.23.52.0.1-11
 - Make readelf flush stdout before emitting an error or warning message.  (#1005182)
 


More information about the scm-commits mailing list