* ppc64 tls code in elf32-ppc.c
@ 2003-03-07 1:09 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2003-03-07 1:09 UTC (permalink / raw)
To: binutils
Some PowerPC64 support code crept in. Harmless, but useless.
* elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
a tls_get_addr call.
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.70
diff -u -p -r1.70 elf32-ppc.c
--- bfd/elf32-ppc.c 6 Mar 2003 23:26:20 -0000 1.70
+++ bfd/elf32-ppc.c 7 Mar 2003 01:05:42 -0000
@@ -4524,7 +4524,7 @@ ppc_elf_relocate_section (output_bfd, in
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, in
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, in
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
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-07 1:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-07 1:09 ppc64 tls code in elf32-ppc.c Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).