* elf32-sh64-com.c: Likewise.
* elf32-sh64.c: Likewise.
* elf32-sh64.h: Likewise.
* elf64-sh64.c: Likewise.
+2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c: Convert to C90. Replace PTR with void *.
+ * elf32-sh64-com.c: Likewise.
+ * elf32-sh64.c: Likewise.
+ * elf32-sh64.h: Likewise.
+ * elf64-sh64.c: Likewise.
+
2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
#include "elf/sh.h"
static bfd_reloc_status_type sh_elf_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type sh_elf_ignore_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *sh_elf_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+ (bfd *, bfd_reloc_code_real_type);
static void sh_elf_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
static bfd_boolean sh_elf_set_private_flags
- PARAMS ((bfd *, flagword));
+ (bfd *, flagword);
static bfd_boolean sh_elf_copy_private_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_boolean sh_elf_merge_private_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_boolean sh_elf_set_mach_from_flags
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean sh_elf_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
static bfd_boolean sh_elf_relax_delete_bytes
- PARAMS ((bfd *, asection *, bfd_vma, int));
+ (bfd *, asection *, bfd_vma, int);
static bfd_boolean sh_elf_align_loads
- PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *));
+ (bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *);
static bfd_boolean sh_elf_swap_insns
- PARAMS ((bfd *, asection *, PTR, bfd_byte *, bfd_vma));
+ (bfd *, asection *, void *, bfd_byte *, bfd_vma);
static bfd_boolean sh_elf_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_byte *sh_elf_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 void sh_elf_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
- struct elf_link_hash_entry *));
+ (struct elf_backend_data *, struct elf_link_hash_entry *,
+ struct elf_link_hash_entry *);
static int sh_elf_optimized_tls_reloc
- PARAMS ((struct bfd_link_info *, int, int));
+ (struct bfd_link_info *, int, int);
static bfd_boolean sh_elf_mkobject
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean sh_elf_object_p
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean sh_elf_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
+ (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
static struct bfd_hash_entry *sh_elf_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
static struct bfd_link_hash_table *sh_elf_link_hash_table_create
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean sh_elf_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+ (struct bfd_link_info *, struct elf_link_hash_entry *);
static bfd_boolean sh_elf_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static bfd_boolean sh_elf_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
+ (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *);
static bfd_boolean sh_elf_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static bfd_reloc_status_type sh_elf_reloc_loop
- PARAMS ((int, bfd *, asection *, bfd_byte *, bfd_vma, asection *,
- bfd_vma, bfd_vma));
+ (int, bfd *, asection *, bfd_byte *, bfd_vma, asection *, bfd_vma,
+ bfd_vma);
static bfd_boolean create_got_section
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static bfd_boolean sh_elf_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static bfd_vma dtpoff_base
- PARAMS ((struct bfd_link_info *));
+ (struct bfd_link_info *);
static bfd_vma tpoff
- PARAMS ((struct bfd_link_info *, bfd_vma));
+ (struct bfd_link_info *, bfd_vma);
static asection * sh_elf_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
static bfd_boolean sh_elf_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
+ (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
+ (struct elf_link_hash_entry *, void *);
static bfd_boolean readonly_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
+ (struct elf_link_hash_entry *, void *);
static enum elf_reloc_type_class sh_elf_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
+ (const Elf_Internal_Rela *);
#ifdef INCLUDE_SHMEDIA
-inline static void movi_shori_putval PARAMS ((bfd *, unsigned long, char *));
+inline static void movi_shori_putval (bfd *, unsigned long, char *);
#endif
static bfd_boolean elf32_shlin_grok_prstatus
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+ (bfd *abfd, Elf_Internal_Note *note);
static bfd_boolean elf32_shlin_grok_psinfo
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+ (bfd *abfd, Elf_Internal_Note *note);
/* The name of the dynamic interpreter. This is put in the .interp
section. */
};
static bfd_reloc_status_type
-sh_elf_reloc_loop (r_type, input_bfd, input_section, contents, addr,
- symbol_section, start, end)
- int r_type ATTRIBUTE_UNUSED;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- bfd_vma addr;
- asection *symbol_section;
- bfd_vma start, end;
+sh_elf_reloc_loop (int r_type ATTRIBUTE_UNUSED, bfd *input_bfd,
+ asection *input_section, bfd_byte *contents,
+ bfd_vma addr, asection *symbol_section,
+ bfd_vma start, bfd_vma end)
{
static bfd_vma last_addr;
static asection *last_symbol_section;
function, and is almost certainly incorrect for other ELF targets. */
static bfd_reloc_status_type
-sh_elf_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+sh_elf_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol_in,
+ void *data, asection *input_section, bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
unsigned long insn;
bfd_vma sym_value;
which the linker should otherwise ignore. */
static bfd_reloc_status_type
-sh_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+sh_elf_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void *data ATTRIBUTE_UNUSED, asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != NULL)
reloc_entry->address += input_section->output_offset;
corresponding SH ELf reloc. */
static reloc_howto_type *
-sh_elf_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+sh_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
/* Given an ELF reloc, fill in the howto field of a relent. */
static void
-sh_elf_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+sh_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r;
they come from enum elf_sh_reloc_type in include/elf/sh.h. */
static bfd_boolean
-sh_elf_relax_section (abfd, sec, link_info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *link_info;
- bfd_boolean *again;
+sh_elf_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;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
internal_relocs = (_bfd_elf_link_read_relocs
- (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ (abfd, sec, NULL, (Elf_Internal_Rela *) NULL,
link_info->keep_memory));
if (internal_relocs == NULL)
goto error_return;
in coff-sh.c. */
static bfd_boolean
-sh_elf_relax_delete_bytes (abfd, sec, addr, count)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
- int count;
+sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
+ int count)
{
Elf_Internal_Shdr *symtab_hdr;
unsigned int sec_shndx;
FALSE, we should free them, if we are permitted to, when we
leave sh_coff_relax_section. */
internal_relocs = (_bfd_elf_link_read_relocs
- (abfd, o, (PTR) NULL, (Elf_Internal_Rela *) NULL,
- TRUE));
+ (abfd, o, NULL, (Elf_Internal_Rela *) NULL, TRUE));
if (internal_relocs == NULL)
return FALSE;
boundaries. This is like sh_align_loads in coff-sh.c. */
static bfd_boolean
-sh_elf_align_loads (abfd, sec, internal_relocs, contents, pswapped)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
- Elf_Internal_Rela *internal_relocs;
- bfd_byte *contents ATTRIBUTE_UNUSED;
- bfd_boolean *pswapped;
+sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
+ Elf_Internal_Rela *internal_relocs,
+ bfd_byte *contents ATTRIBUTE_UNUSED,
+ bfd_boolean *pswapped)
{
Elf_Internal_Rela *irel, *irelend;
bfd_vma *labels = NULL;
stop = sec->_cooked_size;
if (! _bfd_sh_align_load_span (abfd, sec, contents, sh_elf_swap_insns,
- (PTR) internal_relocs, &label,
+ internal_relocs, &label,
label_end, start, stop, pswapped))
goto error_return;
}
/* Swap two SH instructions. This is like sh_swap_insns in coff-sh.c. */
static bfd_boolean
-sh_elf_swap_insns (abfd, sec, relocs, contents, addr)
- bfd *abfd;
- asection *sec;
- PTR relocs;
- bfd_byte *contents;
- bfd_vma addr;
+sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
+ bfd_byte *contents, bfd_vma addr)
{
Elf_Internal_Rela *internal_relocs = (Elf_Internal_Rela *) relocs;
unsigned short i1, i2;
#define elf_sh_plt_reloc_offset(info) (info->shared ? 52 : 44)
inline static void
-movi_shori_putval (output_bfd, value, addr)
- bfd *output_bfd;
- unsigned long value;
- char *addr;
+movi_shori_putval (bfd *output_bfd, unsigned long value, char *addr)
{
bfd_put_32 (output_bfd,
bfd_get_32 (output_bfd, addr)
as the specific tdata. */
static bfd_boolean
-sh_elf_mkobject (abfd)
- bfd *abfd;
+sh_elf_mkobject (bfd *abfd)
{
bfd_size_type amt = sizeof (struct sh_elf_obj_tdata);
abfd->tdata.any = bfd_zalloc (abfd, amt);
#define sh_elf_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
(info)))
/* Get the sh ELF linker hash table from a link_info structure. */
/* Create an entry in an sh ELF linker hash table. */
static struct bfd_hash_entry *
-sh_elf_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+sh_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct elf_sh_link_hash_entry *ret =
(struct elf_sh_link_hash_entry *) entry;
/* Create an sh ELF linker hash table. */
static struct bfd_link_hash_table *
-sh_elf_link_hash_table_create (abfd)
- bfd *abfd;
+sh_elf_link_hash_table_create (bfd *abfd)
{
struct elf_sh_link_hash_table *ret;
bfd_size_type amt = sizeof (struct elf_sh_link_hash_table);
shortcuts to them in our hash table. */
static bfd_boolean
-create_got_section (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
/* Create dynamic sections when linking against a dynamic object. */
static bfd_boolean
-sh_elf_create_dynamic_sections (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
flagword flags, pltflags;
understand. */
static bfd_boolean
-sh_elf_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
struct elf_sh_link_hash_table *htab;
struct elf_sh_link_hash_entry *eh;
dynamic relocs. */
static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct elf_sh_link_hash_table *htab;
/* Find any dynamic relocs that apply to read-only sections. */
static bfd_boolean
-readonly_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct elf_sh_link_hash_entry *eh;
struct elf_sh_dyn_relocs *p;
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-sh_elf_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
bfd *dynobj;
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
- elf_link_hash_traverse (&htab->root, allocate_dynrelocs, (PTR) info);
+ elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info);
/* We now have determined the sizes of the various dynamic sections.
Allocate memory for them. */
/* If any dynamic relocs apply to a read-only section,
then we need a DT_TEXTREL entry. */
if ((info->flags & DF_TEXTREL) == 0)
- elf_link_hash_traverse (&htab->root, readonly_dynrelocs,
- (PTR) info);
+ elf_link_hash_traverse (&htab->root, readonly_dynrelocs, info);
if ((info->flags & DF_TEXTREL) != 0)
{
/* Relocate an SH ELF section. */
static bfd_boolean
-sh_elf_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;
+sh_elf_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)
{
struct elf_sh_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
which uses sh_elf_relocate_section. */
static bfd_byte *
-sh_elf_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;
+sh_elf_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;
bfd_size_type amt;
internal_relocs = (_bfd_elf_link_read_relocs
- (input_bfd, input_section, (PTR) NULL,
+ (input_bfd, input_section, NULL,
(Elf_Internal_Rela *) NULL, FALSE));
if (internal_relocs == NULL)
goto error_return;
This is PT_TLS segment p_vaddr. */
static bfd_vma
-dtpoff_base (info)
- struct bfd_link_info *info;
+dtpoff_base (struct bfd_link_info *info)
{
/* If tls_segment is NULL, we should have signalled an error already. */
if (elf_hash_table (info)->tls_segment == NULL)
/* Return the relocation value for R_SH_TLS_TPOFF32.. */
static bfd_vma
-tpoff (info, address)
- struct bfd_link_info *info;
- bfd_vma address;
+tpoff (struct bfd_link_info *info, bfd_vma address)
{
/* If tls_segment is NULL, we should have signalled an error already. */
if (elf_hash_table (info)->tls_segment == NULL)
}
static asection *
-sh_elf_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+sh_elf_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
{
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-sh_elf_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+sh_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-sh_elf_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
- struct elf_link_hash_entry *dir, *ind;
+sh_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct elf_sh_link_hash_entry *edir, *eind;
#ifdef INCLUDE_SHMEDIA
}
static int
-sh_elf_optimized_tls_reloc (info, r_type, is_local)
- struct bfd_link_info *info;
- int r_type;
- int is_local;
+sh_elf_optimized_tls_reloc (struct bfd_link_info *info, int r_type,
+ int is_local)
{
if (info->shared)
return r_type;
virtual table relocs for gc. */
static bfd_boolean
-sh_elf_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
+ const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
#ifndef sh_elf_set_mach_from_flags
static bfd_boolean
-sh_elf_set_mach_from_flags (abfd)
- bfd *abfd;
+sh_elf_set_mach_from_flags (bfd *abfd)
{
flagword flags = elf_elfheader (abfd)->e_flags;
/* Function to keep SH specific file flags. */
static bfd_boolean
-sh_elf_set_private_flags (abfd, flags)
- bfd *abfd;
- flagword flags;
+sh_elf_set_private_flags (bfd *abfd, flagword flags)
{
BFD_ASSERT (! elf_flags_init (abfd)
|| elf_elfheader (abfd)->e_flags == flags);
/* Copy backend specific data from one object module to another */
static bfd_boolean
-sh_elf_copy_private_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
+sh_elf_copy_private_data (bfd * ibfd, bfd * obfd)
{
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
together, and for linking sh-dsp with sh3e / sh4 objects. */
static bfd_boolean
-sh_elf_merge_private_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
{
flagword old_flags, new_flags;
here. */
static bfd_boolean
-sh_elf_object_p (abfd)
- bfd *abfd;
+sh_elf_object_p (bfd *abfd)
{
struct sh_elf_obj_tdata *new_tdata;
bfd_size_type amt = sizeof (struct sh_elf_obj_tdata);
dynamic sections here. */
static bfd_boolean
-sh_elf_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;
+sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
struct elf_sh_link_hash_table *htab;
/* Finish up the dynamic sections. */
static bfd_boolean
-sh_elf_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
asection *sgot;
}
static enum elf_reloc_type_class
-sh_elf_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+sh_elf_reloc_type_class (const Elf_Internal_Rela *rela)
{
switch ((int) ELF32_R_TYPE (rela->r_info))
{
/* Support for Linux core dump NOTE sections. */
static bfd_boolean
-elf32_shlin_grok_prstatus (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
+elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
unsigned int raw_size;
}
static bfd_boolean
-elf32_shlin_grok_psinfo (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
+elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
{
switch (note->descsz)
{
#include "../opcodes/sh64-opc.h"
static bfd_boolean sh64_address_in_cranges
- PARAMS ((asection *cranges, bfd_vma, sh64_elf_crange *));
+ (asection *cranges, bfd_vma, sh64_elf_crange *);
/* Ordering functions of a crange, for the qsort and bsearch calls and for
different endianness. */
int
-_bfd_sh64_crange_qsort_cmpb (p1, p2)
- const PTR p1;
- const PTR p2;
+_bfd_sh64_crange_qsort_cmpb (const void *p1, const void *p2)
{
bfd_vma a1 = bfd_getb32 (p1);
bfd_vma a2 = bfd_getb32 (p2);
}
int
-_bfd_sh64_crange_qsort_cmpl (p1, p2)
- const PTR p1;
- const PTR p2;
+_bfd_sh64_crange_qsort_cmpl (const void *p1, const void *p2)
{
bfd_vma a1 = (bfd_vma) bfd_getl32 (p1);
bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
}
int
-_bfd_sh64_crange_bsearch_cmpb (p1, p2)
- const PTR p1;
- const PTR p2;
+_bfd_sh64_crange_bsearch_cmpb (const void *p1, const void *p2)
{
bfd_vma a1 = *(bfd_vma *) p1;
bfd_vma a2 = (bfd_vma) bfd_getb32 (p2);
}
int
-_bfd_sh64_crange_bsearch_cmpl (p1, p2)
- const PTR p1;
- const PTR p2;
+_bfd_sh64_crange_bsearch_cmpl (const void *p1, const void *p2)
{
bfd_vma a1 = *(bfd_vma *) p1;
bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
filled into RANGEP if non-NULL. */
static bfd_boolean
-sh64_address_in_cranges (cranges, addr, rangep)
- asection *cranges;
- bfd_vma addr;
- sh64_elf_crange *rangep;
+sh64_address_in_cranges (asection *cranges, bfd_vma addr,
+ sh64_elf_crange *rangep)
{
bfd_byte *cranges_contents;
bfd_byte *found_rangep;
*RANGEP if it's non-NULL. */
enum sh64_elf_cr_type
-sh64_get_contents_type (sec, addr, rangep)
- asection *sec;
- bfd_vma addr;
- sh64_elf_crange *rangep;
+sh64_get_contents_type (asection *sec, bfd_vma addr, sh64_elf_crange *rangep)
{
asection *cranges;
/* This is a simpler exported interface for the benefit of gdb et al. */
bfd_boolean
-sh64_address_is_shmedia (sec, addr)
- asection *sec;
- bfd_vma addr;
+sh64_address_is_shmedia (asection *sec, bfd_vma addr)
{
sh64_elf_crange dummy;
return sh64_get_contents_type (sec, addr, &dummy) == CRT_SH5_ISA32;
};
static bfd_boolean sh64_elf_new_section_hook
- PARAMS ((bfd *, asection *));
+ (bfd *, asection *);
static bfd_boolean sh64_elf_copy_private_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_boolean sh64_elf_merge_private_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_boolean sh64_elf_fake_sections
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
+ (bfd *, Elf_Internal_Shdr *, asection *);
static bfd_boolean sh64_elf_set_private_flags
- PARAMS ((bfd *, flagword));
+ (bfd *, flagword);
static bfd_boolean sh64_elf_set_mach_from_flags
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean shmedia_prepare_reloc
- PARAMS ((struct bfd_link_info *, bfd *, asection *,
- bfd_byte *, const Elf_Internal_Rela *, bfd_vma *));
+ (struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ const Elf_Internal_Rela *, bfd_vma *);
static int sh64_elf_get_symbol_type
- PARAMS ((Elf_Internal_Sym *, int));
+ (Elf_Internal_Sym *, int);
static bfd_boolean sh64_elf_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
+ (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, const char **,
+ flagword *, asection **, bfd_vma *);
static bfd_boolean sh64_elf_link_output_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
- asection *));
+ (bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+ asection *);
static bfd_boolean sh64_backend_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
+ (bfd *, Elf_Internal_Shdr *, const char *);
static void sh64_elf_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
+ (bfd *, bfd_boolean);
static bfd_boolean sh64_bfd_elf_copy_private_section_data
- PARAMS ((bfd *, asection *, bfd *, asection *));
+ (bfd *, asection *, bfd *, asection *);
static void sh64_find_section_for_address
- PARAMS ((bfd *, asection *, PTR));
+ (bfd *, asection *, void *);
/* Let elf32-sh.c handle the "bfd_" definitions, so we only have to
intrude with an #ifndef around the function definition. */
/* Tack some extra info on struct bfd_elf_section_data. */
static bfd_boolean
-sh64_elf_new_section_hook (abfd, sec)
- bfd *abfd;
- asection *sec;
+sh64_elf_new_section_hook (bfd *abfd, asection *sec)
{
struct _sh64_elf_section_data *sdata;
bfd_size_type amt = sizeof (*sdata);
sdata = (struct _sh64_elf_section_data *) bfd_zalloc (abfd, amt);
if (sdata == NULL)
return FALSE;
- sec->used_by_bfd = (PTR) sdata;
+ sec->used_by_bfd = sdata;
return _bfd_elf_new_section_hook (abfd, sec);
}
through SHT_SH5_CR_SORTED on a sorted .cranges section. */
bfd_boolean
-sh64_elf_fake_sections (output_bfd, elf_section_hdr, asect)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- Elf_Internal_Shdr *elf_section_hdr;
- asection *asect;
+sh64_elf_fake_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *elf_section_hdr,
+ asection *asect)
{
if (sh64_elf_section_data (asect)->sh64_info != NULL)
elf_section_hdr->sh_flags
}
static bfd_boolean
-sh64_elf_set_mach_from_flags (abfd)
- bfd *abfd;
+sh64_elf_set_mach_from_flags (bfd *abfd)
{
flagword flags = elf_elfheader (abfd)->e_flags;
asection *cranges;
}
static bfd_boolean
-sh64_elf_copy_private_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
+sh64_elf_copy_private_data (bfd * ibfd, bfd * obfd)
{
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
}
static bfd_boolean
-sh64_elf_merge_private_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+sh64_elf_merge_private_data (bfd *ibfd, bfd *obfd)
{
flagword old_flags, new_flags;
We only recognize SHT_SH5_CR_SORTED, on the .cranges section. */
bfd_boolean
-sh64_backend_section_from_shdr (abfd, hdr, name)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- const char *name;
+sh64_backend_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
+ const char *name)
{
flagword flags = 0;
structure for the SH64 ELF section flags to be copied correctly. */
bfd_boolean
-sh64_bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
- bfd *ibfd;
- asection *isec;
- bfd *obfd;
- asection *osec;
+sh64_bfd_elf_copy_private_section_data (bfd *ibfd, asection *isec,
+ bfd *obfd, asection *osec)
{
struct sh64_section_data *sh64_sec_data;
/* Function to keep SH64 specific file flags. */
static bfd_boolean
-sh64_elf_set_private_flags (abfd, flags)
- bfd * abfd;
- flagword flags;
+sh64_elf_set_private_flags (bfd *abfd, flagword flags)
{
BFD_ASSERT (! elf_flags_init (abfd)
|| elf_elfheader (abfd)->e_flags == flags);
/* Called when writing out an object file to decide the type of a symbol. */
static int
-sh64_elf_get_symbol_type (elf_sym, type)
- Elf_Internal_Sym * elf_sym;
- int type;
+sh64_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
{
if (ELF_ST_TYPE (elf_sym->st_info) == STT_DATALABEL)
return STT_DATALABEL;
(not so good). */
static bfd_boolean
-sh64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info;
- const Elf_Internal_Sym *sym;
- const char **namep;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp;
- bfd_vma *valp;
+sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+ const Elf_Internal_Sym *sym, const char **namep,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp, bfd_vma *valp)
{
/* We want to do this for relocatable as well as final linking. */
if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
DataLabel symbol. */
bfd_boolean
-sh64_elf_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- const char *cname;
- Elf_Internal_Sym *sym;
- asection *input_sec ATTRIBUTE_UNUSED;
+sh64_elf_link_output_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ const char *cname,
+ Elf_Internal_Sym *sym,
+ asection *input_sec ATTRIBUTE_UNUSED)
{
char *name = (char *) cname;
bad value, TRUE if ok. */
static bfd_boolean
-shmedia_prepare_reloc (info, abfd, input_section,
- contents, rel, relocation)
- struct bfd_link_info *info;
- bfd *abfd;
- asection *input_section;
- bfd_byte *contents;
- const Elf_Internal_Rela *rel;
- bfd_vma *relocation;
+shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
+ asection *input_section, bfd_byte *contents,
+ const Elf_Internal_Rela *rel, bfd_vma *relocation)
{
bfd_vma disp, dropped;
is called via bfd_map_over_sections. */
static void
-sh64_find_section_for_address (abfd, section, data)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section;
- PTR data;
+sh64_find_section_for_address (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section, void *data)
{
bfd_vma vma;
bfd_size_type size;
executables (final linking and objcopy). */
static void
-sh64_elf_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+sh64_elf_final_write_processing (bfd *abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
{
bfd_vma ld_generated_cranges_size;
asection *cranges
fsec_data.section = NULL;
bfd_map_over_sections (abfd, sh64_find_section_for_address,
- (PTR) &fsec_data);
+ &fsec_data);
if (fsec_data.section
&& (sh64_get_contents_type (fsec_data.section,
elf_elfheader (abfd)->e_entry,
/* Get the contents type of an arbitrary address, or return CRT_NONE. */
extern enum sh64_elf_cr_type sh64_get_contents_type
- PARAMS ((asection *, bfd_vma, sh64_elf_crange *));
+ (asection *, bfd_vma, sh64_elf_crange *);
/* Simpler interface.
FIXME: This seems redundant now that we export the interface above. */
-extern bfd_boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
-
-extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
+extern bfd_boolean sh64_address_is_shmedia
+ (asection *, bfd_vma);
+
+extern int _bfd_sh64_crange_qsort_cmpb
+ (const void *, const void *);
+extern int _bfd_sh64_crange_qsort_cmpl
+ (const void *, const void *);
+extern int _bfd_sh64_crange_bsearch_cmpb
+ (const void *, const void *);
+extern int _bfd_sh64_crange_bsearch_cmpl
+ (const void *, const void *);
struct sh64_section_data
{
#define sh64_elf64_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
(info)))
/* Get the sh ELF linker hash table from a link_info structure. */
((struct elf_sh64_link_hash_table *) ((p)->hash))
static bfd_boolean sh_elf64_copy_private_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_boolean sh_elf64_copy_private_data_internal
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_boolean sh_elf64_merge_private_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
static bfd_reloc_status_type sh_elf64_ignore_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type sh_elf64_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *sh_elf64_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+ (bfd *, bfd_reloc_code_real_type);
static void sh_elf64_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
static bfd_boolean sh_elf64_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_byte *sh_elf64_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_boolean sh_elf64_set_mach_from_flags
- PARAMS ((bfd *));
+ (bfd *);
static bfd_boolean sh_elf64_set_private_flags
- PARAMS ((bfd *, flagword));
+ (bfd *, flagword);
static asection *sh_elf64_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
static bfd_boolean sh_elf64_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
+ (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
static bfd_boolean sh_elf64_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
+ (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
static int sh64_elf64_get_symbol_type
- PARAMS ((Elf_Internal_Sym *, int));
+ (Elf_Internal_Sym *, int);
static bfd_boolean sh64_elf64_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
+ (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, const char **,
+ flagword *, asection **, bfd_vma *);
static bfd_boolean sh64_elf64_link_output_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
- asection *));
+ (bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+ asection *);
static bfd_boolean sh64_elf64_fake_sections
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
+ (bfd *, Elf_Internal_Shdr *, asection *);
static void sh64_elf64_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
+ (bfd *, bfd_boolean);
static struct bfd_hash_entry *sh64_elf64_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
static struct bfd_link_hash_table *sh64_elf64_link_hash_table_create
- PARAMS ((bfd *));
+ (bfd *);
inline static void movi_shori_putval
- PARAMS ((bfd *, unsigned long, char *));
+ (bfd *, unsigned long, char *);
inline static void movi_3shori_putval
- PARAMS ((bfd *, bfd_vma, char *));
+ (bfd *, bfd_vma, char *);
static bfd_boolean sh64_elf64_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static bfd_boolean sh64_elf64_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *info, struct elf_link_hash_entry *));
+ (struct bfd_link_info *info, struct elf_link_hash_entry *);
static bfd_boolean sh64_elf64_discard_copies
- PARAMS ((struct elf_sh64_link_hash_entry *, PTR));
+ (struct elf_sh64_link_hash_entry *, void *);
static bfd_boolean sh64_elf64_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static bfd_boolean sh64_elf64_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
+ (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *);
static bfd_boolean sh64_elf64_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
static reloc_howto_type sh_elf64_howto_table[] = {
/* No relocation. */
which the linker should otherwise ignore. */
static bfd_reloc_status_type
-sh_elf64_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+sh_elf64_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void *data ATTRIBUTE_UNUSED, asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != NULL)
reloc_entry->address += input_section->output_offset;
See sh_elf_reloc in elf32-sh.c for the original. */
static bfd_reloc_status_type
-sh_elf64_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+sh_elf64_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol_in,
+ void *data, asection *input_section, bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
unsigned long insn;
bfd_vma sym_value;
corresponding SH ELf reloc. */
static reloc_howto_type *
-sh_elf64_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+sh_elf64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
unsigned int i;
See sh_elf_info_to_howto in elf32-sh.c for the original. */
static void
-sh_elf64_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+sh_elf64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r;
See sh_elf_info_to_howto in elf32-sh.c for the original. */
static bfd_boolean
-sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- 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;
+sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+ 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;
See sh_elf_relocate_section in elf32-sh.c for the original. */
static bfd_byte *
-sh_elf64_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;
+sh_elf64_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;
}
internal_relocs = (_bfd_elf_link_read_relocs
- (input_bfd, input_section, (PTR) NULL,
+ (input_bfd, input_section, NULL,
(Elf_Internal_Rela *) NULL, FALSE));
if (internal_relocs == NULL)
goto error_return;
/* Set the SHF_SH5_ISA32 flag for ISA SHmedia code sections. */
bfd_boolean
-sh64_elf64_fake_sections (output_bfd, elf_section_hdr, asect)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- Elf_Internal_Shdr *elf_section_hdr;
- asection *asect;
+sh64_elf64_fake_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *elf_section_hdr,
+ asection *asect)
{
/* Code sections can only contain SH64 code, so mark them as such. */
if (bfd_get_section_flags (output_bfd, asect) & SEC_CODE)
}
static bfd_boolean
-sh_elf64_set_mach_from_flags (abfd)
- bfd *abfd;
+sh_elf64_set_mach_from_flags (bfd *abfd)
{
flagword flags = elf_elfheader (abfd)->e_flags;
See sh64_elf_set_private_flags in elf32-sh64.c for the original. */
static bfd_boolean
-sh_elf64_set_private_flags (abfd, flags)
- bfd * abfd;
- flagword flags;
+sh_elf64_set_private_flags (bfd *abfd, flagword flags)
{
BFD_ASSERT (! elf_flags_init (abfd)
|| elf_elfheader (abfd)->e_flags == flags);
code, to keep attributes the same as for SHmedia in 32-bit ELF. */
static bfd_boolean
-sh_elf64_copy_private_data_internal (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
+sh_elf64_copy_private_data_internal (bfd *ibfd, bfd *obfd)
{
Elf_Internal_Shdr **o_shdrp;
asection *isec;
}
static bfd_boolean
-sh_elf64_copy_private_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
+sh_elf64_copy_private_data (bfd *ibfd, bfd *obfd)
{
return sh_elf64_copy_private_data_internal (ibfd, obfd);
}
static bfd_boolean
-sh_elf64_merge_private_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+sh_elf64_merge_private_data (bfd *ibfd, bfd *obfd)
{
flagword old_flags, new_flags;
relocation. */
static asection *
-sh_elf64_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+sh_elf64_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
{
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-sh_elf64_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+sh_elf64_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
{
/* No got and plt entries for 64-bit SH at present. */
return TRUE;
virtual table relocs for gc. */
static bfd_boolean
-sh_elf64_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
}
static int
-sh64_elf64_get_symbol_type (elf_sym, type)
- Elf_Internal_Sym * elf_sym;
- int type;
+sh64_elf64_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
{
if (ELF_ST_TYPE (elf_sym->st_info) == STT_DATALABEL)
return STT_DATALABEL;
(not so good). */
static bfd_boolean
-sh64_elf64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info;
- const Elf_Internal_Sym *sym;
- const char **namep;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp;
- bfd_vma *valp;
+sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+ const Elf_Internal_Sym *sym, const char **namep,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp, bfd_vma *valp)
{
/* We want to do this for relocatable as well as final linking. */
if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
DataLabel symbol. */
static bfd_boolean
-sh64_elf64_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- const char *cname;
- Elf_Internal_Sym *sym;
- asection *input_sec ATTRIBUTE_UNUSED;
+sh64_elf64_link_output_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ const char *cname,
+ Elf_Internal_Sym *sym,
+ asection *input_sec ATTRIBUTE_UNUSED)
{
char *name = (char *) cname;
before jumping to the program entry. */
static void
-sh64_elf64_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+sh64_elf64_final_write_processing (bfd *abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
{
/* FIXME: Perhaps we shouldn't do this if the entry address was supplied
numerically, but we currently lack the infrastructure to recognize
/* Create an entry in an sh ELF linker hash table. */
static struct bfd_hash_entry *
-sh64_elf64_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+sh64_elf64_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct elf_sh64_link_hash_entry *ret =
(struct elf_sh64_link_hash_entry *) entry;
/* Create an sh64 ELF linker hash table. */
static struct bfd_link_hash_table *
-sh64_elf64_link_hash_table_create (abfd)
- bfd *abfd;
+sh64_elf64_link_hash_table_create (bfd *abfd)
{
struct elf_sh64_link_hash_table *ret;
}
inline static void
-movi_shori_putval (output_bfd, value, addr)
- bfd *output_bfd;
- unsigned long value;
- char *addr;
+movi_shori_putval (bfd *output_bfd, unsigned long value, char *addr)
{
bfd_put_32 (output_bfd,
bfd_get_32 (output_bfd, addr)
}
inline static void
-movi_3shori_putval (output_bfd, value, addr)
- bfd *output_bfd;
- bfd_vma value;
- char *addr;
+movi_3shori_putval (bfd *output_bfd, bfd_vma value, char *addr)
{
bfd_put_32 (output_bfd,
bfd_get_32 (output_bfd, addr)
/* Create dynamic sections when linking against a dynamic object. */
static bfd_boolean
-sh64_elf64_create_dynamic_sections (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+sh64_elf64_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
flagword flags, pltflags;
register asection *s;
understand. */
static bfd_boolean
-sh64_elf64_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
bfd *dynobj;
asection *s;
relocate_section routine. */
static bfd_boolean
-sh64_elf64_discard_copies (h, ignore)
- struct elf_sh64_link_hash_entry *h;
- PTR ignore ATTRIBUTE_UNUSED;
+sh64_elf64_discard_copies (struct elf_sh64_link_hash_entry *h,
+ void *ignore ATTRIBUTE_UNUSED)
{
struct elf_sh64_pcrel_relocs_copied *s;
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-sh64_elf64_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+sh64_elf64_size_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *s;
will not fill them in in the relocate_section routine. */
if (info->shared && info->symbolic)
sh64_elf64_link_hash_traverse (sh64_elf64_hash_table (info),
- sh64_elf64_discard_copies,
- (PTR) NULL);
+ sh64_elf64_discard_copies, NULL);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
dynamic sections here. */
static bfd_boolean
-sh64_elf64_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;
+sh64_elf64_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
-sh64_elf64_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
asection *sgot;