diff options
author | Alan Modra <amodra@gmail.com> | 2009-12-03 08:31:29 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-12-03 08:31:29 +0000 |
commit | f58d5a2ddfb78a450f1bd6edc4c8d105b3ebc0f8 (patch) | |
tree | fcd534b53b8abade848e142c794735be88e85a67 /bfd/elf64-ppc.c | |
parent | 3aec4f9c2fe16765755d252ffe05aff9eb10bf8b (diff) | |
download | gdb-f58d5a2ddfb78a450f1bd6edc4c8d105b3ebc0f8.zip gdb-f58d5a2ddfb78a450f1bd6edc4c8d105b3ebc0f8.tar.gz gdb-f58d5a2ddfb78a450f1bd6edc4c8d105b3ebc0f8.tar.bz2 |
PR ld/11047
* elf32-ppc.c (ppc_elf_relocate_section): Delete __tls_get_addr
symbol reference from relocs belonging to calls that are
optimized away.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index e748a41..94f89c5 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -11102,8 +11102,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, insn1 |= 58 << 26; /* ld */ insn2 = 0x7c636a14; /* add 3,3,13 */ if (offset != (bfd_vma) -1) - rel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (rel[1].r_info), - R_PPC64_NONE); + rel[1].r_info = ELF64_R_INFO (STN_UNDEF, R_PPC64_NONE); if ((tls_mask & TLS_EXPLICIT) == 0) r_type = (((r_type - (R_PPC64_GOT_TLSGD16 & 3)) & 3) + R_PPC64_GOT_TPREL16_DS); @@ -11202,8 +11201,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, rel->r_info = ELF64_R_INFO (r_symndx, r_type); /* Zap the reloc on the _tls_get_addr call too. */ BFD_ASSERT (offset == rel[1].r_offset); - rel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (rel[1].r_info), - R_PPC64_NONE); + rel[1].r_info = ELF64_R_INFO (STN_UNDEF, R_PPC64_NONE); insn3 = bfd_get_32 (output_bfd, contents + offset + 4); if (insn3 == NOP @@ -11248,8 +11246,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, rel->r_offset = offset + d_offset; /* Zap the reloc on the _tls_get_addr call too. */ BFD_ASSERT (offset == rel[1].r_offset); - rel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (rel[1].r_info), - R_PPC64_NONE); + rel[1].r_info = ELF64_R_INFO (STN_UNDEF, R_PPC64_NONE); insn2 = 0x38630000; /* addi 3,3,0 */ insn3 = bfd_get_32 (output_bfd, contents + offset + 4); |