diff options
author | Alan Modra <amodra@gmail.com> | 2010-03-12 22:31:16 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-03-12 22:31:16 +0000 |
commit | 7b8f66752fd3b09c2da446067e069c0681d4380b (patch) | |
tree | 06797c44c1e9e29a90a29ad5f9a25fc046a676db | |
parent | 00ae8fef8883adef0630bd05a92d78f63cf0b4d1 (diff) | |
download | gdb-7b8f66752fd3b09c2da446067e069c0681d4380b.zip gdb-7b8f66752fd3b09c2da446067e069c0681d4380b.tar.gz gdb-7b8f66752fd3b09c2da446067e069c0681d4380b.tar.bz2 |
PR ld/11375
* elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
function descriptor symbol if there is one, not just for plt stubs.
(ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 201e132..27a3327 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2010-03-13 Alan Modra <amodra@gmail.com> + + PR ld/11375 + * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the + function descriptor symbol if there is one, not just for plt stubs. + (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls. + 2010-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index ffd37dd..5696838 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -8976,13 +8976,15 @@ ppc_type_of_stub (asection *input_sec, struct ppc_link_hash_entry *fdh = h; if (h->oh != NULL && h->oh->is_func_descriptor) - fdh = ppc_follow_link (h->oh); + { + fdh = ppc_follow_link (h->oh); + *hash = fdh; + } for (ent = fdh->elf.plt.plist; ent != NULL; ent = ent->next) if (ent->addend == rel->r_addend && ent->plt.offset != (bfd_vma) -1) { - *hash = fdh; *plt_ent = ent; return ppc_stub_plt_call; } @@ -11933,7 +11935,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, >= 2 * max_br_offset) && r_type != R_PPC64_ADDR14_BRTAKEN && r_type != R_PPC64_ADDR14_BRNTAKEN) - stub_entry = ppc_get_stub_entry (input_section, sec, h, rel, + stub_entry = ppc_get_stub_entry (input_section, sec, fdh, rel, htab); if (stub_entry != NULL) |