- enum elf_ppc64_reloc_type r_type;
- unsigned long r_symndx;
- struct elf_link_hash_entry *h;
- struct ppc_link_hash_entry *eh;
- Elf_Internal_Sym *sym;
- asection *sym_sec;
- struct _opd_sec_data *opd;
- bfd_vma sym_value;
- bfd_vma dest;
-
- r_type = ELF64_R_TYPE (rel->r_info);
- if (r_type != R_PPC64_REL24
- && r_type != R_PPC64_REL14
- && r_type != R_PPC64_REL14_BRTAKEN
- && r_type != R_PPC64_REL14_BRNTAKEN)
- continue;
-
- r_symndx = ELF64_R_SYM (rel->r_info);
- if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms, r_symndx,
- isec->owner))
- {
- ret = -1;
- break;
- }
-
- /* Calls to dynamic lib functions go through a plt call stub
- that uses r2. */
- eh = (struct ppc_link_hash_entry *) h;
- if (eh != NULL
- && (eh->elf.plt.plist != NULL
- || (eh->oh != NULL
- && ppc_follow_link (eh->oh)->elf.plt.plist != NULL)))
- {
- ret = 1;
- break;
- }
+ Elf_Internal_Rela *relstart, *rel;
+ Elf_Internal_Sym *local_syms;
+ struct ppc_link_hash_table *htab;