This tightens the condition under which ld optimizes PIC entry code
to non-PIC.
bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
ELFv2 entry optimization.
gold/
* powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
+ ELFv2 entry optimization.
+
PR binutils/19547
if (!bfd_link_pic (info)
&& !info->traditional_format
&& !htab->opd_abi
+ && rel->r_addend == 0
&& h != NULL && &h->elf == htab->elf.hgot
&& rel + 1 < relend
&& rel[1].r_info == ELF64_R_INFO (r_symndx, R_PPC64_REL16_LO)
+
+ * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
+
PR gold/19472 - need pc-relative stubs.
&& preloc != NULL
&& target->abiversion() >= 2
&& !parameters->options().output_is_position_independent()
+ && rela.get_r_addend() == 4
&& gsym != NULL
&& strcmp(gsym->name(), ".TOC.") == 0)
{