Blame SOURCES/binutils-2.27-ppc-stubs.patch

1a405f
--- binutils.orig/bfd/elf64-ppc.c	2017-03-08 13:43:51.185482217 +0000
1a405f
+++ binutils-2.27/bfd/elf64-ppc.c	2017-03-08 13:44:28.403034088 +0000
1a405f
@@ -12514,7 +12514,10 @@ ppc64_elf_size_stubs (struct bfd_link_in
1a405f
 	   stub_sec = stub_sec->next)
1a405f
 	if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
1a405f
 	  {
1a405f
-	    stub_sec->rawsize = stub_sec->size;
1a405f
+           if (htab->stub_iteration <= STUB_SHRINK_ITER
1a405f
+               || stub_sec->rawsize < stub_sec->size)
1a405f
+             /* Past STUB_SHRINK_ITER, rawsize is the max size seen.  */
1a405f
+             stub_sec->rawsize = stub_sec->size;
1a405f
 	    stub_sec->size = 0;
1a405f
 	    stub_sec->reloc_count = 0;
1a405f
 	    stub_sec->flags &= ~SEC_RELOC;