aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-ppc.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bfacc20..e804d6e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-30 Alan Modra <amodra@gmail.com>
+
+ PR ld/20886
+ * elf64-ppc.c (ppc64_elf_size_stubs): Make rawsize max size seen
+ on any pass past STUB_SHRINK_ITER.
+
2016-11-28 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_fix_symbol_flags): Hide hidden versioned
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index d011303..5a4bc72 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -12617,7 +12617,10 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
stub_sec = stub_sec->next)
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
{
- stub_sec->rawsize = stub_sec->size;
+ if (htab->stub_iteration <= STUB_SHRINK_ITER
+ || stub_sec->rawsize < stub_sec->size)
+ /* Past STUB_SHRINK_ITER, rawsize is the max size seen. */
+ stub_sec->rawsize = stub_sec->size;
stub_sec->size = 0;
stub_sec->reloc_count = 0;
stub_sec->flags &= ~SEC_RELOC;