+
+ ppc_elf_maybe_strip_sdata_syms (&link_info);
+
+ if (RELAXATION_ENABLED)
+ params.branch_trampolines = 1;
+
+ /* Turn on relaxation if executable sections have addresses that
+ might make branches overflow. */
+ else if (!RELAXATION_DISABLED_BY_USER)
+ {
+ bfd_vma low = (bfd_vma) -1;
+ bfd_vma high = 0;
+ asection *o;
+
+ /* Run lang_size_sections even if already done, so as to pick
+ up gld${EMULATION_NAME}_before_allocation sizing. This
+ matters when we have an executable bss plt which will
+ typically be laid out near the end of the image, ie. worst
+ case for branches at the start of .text. */
+ expld.phase = lang_first_phase_enum;
+ prelim_size_sections ();
+
+ for (o = link_info.output_bfd->sections; o != NULL; o = o->next)
+ {
+ if ((o->flags & (SEC_ALLOC | SEC_CODE)) != (SEC_ALLOC | SEC_CODE))
+ continue;
+ if (o->rawsize == 0)
+ continue;
+ if (low > o->vma)
+ low = o->vma;
+ if (high < o->vma + o->rawsize - 1)
+ high = o->vma + o->rawsize - 1;
+ }
+ if (high > low && high - low > (1 << 25) - 1)
+ params.branch_trampolines = 1;
+ }
+
+ if (params.branch_trampolines
+ || params.ppc476_workaround
+ || params.pic_fixup > 0)
+ ENABLE_RELAXATION;