From 9d6ded02f6ff449048b89fcaa83792037a6d66a9 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 31 Mar 2010 07:53:40 +0000 Subject: [PATCH] * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized TPREL16_HI and TPREL16_HA insns. --- bfd/ChangeLog | 5 +++++ bfd/elf64-ppc.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bdefe2a7a73..172726c66ac 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2010-03-31 Alan Modra + + * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized + TPREL16_HI and TPREL16_HA insns. + 2010-03-31 Hans-Peter Nilsson PR ld/11458 diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 306c15e97a2..3259e2e7198 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -11569,6 +11569,18 @@ ppc64_elf_relocate_section (bfd *output_bfd, } break; + case R_PPC64_GOT_TPREL16_HI: + case R_PPC64_GOT_TPREL16_HA: + if (tls_mask != 0 + && (tls_mask & TLS_TPREL) == 0) + { + rel->r_offset -= d_offset; + bfd_put_32 (output_bfd, NOP, contents + rel->r_offset); + r_type = R_PPC64_NONE; + rel->r_info = ELF64_R_INFO (r_symndx, r_type); + } + break; + case R_PPC64_GOT_TPREL16_DS: case R_PPC64_GOT_TPREL16_LO_DS: if (tls_mask != 0 -- 2.30.2