Blame SOURCES/binutils-2.20.51.0.10-sec-merge-emit.patch

8101c5
*** ../binutils-2.20.51.0.10.orig/bfd/merge.c	2010-08-20 12:19:33.000000000 +0100
8101c5
--- bfd/merge.c	2010-08-20 12:18:01.000000000 +0100
8101c5
*************** sec_merge_emit (bfd *abfd, struct sec_me
8101c5
*** 307,312 ****
8101c5
--- 307,315 ----
8101c5
        len = -off & (entry->alignment - 1);
8101c5
        if (len != 0)
8101c5
  	{
8101c5
+ 	  /* We should never have an entry with an alignment
8101c5
+ 	     greater than the section's alignment.  */
8101c5
+ 	  BFD_ASSERT (len <= (bfd_size_type) (1 << alignment_power));
8101c5
  	  if (bfd_bwrite (pad, len, abfd) != len)
8101c5
  	    goto err;
8101c5
  	  off += len;
8101c5
*************** sec_merge_emit (bfd *abfd, struct sec_me
8101c5
*** 324,329 ****
8101c5
--- 327,333 ----
8101c5
    /* Trailing alignment needed?  */
8101c5
    off = sec->size - off;
8101c5
    if (off != 0
8101c5
+       && alignment_power
8101c5
        && bfd_bwrite (pad, off, abfd) != off)
8101c5
      goto err;
8101c5