[binutils] Fix the creation of index tables in 64-bit thin archives. Resolves #915411

Nicholas Clifton nickc at fedoraproject.org
Fri Mar 1 17:45:18 UTC 2013


commit f2a73fac2c583c7c6093ca3f716172c336ce64e9
Author: Nick Clifton <nickc at redhat.com>
Date:   Fri Mar 1 17:40:21 2013 +0000

    Fix the creation of index tables in 64-bit thin archives.
    Resolves #915411

 binutils-2.23.52.0.1-64-bit-thin-archives.patch |   25 +++++++++++++++++++++++
 binutils.spec                                   |    8 ++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/binutils-2.23.52.0.1-64-bit-thin-archives.patch b/binutils-2.23.52.0.1-64-bit-thin-archives.patch
new file mode 100644
index 0000000..5415750
--- /dev/null
+++ b/binutils-2.23.52.0.1-64-bit-thin-archives.patch
@@ -0,0 +1,25 @@
+*** ../binutils-2.23.52.0.1.orig/bfd/archive64.c	2013-03-01 17:20:39.873535502 +0000
+--- bfd/archive64.c	2013-03-01 17:22:30.410538566 +0000
+*************** bfd_elf64_archive_write_armap (bfd *arch
+*** 210,218 ****
+  	  if (bfd_bwrite (buf, 8, arch) != 8)
+  	    return FALSE;
+  	}
+        /* Add size of this archive entry */
+!       archive_member_file_ptr += (arelt_size (current)
+! 				  + sizeof (struct ar_hdr));
+        /* remember about the even alignment */
+        archive_member_file_ptr += archive_member_file_ptr % 2;
+      }
+--- 210,220 ----
+  	  if (bfd_bwrite (buf, 8, arch) != 8)
+  	    return FALSE;
+  	}
++ 
+        /* Add size of this archive entry */
+!       archive_member_file_ptr += sizeof (struct ar_hdr);
+!       if (! bfd_is_thin_archive (arch))
+! 	archive_member_file_ptr += arelt_size (current);
+        /* remember about the even alignment */
+        archive_member_file_ptr += archive_member_file_ptr % 2;
+      }
diff --git a/binutils.spec b/binutils.spec
index 30f22fe..1c08b3a 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: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
@@ -40,6 +40,8 @@ Patch08: binutils-2.22.52.0.1-relro-on-by-default.patch
 Patch09: binutils-2.22.52.0.1-export-demangle.h.patch
 # Disable checks that config.h has been included before system headers.  BZ #845084
 Patch10: binutils-2.22.52.0.4-no-config-h-check.patch
+# Fix the creation of the index table in 64-bit thin archives.
+Patch11: binutils-2.23.52.0.1-64-bit-thin-archives.patch
 
 Provides: bundled(libiberty)
 
@@ -146,6 +148,7 @@ using libelf instead of BFD.
 %endif
 %patch09 -p0 -b .export-demangle-h~
 %patch10 -p0 -b .no-config-h-check~
+%patch11 -p0 -b .64bit-thin-archives~
 
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
@@ -445,6 +448,9 @@ exit 0
 %endif # %{isnative}
 
 %changelog
+* Fri Mar 01 2013 Nick Clifton <nickc at redhat.com> - 2.23.52.0.1-2
+- Fix the creation of index tables in 64-bit thin archives.  (#915411)
+
 * Thu Feb 28 2013 Nick Clifton <nickc at redhat.com> - 2.23.52.0.1-1
 - Rebase on 2.23.51.0.1 release.  (#916516)
 


More information about the scm-commits mailing list