]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - binutils/patches/binutils-2.20.51.0.10-sec-merge-emit.patch0
binutils: Update to 2.22.52.0.3.
[ipfire-3.x.git] / binutils / patches / binutils-2.20.51.0.10-sec-merge-emit.patch0
diff --git a/binutils/patches/binutils-2.20.51.0.10-sec-merge-emit.patch0 b/binutils/patches/binutils-2.20.51.0.10-sec-merge-emit.patch0
new file mode 100644 (file)
index 0000000..388e143
--- /dev/null
@@ -0,0 +1,24 @@
+*** ../binutils-2.20.51.0.10.orig/bfd/merge.c  2010-08-20 12:19:33.000000000 +0100
+--- bfd/merge.c        2010-08-20 12:18:01.000000000 +0100
+*************** sec_merge_emit (bfd *abfd, struct sec_me
+*** 307,312 ****
+--- 307,315 ----
+        len = -off & (entry->alignment - 1);
+        if (len != 0)
+       {
++        /* We should never have an entry with an alignment
++           greater than the section's alignment.  */
++        BFD_ASSERT (len <= (bfd_size_type) (1 << alignment_power));
+         if (bfd_bwrite (pad, len, abfd) != len)
+           goto err;
+         off += len;
+*************** sec_merge_emit (bfd *abfd, struct sec_me
+*** 324,329 ****
+--- 327,333 ----
+    /* Trailing alignment needed?  */
+    off = sec->size - off;
+    if (off != 0
++       && alignment_power
+        && bfd_bwrite (pad, off, abfd) != off)
+      goto err;
+