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

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