PARAMS ((bfd *));
static boolean elf64_hppa_section_from_shdr
- PARAMS ((bfd *, Elf64_Internal_Shdr *, const char *));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static void elf64_hppa_post_process_headers
PARAMS ((bfd *, struct bfd_link_info *));
static boolean
elf64_hppa_section_from_shdr (abfd, hdr, name)
bfd *abfd;
- Elf64_Internal_Shdr *hdr;
+ Elf_Internal_Shdr *hdr;
const char *name;
{
asection *newsect;
{
bfd_vma value;
Elf_Internal_Rela rel;
+ bfd_byte *loc;
BFD_ASSERT (splt != NULL && spltrel != NULL)
rel.r_info = ELF64_R_INFO (h->dynindx, R_PARISC_IPLT);
rel.r_addend = 0;
- bfd_elf64_swap_reloca_out (splt->output_section->owner, &rel,
- (((Elf64_External_Rela *)
- spltrel->contents)
- + spltrel->reloc_count));
- spltrel->reloc_count++;
+ loc = spltrel->contents;
+ loc += spltrel->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (splt->output_section->owner, &rel, loc);
}
/* Initialize an external call stub entry if requested. */
had their address taken). */
if (info->shared && dyn_h && dyn_h->want_opd)
{
- Elf64_Internal_Rela rel;
+ Elf_Internal_Rela rel;
+ bfd_byte *loc;
int dynindx;
/* We may need to do a relocation against a local symbol, in
rel.r_addend = 0;
rel.r_info = ELF64_R_INFO (dynindx, R_PARISC_EPLT);
- bfd_elf64_swap_reloca_out (sopd->output_section->owner, &rel,
- (((Elf64_External_Rela *)
- sopdrel->contents)
- + sopdrel->reloc_count));
- sopdrel->reloc_count++;
+ loc = sopdrel->contents;
+ loc += sopdrel->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (sopd->output_section->owner, &rel, loc);
}
return true;
}
if (dyn_h->want_dlt
&& (elf64_hppa_dynamic_symbol_p (dyn_h->h, info) || info->shared))
{
- Elf64_Internal_Rela rel;
+ Elf_Internal_Rela rel;
+ bfd_byte *loc;
int dynindx;
/* We may need to do a relocation against a local symbol, in
rel.r_info = ELF64_R_INFO (dynindx, R_PARISC_DIR64);
rel.r_addend = 0;
- bfd_elf64_swap_reloca_out (sdlt->output_section->owner, &rel,
- (((Elf64_External_Rela *)
- sdltrel->contents)
- + sdltrel->reloc_count));
- sdltrel->reloc_count++;
+ loc = sdltrel->contents;
+ loc += sdltrel->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (sdlt->output_section->owner, &rel, loc);
}
return true;
}
for (rent = dyn_h->reloc_entries; rent; rent = rent->next)
{
- Elf64_Internal_Rela rel;
+ Elf_Internal_Rela rel;
+ bfd_byte *loc;
/* Allocate one iff we are building a shared library, the relocation
isn't a R_PARISC_FPTR64, or we don't want an opd entry. */
rel.r_info = ELF64_R_INFO (dynindx, rent->type);
+ loc = hppa_info->other_rel_sec->contents;
+ loc += (hppa_info->other_rel_sec->reloc_count++
+ * sizeof (Elf64_External_Rela));
bfd_elf64_swap_reloca_out (hppa_info->other_rel_sec->output_section->owner,
- &rel,
- (((Elf64_External_Rela *)
- hppa_info->other_rel_sec->contents)
- + hppa_info->other_rel_sec->reloc_count));
- hppa_info->other_rel_sec->reloc_count++;
+ &rel, loc);
}
}
bfd_elf64_slurp_symbol_table,
bfd_elf64_swap_dyn_in,
bfd_elf64_swap_dyn_out,
- NULL,
- NULL,
- NULL,
- NULL
+ bfd_elf64_swap_reloc_in,
+ bfd_elf64_swap_reloc_out,
+ bfd_elf64_swap_reloca_in,
+ bfd_elf64_swap_reloca_out
};
#define TARGET_BIG_SYM bfd_elf64_hppa_vec