static struct bfd_hash_entry *
funcvec_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
static bfd_boolean
funcvec_hash_table_init
- PARAMS ((struct funcvec_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *)));
+ (struct funcvec_hash_table *, bfd *,
+ struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *));
static bfd_reloc_status_type special
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
static int select_reloc
- PARAMS ((reloc_howto_type *));
+ (reloc_howto_type *);
static void rtype2howto
- PARAMS ((arelent *, struct internal_reloc *));
+ (arelent *, struct internal_reloc *);
static void reloc_processing
- PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
+ (arelent *, struct internal_reloc *, asymbol **, bfd *, asection *);
static bfd_boolean h8300_symbol_address_p
- PARAMS ((bfd *, asection *, bfd_vma));
+ (bfd *, asection *, bfd_vma);
static int h8300_reloc16_estimate
- PARAMS ((bfd *, asection *, arelent *, unsigned int,
- struct bfd_link_info *));
+ (bfd *, asection *, arelent *, unsigned int,
+ struct bfd_link_info *);
static void h8300_reloc16_extra_cases
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
- bfd_byte *, unsigned int *, unsigned int *));
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+ bfd_byte *, unsigned int *, unsigned int *);
static bfd_boolean h8300_bfd_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
/* To lookup a value in the function vector hash table. */
#define funcvec_hash_lookup(table, string, create, copy) \
struct funcvec_hash_table *funcvec_hash_table;
};
-static struct bfd_link_hash_table *h8300_coff_link_hash_table_create
- PARAMS ((bfd *));
+static struct bfd_link_hash_table *h8300_coff_link_hash_table_create (bfd *);
/* Get the H8/300 COFF linker hash table from a link_info structure. */
a new entry is added to the funcvec hash table. */
static struct bfd_hash_entry *
-funcvec_hash_newfunc (entry, gen_table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *gen_table;
- const char *string;
+funcvec_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *gen_table,
+ const char *string)
{
struct funcvec_hash_entry *ret;
struct funcvec_hash_table *table;
/* Initialize the function vector hash table. */
static bfd_boolean
-funcvec_hash_table_init (table, abfd, newfunc)
- struct funcvec_hash_table *table;
- bfd *abfd;
- struct bfd_hash_entry *(*newfunc)
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
- const char *));
+funcvec_hash_table_init (struct funcvec_hash_table *table,
+ bfd *abfd,
+ struct bfd_hash_entry *(*newfunc)
+ (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *))
{
/* Initialize our local fields, then call the generic initialization
routine. */
without using static variables. */
static struct bfd_link_hash_table *
-h8300_coff_link_hash_table_create (abfd)
- bfd *abfd;
+h8300_coff_link_hash_table_create (bfd *abfd)
{
struct h8300_coff_link_hash_table *ret;
bfd_size_type amt = sizeof (struct h8300_coff_link_hash_table);
the addend until the final link. */
static bfd_reloc_status_type
-special (abfd, reloc_entry, symbol, data, input_section, output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+special (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ PTR data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd == (bfd *) NULL)
return bfd_reloc_continue;
dst->r_stuff[1] = 'C';
static int
-select_reloc (howto)
- reloc_howto_type *howto;
+select_reloc (reloc_howto_type *howto)
{
return howto->type;
}
/* Code to turn a r_type into a howto ptr, uses the above howto table. */
static void
-rtype2howto (internal, dst)
- arelent *internal;
- struct internal_reloc *dst;
+rtype2howto (arelent *internal, struct internal_reloc *dst)
{
switch (dst->r_type)
{
reloc_processing (relent, reloc, symbols, abfd, section)
static void
-reloc_processing (relent, reloc, symbols, abfd, section)
- arelent *relent;
- struct internal_reloc *reloc;
- asymbol **symbols;
- bfd *abfd;
- asection *section;
+reloc_processing (arelent *relent, struct internal_reloc *reloc,
+ asymbol **symbols, bfd *abfd, asection *section)
{
relent->address = reloc->r_vaddr;
rtype2howto (relent, reloc);
}
static bfd_boolean
-h8300_symbol_address_p (abfd, input_section, address)
- bfd *abfd;
- asection *input_section;
- bfd_vma address;
+h8300_symbol_address_p (bfd *abfd, asection *input_section, bfd_vma address)
{
asymbol **s;
in the howto table. This needs to be fixed. */
static int
-h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
- bfd *abfd;
- asection *input_section;
- arelent *reloc;
- unsigned int shrink;
- struct bfd_link_info *link_info;
+h8300_reloc16_estimate (bfd *abfd, asection *input_section, arelent *reloc,
+ unsigned int shrink, struct bfd_link_info *link_info)
{
bfd_vma value;
bfd_vma dot;
FIXME: Not all relocations check for overflow! */
static void
-h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
- dst_ptr)
- bfd *abfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- arelent *reloc;
- bfd_byte *data;
- unsigned int *src_ptr;
- unsigned int *dst_ptr;
+h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order, arelent *reloc,
+ bfd_byte *data, unsigned int *src_ptr,
+ unsigned int *dst_ptr)
{
unsigned int src_address = *src_ptr;
unsigned int dst_address = *dst_ptr;
selected static symbols to the bfd linker hash table. */
static bfd_boolean
-h8300_bfd_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
asection *sec;
struct funcvec_hash_table *funcvec_hash_table;
#include "elf/h8.h"
static reloc_howto_type *elf32_h8_reloc_type_lookup
- PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+ (bfd *abfd, bfd_reloc_code_real_type code);
static void elf32_h8_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
static void elf32_h8_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
static unsigned long elf32_h8_mach
- PARAMS ((flagword));
+ (flagword);
static void elf32_h8_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
+ (bfd *, bfd_boolean);
static bfd_boolean elf32_h8_object_p
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean elf32_h8_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_boolean elf32_h8_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
static bfd_boolean elf32_h8_relax_delete_bytes
- PARAMS ((bfd *, asection *, bfd_vma, int));
+ (bfd *, asection *, bfd_vma, int);
static bfd_boolean elf32_h8_symbol_address_p
- PARAMS ((bfd *, asection *, bfd_vma));
+ (bfd *, asection *, bfd_vma);
static bfd_byte *elf32_h8_get_relocated_section_contents
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, asymbol **));
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *, bfd_boolean, asymbol **);
static bfd_reloc_status_type elf32_h8_final_link_relocate
- PARAMS ((unsigned long, bfd *, bfd *, asection *,
- bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
- struct bfd_link_info *, asection *, int));
+ (unsigned long, bfd *, bfd *, asection *,
+ bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
+ struct bfd_link_info *, asection *, int);
static bfd_boolean elf32_h8_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- bfd_byte *, Elf_Internal_Rela *,
- Elf_Internal_Sym *, asection **));
+ (bfd *, struct bfd_link_info *, bfd *, asection *,
+ bfd_byte *, Elf_Internal_Rela *,
+ Elf_Internal_Sym *, asection **);
static bfd_reloc_status_type special
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
/* This does not include any relocation information, but should be
good enough for GDB or objdump to read the file. */
static reloc_howto_type *
-elf32_h8_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+elf32_h8_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
}
static void
-elf32_h8_info_to_howto (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc;
+elf32_h8_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc)
{
unsigned int r;
unsigned int i;
}
static void
-elf32_h8_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
+elf32_h8_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED)
{
unsigned int r;
When doing -r, we can't do any arithmetic for the pcrel stuff, because
we support relaxing on the H8/300 series chips. */
static bfd_reloc_status_type
-special (abfd, reloc_entry, symbol, data, input_section, output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry ATTRIBUTE_UNUSED;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+special (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ PTR data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd == (bfd *) NULL)
return bfd_reloc_continue;
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
-elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd,
- input_section, contents, offset, value,
- addend, info, sym_sec, is_local)
- unsigned long r_type;
- bfd *input_bfd;
- bfd *output_bfd ATTRIBUTE_UNUSED;
- asection *input_section ATTRIBUTE_UNUSED;
- bfd_byte *contents;
- bfd_vma offset;
- bfd_vma value;
- bfd_vma addend;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sym_sec ATTRIBUTE_UNUSED;
- int is_local ATTRIBUTE_UNUSED;
+elf32_h8_final_link_relocate (unsigned long r_type, bfd *input_bfd,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd_byte *contents, bfd_vma offset,
+ bfd_vma value, bfd_vma addend,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sym_sec ATTRIBUTE_UNUSED,
+ int is_local ATTRIBUTE_UNUSED)
{
bfd_byte *hit_data = contents + offset;
switch (r_type)
{
-
case R_H8_NONE:
return bfd_reloc_ok;
\f
/* Relocate an H8 ELF section. */
static bfd_boolean
-elf32_h8_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;
+elf32_h8_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)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
Examine that field and return the proper BFD machine type for
the object file. */
static unsigned long
-elf32_h8_mach (flags)
- flagword flags;
+elf32_h8_mach (flagword flags)
{
switch (flags & EF_H8_MACH)
{
into the flags field in the object file. */
static void
-elf32_h8_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+elf32_h8_final_write_processing (bfd *abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
{
unsigned long val;
record the encoded machine type found in the ELF flags. */
static bfd_boolean
-elf32_h8_object_p (abfd)
- bfd *abfd;
+elf32_h8_object_p (bfd *abfd)
{
bfd_default_set_arch_mach (abfd, bfd_arch_h8300,
elf32_h8_mach (elf_elfheader (abfd)->e_flags));
time is the architecture/machine information. */
static bfd_boolean
-elf32_h8_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+elf32_h8_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
mov.[bwl]:24/32 -> mov.[bwl]:16 2 bytes */
static bfd_boolean
-elf32_h8_relax_section (abfd, sec, link_info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *link_info;
- bfd_boolean *again;
+elf32_h8_relax_section (bfd *abfd, asection *sec,
+ struct bfd_link_info *link_info, bfd_boolean *again)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs;
/* Delete some bytes from a section while relaxing. */
static bfd_boolean
-elf32_h8_relax_delete_bytes (abfd, sec, addr, count)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
- int count;
+elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count)
{
Elf_Internal_Shdr *symtab_hdr;
unsigned int sec_shndx;
/* Return TRUE if a symbol exists at the given address, else return
FALSE. */
static bfd_boolean
-elf32_h8_symbol_address_p (abfd, sec, addr)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
+elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr)
{
Elf_Internal_Shdr *symtab_hdr;
unsigned int sec_shndx;
which uses elf32_h8_relocate_section. */
static bfd_byte *
-elf32_h8_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocatable, symbols)
- bfd *output_bfd;
- struct bfd_link_info *link_info;
- struct bfd_link_order *link_order;
- bfd_byte *data;
- bfd_boolean relocatable;
- asymbol **symbols;
+elf32_h8_get_relocated_section_contents (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bfd_boolean relocatable,
+ asymbol **symbols)
{
Elf_Internal_Shdr *symtab_hdr;
asection *input_section = link_order->u.indirect.section;