{
asection *stub_sec = group->stub_sec;
- 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->rawsize = stub_sec->size;
stub_sec->size = 0;
stub_sec->reloc_count = 0;
stub_sec->flags &= ~SEC_RELOC;
htab->tga_group->stub_sec->size = 24 * 4;
}
- if (htab->stub_iteration <= STUB_SHRINK_ITER
- || htab->brlt->rawsize < htab->brlt->size)
- htab->brlt->rawsize = htab->brlt->size;
+ htab->brlt->rawsize = htab->brlt->size;
htab->brlt->size = 0;
htab->brlt->reloc_count = 0;
htab->brlt->flags &= ~SEC_RELOC;
if (htab->elf.srelrdyn != NULL)
{
- if (htab->stub_iteration <= STUB_SHRINK_ITER
- || htab->elf.srelrdyn->rawsize < htab->elf.srelrdyn->size)
- htab->elf.srelrdyn->rawsize = htab->elf.srelrdyn->size;
+ htab->elf.srelrdyn->rawsize = htab->elf.srelrdyn->size;
htab->elf.srelrdyn->size = 0;
}
|| htab->stub_iteration > 1))
break;
+ if (htab->stub_iteration > STUB_SHRINK_ITER)
+ {
+ for (group = htab->group; group != NULL; group = group->next)
+ if (group->stub_sec != NULL
+ && group->stub_sec->size < group->stub_sec->rawsize)
+ group->stub_sec->size = group->stub_sec->rawsize;
+
+ if (htab->brlt->size < htab->brlt->rawsize)
+ htab->brlt->size = htab->brlt->rawsize;
+
+ if (htab->elf.srelrdyn != NULL
+ && htab->elf.srelrdyn->size < htab->elf.srelrdyn->rawsize)
+ htab->elf.srelrdyn->size = htab->elf.srelrdyn->rawsize;
+ }
+
/* Ask the linker to do its stuff. */
(*htab->params->layout_sections_again) ();
}
--- /dev/null
+#as: -a64
+#ld: -melf64ppc --plt-align=0 -T pr28827-2.lnk
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+.*:
+.*: (49 ff ff f0|f0 ff ff 49) b .* <far1>
+ \.\.\.
+
+.* <.*\.plt_branch\..*>:
+.*: (e9 82 80 28|28 80 82 e9) ld r12,-32728\(r2\)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 20|20 04 80 4e) bctr
+
+.* <_start>:
+.*: (49 ff ff d8|d8 ff ff 49) b .* <far1>
+.*: (4b ff ff f0|f0 ff ff 4b) b .*
+
+Disassembly of section \.far1:
+
+.*:
+.*: (4a 00 00 38|38 00 00 4a) b .* <_start>
+
+.* <.*\.long_branch\..*>:
+.*: (49 ff ff f4|f4 ff ff 49) b .* <far2>
+ \.\.\.
+
+.* <far1>:
+.*: (41 82 ff f4|f4 ff 82 41) beq .*
+.*: (4a 00 00 24|24 00 00 4a) b .* <_start>
+
+Disassembly of section \.far2:
+
+.*:
+.*: (e9 82 80 20|20 80 82 e9) ld r12,-32736\(r2\)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 20|20 04 80 4e) bctr
+
+.*:
+.*: (4a 00 00 24|24 00 00 4a) b .* <far1>
+ \.\.\.
+
+.* <far2>:
+.*: (40 82 ff f4|f4 ff 82 40) bne .*
+.*: (4b ff ff e4|e4 ff ff 4b) b .*