aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-08-06 07:29:31 +0000
committerAlan Modra <amodra@gmail.com>2008-08-06 07:29:31 +0000
commite7d92e2ec6e1a0bc2390403bdb098583c6484e6f (patch)
tree314fbce199ae3b81a29261927b91a8d4773c30b5 /bfd
parentef0d312a8fff6d685cb8dda6d54664d45cd0d02f (diff)
downloadbinutils-e7d92e2ec6e1a0bc2390403bdb098583c6484e6f.zip
binutils-e7d92e2ec6e1a0bc2390403bdb098583c6484e6f.tar.gz
binutils-e7d92e2ec6e1a0bc2390403bdb098583c6484e6f.tar.bz2
* elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
(ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-ppc.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7b82767..1bcbc40 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
+ (ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.
+
2008-08-05 Alan Modra <amodra@bigpond.net.au>
Jaka Močnik <jaka@xlab.si>
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 22b90b2..a93a706 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -5797,6 +5797,8 @@ ppc_elf_relax_section (bfd *abfd,
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
stub_rtype);
irel->r_offset = trampoff + insn_offset;
+ if (r_type == R_PPC_PLTREL24)
+ irel->r_addend = 0;
/* Record the fixup so we don't do it again this section. */
f = bfd_malloc (sizeof (*f));
@@ -5879,7 +5881,7 @@ ppc_elf_relax_section (bfd *abfd,
isec->size = (isec->size + 3) & (bfd_vma) -4;
/* Branch around the trampolines. */
- val = trampoff - isec->size + 0x48000000;
+ val = B + trampoff - isec->size;
dest = contents + isec->size;
isec->size = trampoff;
bfd_put_32 (abfd, val, dest);
@@ -6911,7 +6913,6 @@ ppc_elf_relocate_section (bfd *output_bfd,
relocation = (htab->plt->output_section->vma
+ htab->plt->output_offset
+ ent->plt.offset);
- addend = 0;
}
if (r_type == R_PPC_RELAX32_PLT)
goto relax32;