aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index fb808d6..7829520 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -12467,13 +12467,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
}
}
- if (h_elf == htab->elf.hgot)
- {
- relocation = (TOCstart
- + htab->stub_group[input_section->id].toc_off);
- sec = bfd_abs_section_ptr;
- unresolved_reloc = FALSE;
- }
}
h = (struct ppc_link_hash_entry *) h_elf;
@@ -12486,6 +12479,14 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (info->relocatable)
continue;
+ if (h != NULL && &h->elf == htab->elf.hgot)
+ {
+ relocation = (TOCstart
+ + htab->stub_group[input_section->id].toc_off);
+ sec = bfd_abs_section_ptr;
+ unresolved_reloc = FALSE;
+ }
+
/* TLS optimizations. Replace instruction sequences and relocs
based on information we collected in tls_optimize. We edit
RELOCS so that --emit-relocs will output something sensible