aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-09-08 12:55:48 +0930
committerAlan Modra <amodra@gmail.com>2021-09-08 22:22:34 +0930
commitbeaddc1a805d70131ffbeaee4d8d4ba41b9e5a2e (patch)
treea5efc9f0132871e16150a695ad95cf5eaa02385d /bfd/elf64-ppc.c
parent351031f22adc77a63663cb2ac729864867d149c1 (diff)
downloadfsf-binutils-gdb-beaddc1a805d70131ffbeaee4d8d4ba41b9e5a2e.zip
fsf-binutils-gdb-beaddc1a805d70131ffbeaee4d8d4ba41b9e5a2e.tar.gz
fsf-binutils-gdb-beaddc1a805d70131ffbeaee4d8d4ba41b9e5a2e.tar.bz2
PowerPC64: Avoid useless work on R_PPC64_TPREL34
_bfd_elf_ppc_at_tprel_transform doesn't handle prefix instructions, and I'm not inclined to implement code editing for them. * elf64-ppc.c (ppc64_elf_relocate_section): Don't attempt tprel transform for R_PPC64_TPREL34.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 520804a..aa997bb 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -16657,7 +16657,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
case R_PPC64_TPREL16_HIGHERA:
case R_PPC64_TPREL16_HIGHEST:
case R_PPC64_TPREL16_HIGHESTA:
- case R_PPC64_TPREL34:
if (h != NULL
&& h->elf.root.type == bfd_link_hash_undefweak
&& h->elf.dynindx == -1)
@@ -16674,6 +16673,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
bfd_put_32 (input_bfd, insn, p);
break;
}
+ /* Fall through. */
+
+ case R_PPC64_TPREL34:
if (htab->elf.tls_sec != NULL)
addend -= htab->elf.tls_sec->vma + TP_OFFSET;
/* The TPREL16 relocs shouldn't really be used in shared