[binutils/f21] Fix seg-fault when adding symbols via a plugin. Resovles: BZ #1149660

Nicholas Clifton nickc at fedoraproject.org
Thu Nov 6 15:36:28 UTC 2014


commit e1587464d72c7143787734c0d3f3a310ce4a1c07
Author: Nick Clifton <nickc at redhat.com>
Date:   Thu Nov 6 15:35:57 2014 +0000

    Fix seg-fault when adding symbols via a plugin.
    Resovles: BZ #1149660

 binutils-2.24-plugin-sym-add.patch |   31 +++++++++++++++++++++++++++++++
 binutils.spec                      |    8 +++++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/binutils-2.24-plugin-sym-add.patch b/binutils-2.24-plugin-sym-add.patch
new file mode 100644
index 0000000..52b8ad5
--- /dev/null
+++ b/binutils-2.24-plugin-sym-add.patch
@@ -0,0 +1,31 @@
+*** ../binutils-2.24.orig/bfd/plugin.c	2014-11-06 15:23:23.689457559 +0000
+--- bfd/plugin.c	2014-11-06 15:25:13.280962560 +0000
+*************** add_symbols (void * handle,
+*** 274,286 ****
+  
+    plugin_data->nsyms = nsyms;
+    plugin_data->syms = syms;
+  
+    bfd_plugin_get_symbols_in_object_only (abfd);
+  
+    if ((nsyms + plugin_data->object_only_nsyms) != 0)
+      abfd->flags |= HAS_SYMS;
+  
+-   abfd->tdata.plugin_data = plugin_data;
+    return LDPS_OK;
+  }
+  
+--- 274,286 ----
+  
+    plugin_data->nsyms = nsyms;
+    plugin_data->syms = syms;
++   abfd->tdata.plugin_data = plugin_data;
+  
+    bfd_plugin_get_symbols_in_object_only (abfd);
+  
+    if ((nsyms + plugin_data->object_only_nsyms) != 0)
+      abfd->flags |= HAS_SYMS;
+  
+    return LDPS_OK;
+  }
+  
diff --git a/binutils.spec b/binutils.spec
index b2318d8..e491a3f 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.24
-Release: 28%{?dist}
+Release: 29%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
@@ -72,6 +72,7 @@ Patch29: binutils-2.24-aarch64-fix-ie-relax.patch
 Patch30: binutils-HEAD-change-ld-notice-interface.patch
 Patch31: binutils-2.24-corrupt-binaries.patch
 Patch32: binutils-2.24-strings-default-all.patch
+Patch33: binutils-2.24-plugin-sym-add.patch
 
 Provides: bundled(libiberty)
 
@@ -208,6 +209,7 @@ using libelf instead of BFD.
 %patch30 -p1 -b .ldplugin~
 %patch31 -p0 -b .corrupt-binaries~
 %patch32 -p0 -b .strings-all~
+%patch33 -p0 -b .plugin-syms~
 
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
@@ -519,6 +521,10 @@ exit 0
 %endif # %{isnative}
 
 %changelog
+* Thu Nov 06 2014 Nick Clifton <nickc at redhat.com> - 2.22-29
+- Fix seg-fault when adding symbols via a plugin.
+  Resovles: BZ #1149660
+
 * Fri Oct 31 2014 Nick Clifton <nickc at redhat.com> - 2.22-28
 - Remove bogus part of addr2line-dynsymtab.patch.
   Resovles: BZ #1157706


More information about the scm-commits mailing list