diff options
author | Nick Clifton <nickc@redhat.com> | 2012-07-13 14:22:50 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2012-07-13 14:22:50 +0000 |
commit | 2c3fc38946973ec305b63248abdd170eda059f80 (patch) | |
tree | 1f06480e02f06ee08d869db92f4c8677b76968ba /bfd/elf32-frv.c | |
parent | cd6f1cf350bbc5d91977fccb8082cecea60d8465 (diff) | |
download | gdb-2c3fc38946973ec305b63248abdd170eda059f80.zip gdb-2c3fc38946973ec305b63248abdd170eda059f80.tar.gz gdb-2c3fc38946973ec305b63248abdd170eda059f80.tar.bz2 |
* aix386-core.c: Remove use of PTR and PARAMS macros.
* archive.c: Likewise.
* cache.c: Likewise.
* cisco-core.c: Likewise.
* coff-alpha.c: Likewise.
* coff-apollo.c: Likewise.
* coff-aux.c: Likewise.
* coff-h8300.c: Likewise.
* coff-h8500.c: Likewise.
* coff-i386.c: Likewise.
* coff-i960.c: Likewise.
* coff-ia64.c: Likewise.
* coff-m68k.c: Likewise.
* coff-m88k.c: Likewise.
* coff-mcore.c: Likewise.
* coff-mips.c: Likewise.
* coff-or32.c: Likewise.
* coff-ppc.c: Likewise.
* coff-rs6000.c: Likewise.
* coff-sh.c: Likewise.
* coff-sparc.c: Likewise.
* coff-stgo32.c: Likewise.
* coff-tic30.c: Likewise.
* coff-tic4x.c: Likewise.
* coff-tic54x.c: Likewise.
* coff-tic80.c: Likewise.
* coff-w65.c: Likewise.
* cofflink.c: Likewise.
* cpu-arc.c: Likewise.
* cpu-cris.c: Likewise.
* cpu-h8500.c: Likewise.
* cpu-i960.c: Likewise.
* cpu-msp430.c: Likewise.
* cpu-ns32k.c: Likewise.
* cpu-powerpc.c: Likewise.
* cpu-rs6000.c: Likewise.
* cpu-tic4x.c: Likewise.
* cpu-w65.c: Likewise.
* ecoff.c: Likewise.
* ecofflink.c: Likewise.
* elf-m10200.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-cris.c: Likewise.
* elf32-crx.c: Likewise.
* elf32-fr30.c: Likewise.
* elf32-frv.c: Likewise.
* elf32-h8300.c: Likewise.
* elf32-i960.c: Likewise.
* elf32-m32c.c: Likewise.
* elf32-m68hc11.c: Likewise.
* elf32-m68hc12.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-mcore.c: Likewise.
* elf32-rl78.c: Likewise.
* elf32-rx.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-vax.c: Likewise.
* elf64-alpha.c: Likewise.
* elf64-mmix.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-sparc.c: Likewise.
* elfnn-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* elfxx-sparc.c: Likewise.
* hash.c: Likewise.
* hp300hpux.c: Likewise.
* hppabsd-core.c: Likewise.
* hpux-core.c: Likewise.
* i386dynix.c: Likewise.
* i386linux.c: Likewise.
* i386lynx.c: Likewise.
* i386mach3.c: Likewise.
* i386msdos.c: Likewise.
* i386os9k.c: Likewise.
* irix-core.c: Likewise.
* lynx-core.c: Likewise.
* m68klinux.c: Likewise.
* mach-o.h: Likewise.
* mipsbsd.c: Likewise.
* netbsd-core.c: Likewise.
* nlm32-i386.c: Likewise.
* osf-core.c: Likewise.
* pc532-mach.c: Likewise.
* pef.c: Likewise.
* ppcboot.c: Likewise.
* ptrace-core.c: Likewise.
* reloc16.c: Likewise.
* sco5-core.c: Likewise.
* som.h: Likewise.
* sparclinux.c: Likewise.
* sparclynx.c: Likewise.
* ticoff.h: Likewise.
* trad-core.c: Likewise.
* vms-lib.c: Likewise.
* xsym.h: Likewise.
Diffstat (limited to 'bfd/elf32-frv.c')
-rw-r--r-- | bfd/elf32-frv.c | 228 |
1 files changed, 75 insertions, 153 deletions
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 7f60583..271ec02 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -28,56 +28,7 @@ #include "hashtab.h" /* Forward declarations. */ -static bfd_reloc_status_type elf32_frv_relocate_lo16 - PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma)); -static bfd_reloc_status_type elf32_frv_relocate_hi16 - PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma)); -static bfd_reloc_status_type elf32_frv_relocate_label24 - PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_vma)); -static bfd_reloc_status_type elf32_frv_relocate_gprel12 - PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, - bfd_byte *, bfd_vma)); -static bfd_reloc_status_type elf32_frv_relocate_gprelu12 - PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, - bfd_byte *, bfd_vma)); -static bfd_reloc_status_type elf32_frv_relocate_gprello - PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, - bfd_byte *, bfd_vma)); -static bfd_reloc_status_type elf32_frv_relocate_gprelhi - PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, - bfd_byte *, bfd_vma)); -static reloc_howto_type *frv_reloc_type_lookup - PARAMS ((bfd *, bfd_reloc_code_real_type)); -static void frv_info_to_howto_rela - PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); -static bfd_boolean elf32_frv_relocate_section - PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, - Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); -static bfd_boolean elf32_frv_add_symbol_hook - PARAMS (( bfd *, struct bfd_link_info *, Elf_Internal_Sym *, - const char **, flagword *, asection **, bfd_vma *)); -static bfd_reloc_status_type frv_final_link_relocate - PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, - Elf_Internal_Rela *, bfd_vma)); -static bfd_boolean elf32_frv_check_relocs - PARAMS ((bfd *, struct bfd_link_info *, asection *, - const Elf_Internal_Rela *)); -static int elf32_frv_machine - PARAMS ((bfd *)); -static bfd_boolean elf32_frv_object_p - PARAMS ((bfd *)); -static bfd_boolean frv_elf_set_private_flags - PARAMS ((bfd *, flagword)); -static bfd_boolean frv_elf_copy_private_bfd_data - PARAMS ((bfd *, bfd *)); -static bfd_boolean frv_elf_merge_private_bfd_data - PARAMS ((bfd *, bfd *)); -static bfd_boolean frv_elf_print_private_bfd_data - PARAMS ((bfd *, PTR)); -static bfd_boolean elf32_frv_grok_prstatus (bfd * abfd, - Elf_Internal_Note * note); -static bfd_boolean elf32_frv_grok_psinfo (bfd * abfd, - Elf_Internal_Note * note); + static reloc_howto_type elf32_frv_howto_table [] = { @@ -2176,14 +2127,12 @@ _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, /* Handle an FRV small data reloc. */ static bfd_reloc_status_type -elf32_frv_relocate_gprel12 (info, input_bfd, input_section, relocation, - contents, value) - struct bfd_link_info *info; - bfd *input_bfd; - asection *input_section; - Elf_Internal_Rela *relocation; - bfd_byte *contents; - bfd_vma value; +elf32_frv_relocate_gprel12 (struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + Elf_Internal_Rela *relocation, + bfd_byte *contents, + bfd_vma value) { bfd_vma insn; bfd_vma gp; @@ -2215,14 +2164,12 @@ elf32_frv_relocate_gprel12 (info, input_bfd, input_section, relocation, /* Handle an FRV small data reloc. for the u12 field. */ static bfd_reloc_status_type -elf32_frv_relocate_gprelu12 (info, input_bfd, input_section, relocation, - contents, value) - struct bfd_link_info *info; - bfd *input_bfd; - asection *input_section; - Elf_Internal_Rela *relocation; - bfd_byte *contents; - bfd_vma value; +elf32_frv_relocate_gprelu12 (struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + Elf_Internal_Rela *relocation, + bfd_byte *contents, + bfd_vma value) { bfd_vma insn; bfd_vma gp; @@ -2257,11 +2204,10 @@ elf32_frv_relocate_gprelu12 (info, input_bfd, input_section, relocation, /* Handle an FRV ELF HI16 reloc. */ static bfd_reloc_status_type -elf32_frv_relocate_hi16 (input_bfd, relhi, contents, value) - bfd *input_bfd; - Elf_Internal_Rela *relhi; - bfd_byte *contents; - bfd_vma value; +elf32_frv_relocate_hi16 (bfd *input_bfd, + Elf_Internal_Rela *relhi, + bfd_byte *contents, + bfd_vma value) { bfd_vma insn; @@ -2280,11 +2226,10 @@ elf32_frv_relocate_hi16 (input_bfd, relhi, contents, value) } static bfd_reloc_status_type -elf32_frv_relocate_lo16 (input_bfd, rello, contents, value) - bfd *input_bfd; - Elf_Internal_Rela *rello; - bfd_byte *contents; - bfd_vma value; +elf32_frv_relocate_lo16 (bfd *input_bfd, + Elf_Internal_Rela *rello, + bfd_byte *contents, + bfd_vma value) { bfd_vma insn; @@ -2305,12 +2250,11 @@ elf32_frv_relocate_lo16 (input_bfd, rello, contents, value) /* Perform the relocation for the CALL label24 instruction. */ static bfd_reloc_status_type -elf32_frv_relocate_label24 (input_bfd, input_section, rello, contents, value) - bfd *input_bfd; - asection *input_section; - Elf_Internal_Rela *rello; - bfd_byte *contents; - bfd_vma value; +elf32_frv_relocate_label24 (bfd *input_bfd, + asection *input_section, + Elf_Internal_Rela *rello, + bfd_byte *contents, + bfd_vma value) { bfd_vma insn; bfd_vma label6; @@ -2348,14 +2292,12 @@ elf32_frv_relocate_label24 (input_bfd, input_section, rello, contents, value) } static bfd_reloc_status_type -elf32_frv_relocate_gprelhi (info, input_bfd, input_section, relocation, - contents, value) - struct bfd_link_info *info; - bfd *input_bfd; - asection *input_section; - Elf_Internal_Rela *relocation; - bfd_byte *contents; - bfd_vma value; +elf32_frv_relocate_gprelhi (struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + Elf_Internal_Rela *relocation, + bfd_byte *contents, + bfd_vma value) { bfd_vma insn; bfd_vma gp; @@ -2383,14 +2325,12 @@ elf32_frv_relocate_gprelhi (info, input_bfd, input_section, relocation, } static bfd_reloc_status_type -elf32_frv_relocate_gprello (info, input_bfd, input_section, relocation, - contents, value) - struct bfd_link_info *info; - bfd *input_bfd; - asection *input_section; - Elf_Internal_Rela *relocation; - bfd_byte *contents; - bfd_vma value; +elf32_frv_relocate_gprello (struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + Elf_Internal_Rela *relocation, + bfd_byte *contents, + bfd_vma value) { bfd_vma insn; bfd_vma gp; @@ -2419,9 +2359,8 @@ elf32_frv_relocate_gprello (info, input_bfd, input_section, relocation, } static reloc_howto_type * -frv_reloc_type_lookup (abfd, code) - bfd *abfd ATTRIBUTE_UNUSED; - bfd_reloc_code_real_type code; +frv_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, + bfd_reloc_code_real_type code) { switch (code) { @@ -2601,10 +2540,9 @@ frv_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an FRV ELF reloc. */ static void -frv_info_to_howto_rela (abfd, cache_ptr, dst) - bfd *abfd ATTRIBUTE_UNUSED; - arelent *cache_ptr; - Elf_Internal_Rela *dst; +frv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, + arelent *cache_ptr, + Elf_Internal_Rela *dst) { unsigned int r_type; @@ -2665,14 +2603,12 @@ frvfdpic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, routines, but a few relocs, we have to do them ourselves. */ static bfd_reloc_status_type -frv_final_link_relocate (howto, input_bfd, input_section, contents, rel, - relocation) - reloc_howto_type *howto; - bfd *input_bfd; - asection *input_section; - bfd_byte *contents; - Elf_Internal_Rela *rel; - bfd_vma relocation; +frv_final_link_relocate (reloc_howto_type *howto, + bfd *input_bfd, + asection *input_section, + bfd_byte *contents, + Elf_Internal_Rela *rel, + bfd_vma relocation) { return _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, relocation, @@ -2711,16 +2647,14 @@ frv_final_link_relocate (howto, input_bfd, input_section, contents, rel, accordingly. */ static bfd_boolean -elf32_frv_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; +elf32_frv_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; @@ -4159,14 +4093,13 @@ elf32_frv_gc_mark_hook (asection *sec, file. We use it to put .comm items in .scomm, and not .comm. */ static bfd_boolean -elf32_frv_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) - bfd *abfd; - struct bfd_link_info *info; - Elf_Internal_Sym *sym; - const char **namep ATTRIBUTE_UNUSED; - flagword *flagsp ATTRIBUTE_UNUSED; - asection **secp; - bfd_vma *valp; +elf32_frv_add_symbol_hook (bfd *abfd, + struct bfd_link_info *info, + Elf_Internal_Sym *sym, + const char **namep ATTRIBUTE_UNUSED, + flagword *flagsp ATTRIBUTE_UNUSED, + asection **secp, + bfd_vma *valp) { if (sym->st_shndx == SHN_COMMON && !info->relocatable @@ -6150,11 +6083,10 @@ frvfdpic_elf_encode_eh_address (bfd *abfd, Given infinite time and money... :-) */ static bfd_boolean -elf32_frv_check_relocs (abfd, info, sec, relocs) - bfd *abfd; - struct bfd_link_info *info; - asection *sec; - const Elf_Internal_Rela *relocs; +elf32_frv_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; @@ -6410,8 +6342,7 @@ elf32_frv_check_relocs (abfd, info, sec, relocs) /* Return the machine subcode from the ELF e_flags header. */ static int -elf32_frv_machine (abfd) - bfd *abfd; +elf32_frv_machine (bfd *abfd) { switch (elf_elfheader (abfd)->e_flags & EF_FRV_CPU_MASK) { @@ -6432,8 +6363,7 @@ elf32_frv_machine (abfd) /* Set the right machine number for a FRV ELF file. */ static bfd_boolean -elf32_frv_object_p (abfd) - bfd *abfd; +elf32_frv_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_frv, elf32_frv_machine (abfd)); return (((elf_elfheader (abfd)->e_flags & EF_FRV_FDPIC) != 0) @@ -6443,9 +6373,7 @@ elf32_frv_object_p (abfd) /* Function to set the ELF flag bits. */ static bfd_boolean -frv_elf_set_private_flags (abfd, flags) - bfd *abfd; - flagword flags; +frv_elf_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; elf_flags_init (abfd) = TRUE; @@ -6455,9 +6383,7 @@ frv_elf_set_private_flags (abfd, flags) /* Copy backend specific data from one object module to another. */ static bfd_boolean -frv_elf_copy_private_bfd_data (ibfd, obfd) - bfd *ibfd; - bfd *obfd; +frv_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) @@ -6550,9 +6476,7 @@ elf32_frvfdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd) object file when linking. */ static bfd_boolean -frv_elf_merge_private_bfd_data (ibfd, obfd) - bfd *ibfd; - bfd *obfd; +frv_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) { flagword old_flags, old_partial; flagword new_flags, new_partial; @@ -6820,10 +6744,8 @@ frv_elf_merge_private_bfd_data (ibfd, obfd) } -bfd_boolean -frv_elf_print_private_bfd_data (abfd, ptr) - bfd *abfd; - PTR ptr; +static bfd_boolean +frv_elf_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; flagword flags; |