summaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2002-04-04 07:01:27 +0000
committerThiemo Seufer <ths@networkno.de>2002-04-04 07:01:27 +0000
commit5ba75aa8078813f81b961032100e99ea4f99e7ec (patch)
tree3de7bcb1fc5acaf5c91478bb2d1b8af19a09c4fb /bfd/elf-bfd.h
parent2d349ef4574ab603eee1e970de89a3d1415c5b44 (diff)
downloadgdb-5ba75aa8078813f81b961032100e99ea4f99e7ec.tar.gz
* Makefile.am: Add elfxx-mips.c to the known backends.
(elf32-mips.lo): remove dependency to coff/external.h. * Makefile.in: Regenerate. * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo Remove elf32-mips.lo from 64 bit vectors. Update dependencies accordingly. * configure: Regenerate. * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h. (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c. (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New MIPS specific backend functions. * elf32-mips.c: Moved most code to elfxx-mips.c. (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make static. (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc. (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc. (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc. (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed interface to allow selection of the right REL or RELA howto table. (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made static. Let it refuse n32 objects. (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus. (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo. (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info. (elf32_mips_ignore_discarded_relocs): Rename from _bfd_elf32_mips_ignore_discarded_relocs. (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section. (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT. (elf_mips_howto_table_rela): Remove. * elf64-mips.c: Moved most code to elfxx-mips.c. (bfd_elf64_bfd_reloc_type_lookup): Make static. (mips_elf64_rtype_to_howto): New function. (mips_elf64_object_p): Likewise. (elf64_mips_irix_compat): Likewise. * elfxx-mips.c: New file containing common code merged together from elf32-mips.c and elf64-mips.c. * elfxx-mips.h: New file containing MIPS specific prototypes from elf-bfd.h. * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and elf_backend_mips_rtype_to_howto.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h95
1 files changed, 16 insertions, 79 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 4439daaff98..ef219e4411d 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -403,6 +403,14 @@ struct elf_reloc_cookie
boolean bad_symtab;
};
+/* The level of IRIX compatibility we're striving for. */
+
+typedef enum {
+ ict_none,
+ ict_irix5,
+ ict_irix6
+} irix_compat_t;
+
struct elf_backend_data
{
/* The architecture for this backend. */
@@ -740,6 +748,14 @@ struct elf_backend_data
boolean (*elf_backend_write_section)
PARAMS ((bfd *, asection *, bfd_byte *));
+ /* The level of IRIX compatibility we're striving for.
+ MIPS ELF specific function. */
+ irix_compat_t (*elf_backend_mips_irix_compat)
+ PARAMS ((bfd *));
+
+ reloc_howto_type *(*elf_backend_mips_rtype_to_howto)
+ PARAMS ((unsigned int, boolean));
+
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */
const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap;
@@ -1534,85 +1550,6 @@ extern char *elfcore_write_prxfpreg
extern char *elfcore_write_lwpstatus
PARAMS ((bfd*, char*, int*, long, int, void*));
-/* MIPS ELF specific routines. */
-
-extern boolean _bfd_mips_elf_object_p
- PARAMS ((bfd *));
-extern boolean _bfd_mips_elf_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
-extern boolean _bfd_mips_elf_fake_sections
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-extern boolean _bfd_mips_elf_section_from_bfd_section
- PARAMS ((bfd *, asection *, int *));
-extern boolean _bfd_mips_elf_section_processing
- PARAMS ((bfd *, Elf_Internal_Shdr *));
-extern void _bfd_mips_elf_symbol_processing
- PARAMS ((bfd *, asymbol *));
-extern boolean _bfd_mips_elf_read_ecoff_info
- PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
-extern void _bfd_mips_elf_final_write_processing
- PARAMS ((bfd *, boolean));
-extern bfd_reloc_status_type _bfd_mips_elf_hi16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-extern bfd_reloc_status_type _bfd_mips_elf_lo16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-extern bfd_reloc_status_type _bfd_mips_elf_gprel16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-extern bfd_reloc_status_type _bfd_mips_elf_got16_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-extern bfd_reloc_status_type _bfd_mips_elf_gprel32_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-extern boolean _bfd_mips_elf_set_private_flags
- PARAMS ((bfd *, flagword));
-extern boolean _bfd_mips_elf_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-extern boolean _bfd_mips_elf_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
-extern boolean _bfd_mips_elf_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
-extern boolean _bfd_mips_elf_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-extern boolean _bfd_mips_elf_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
-extern boolean _bfd_mips_elf_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-extern boolean _bfd_mips_elf_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-extern boolean _bfd_mips_elf_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-extern asection * _bfd_mips_elf_gc_mark_hook
- PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-extern boolean _bfd_mips_elf_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-extern boolean _bfd_mips_elf_always_size_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-extern boolean _bfd_mips_elf_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-extern boolean _bfd_mips_elf_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create
- PARAMS ((bfd *));
-extern boolean _bfd_mips_elf_print_private_bfd_data
- PARAMS ((bfd *, PTR));
-extern boolean _bfd_mips_elf_link_output_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
- asection *));
-extern boolean _bfd_mips_elf_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
-extern int _bfd_mips_elf_additional_program_headers
- PARAMS ((bfd *));
-extern boolean _bfd_mips_elf_modify_segment_map
- PARAMS ((bfd *));
-extern boolean _bfd_mips_elf_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-
/* SH ELF specific routine. */
extern boolean _sh_elf_set_mach_from_flags