#include "elf/m68k.h"
#include "opcode/m68k.h"
-static reloc_howto_type *reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void rtype_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static struct bfd_hash_entry *elf_m68k_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table *elf_m68k_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_boolean elf_m68k_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean elf_m68k_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean elf_m68k_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_m68k_discard_copies
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean elf_m68k_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_boolean elf_m68k_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean elf_m68k_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static bfd_boolean elf32_m68k_set_private_flags
- PARAMS ((bfd *, flagword));
-static bfd_boolean elf32_m68k_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean elf32_m68k_print_private_bfd_data
- PARAMS ((bfd *, PTR));
-static enum elf_reloc_type_class elf32_m68k_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-
-static reloc_howto_type howto_table[] = {
+static bfd_boolean
+elf_m68k_discard_copies (struct elf_link_hash_entry *, void *);
+
+static reloc_howto_type howto_table[] =
+{
HOWTO(R_68K_NONE, 0, 0, 0, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_NONE", FALSE, 0, 0x00000000,FALSE),
HOWTO(R_68K_32, 0, 2,32, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_32", FALSE, 0, 0xffffffff,FALSE),
HOWTO(R_68K_16, 0, 1,16, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_16", FALSE, 0, 0x0000ffff,FALSE),
};
static reloc_howto_type *
-reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
for (i = 0; i < sizeof (reloc_map) / sizeof (reloc_map[0]); i++)
/* Keep m68k-specific flags in the ELF header. */
static bfd_boolean
-elf32_m68k_set_private_flags (abfd, flags)
- bfd *abfd;
- flagword flags;
+elf32_m68k_set_private_flags (bfd *abfd, flagword flags)
{
elf_elfheader (abfd)->e_flags = flags;
elf_flags_init (abfd) = TRUE;
/* Merge backend specific data from an object file to the output
object file when linking. */
static bfd_boolean
-elf32_m68k_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+elf32_m68k_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
flagword out_flags;
flagword in_flags;
table. */
static bfd_boolean
-elf_m68k_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf_m68k_check_relocs (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr;
understand. */
static bfd_boolean
-elf_m68k_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
struct elf_m68k_link_hash_table *htab;
bfd *dynobj;
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-elf_m68k_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *s;
if (info->shared)
elf_link_hash_traverse (elf_hash_table (info),
elf_m68k_discard_copies,
- (PTR) info);
+ info);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
case. */
static bfd_boolean
-elf_m68k_discard_copies (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+elf_m68k_discard_copies (struct elf_link_hash_entry *h,
+ void * inf)
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
struct elf_m68k_pcrel_relocs_copied *s;
/* Relocate an M68K ELF section. */
static bfd_boolean
-elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf_m68k_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr;
dynamic sections here. */
static bfd_boolean
-elf_m68k_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf_m68k_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
bfd *dynobj;
/* Finish up the dynamic sections. */
static bfd_boolean
-elf_m68k_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+elf_m68k_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
{
bfd *dynobj;
asection *sgot;
/* Get a copy of the native relocations. */
internal_relocs = (_bfd_elf_link_read_relocs
- (abfd, datasec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ (abfd, datasec, NULL, (Elf_Internal_Rela *) NULL,
info->keep_memory));
if (internal_relocs == NULL)
goto error_return;
}
static enum elf_reloc_type_class
-elf32_m68k_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+elf32_m68k_reloc_type_class (const Elf_Internal_Rela *rela)
{
switch ((int) ELF32_R_TYPE (rela->r_info))
{