diff options
author | Alan Modra <amodra@gmail.com> | 2008-06-05 00:30:09 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-06-05 00:30:09 +0000 |
commit | 7cfbafbcb4abd37b07dec657f5fe471530a45b48 (patch) | |
tree | 60da6eb9e2c90c86b1b92a5d9a98a2600450cbc2 /bfd | |
parent | b32ba390386129f1beb05d8233826c1d7ae4c27a (diff) | |
download | gdb-7cfbafbcb4abd37b07dec657f5fe471530a45b48.zip gdb-7cfbafbcb4abd37b07dec657f5fe471530a45b48.tar.gz gdb-7cfbafbcb4abd37b07dec657f5fe471530a45b48.tar.bz2 |
PR ld/6590
* elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c61360e..470e3a2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2008-06-05 Alan Modra <amodra@bigpond.net.au> + + PR ld/6590 + * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets. + 2008-06-04 Alan Modra <amodra@bigpond.net.au> * elf.c (ignore_section_sym): Don't test section sym value here. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 8a26c8d..06b1476 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -8708,6 +8708,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (r == NULL) return FALSE; r[0].r_offset = loc - stub_entry->stub_sec->contents; + if (bfd_big_endian (info->output_bfd)) + r[0].r_offset += 2; if (stub_entry->stub_type == ppc_stub_plt_branch_r2off) r[0].r_offset += 4; r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS); @@ -8829,6 +8831,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (r == NULL) return FALSE; r[0].r_offset = loc - stub_entry->stub_sec->contents; + if (bfd_big_endian (info->output_bfd)) + r[0].r_offset += 2; r[0].r_addend = dest; } p = build_plt_stub (htab->stub_bfd, loc, off, r); |