aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-03-07 01:09:01 +0000
committerAlan Modra <amodra@gmail.com>2003-03-07 01:09:01 +0000
commit87d243f1ce6736ee9b540772a6f9d61fd7146204 (patch)
tree7d199159786973212f954ec7d08a7ec93cec07a9
parentc4f718a3b98dc913f5ab02ca11ad4a67b6a7170c (diff)
downloadgdb-87d243f1ce6736ee9b540772a6f9d61fd7146204.zip
gdb-87d243f1ce6736ee9b540772a6f9d61fd7146204.tar.gz
gdb-87d243f1ce6736ee9b540772a6f9d61fd7146204.tar.bz2
* elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
a tls_get_addr call.
-rw-r--r--bfd/ChangeLog3
-rw-r--r--bfd/elf32-ppc.c12
2 files changed, 4 insertions, 11 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fc7bfb9..aca51b8 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,8 @@
2003-03-07 Alan Modra <amodra@bigpond.net.au>
+ * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
+ a tls_get_addr call.
+
* elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
(ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
ELF_LINK_NON_GOT_REF from weakdef.
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index d51c66c..b7b09dc 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4524,7 +4524,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
enum elf_ppc_reloc_type r_type2;
unsigned long r_symndx2;
struct elf_link_hash_entry *h2;
- bfd_vma insn1, insn2, insn3;
+ bfd_vma insn1, insn2;
bfd_vma offset;
/* The next instruction should be a call to
@@ -4551,8 +4551,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
offset = rel[1].r_offset;
insn1 = bfd_get_32 (output_bfd,
contents + rel->r_offset - 2);
- insn3 = bfd_get_32 (output_bfd,
- contents + offset + 4);
if ((tls_mask & tls_gd) != 0)
{
/* IE */
@@ -4582,16 +4580,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
R_PPC_TPREL16_LO);
rel[1].r_offset += 2;
}
- if (insn3 == NOP
- || insn3 == CROR_151515 || insn3 == CROR_313131)
- {
- insn3 = insn2;
- insn2 = NOP;
- rel[1].r_offset += 4;
- }
bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - 2);
bfd_put_32 (output_bfd, insn2, contents + offset);
- bfd_put_32 (output_bfd, insn3, contents + offset + 4);
if (tls_gd == 0)
{
/* We changed the symbol on an LD reloc. Start over