binutils ChangeLog:
[deliverable/binutils-gdb.git] / bfd / targets.c
index c3212a956426d3c0a8e3601d482ca79779a74b93..bceb724e22def83a3f069889967d02e1fe47036b 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic target-file-type support for the BFD library.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003
+   2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -30,7 +30,7 @@ SECTION
        Targets
 
 DESCRIPTION
-       Each port of BFD to a different machine requries the creation
+       Each port of BFD to a different machine requires the creation
        of a target back end. All the back end provides to the root
        part of BFD is a structure containing pointers to functions
        which perform certain low level operations on files. BFD
@@ -203,26 +203,26 @@ DESCRIPTION
 .  {* Entries for byte swapping for data. These are different from the
 .     other entry points, since they don't take a BFD asthe first argument.
 .     Certain other handlers could do the same.  *}
-.  bfd_vma        (*bfd_getx64) (const bfd_byte *);
-.  bfd_signed_vma (*bfd_getx_signed_64) (const bfd_byte *);
-.  void           (*bfd_putx64) (bfd_vma, bfd_byte *);
-.  bfd_vma        (*bfd_getx32) (const bfd_byte *);
-.  bfd_signed_vma (*bfd_getx_signed_32) (const bfd_byte *);
-.  void           (*bfd_putx32) (bfd_vma, bfd_byte *);
-.  bfd_vma        (*bfd_getx16) (const bfd_byte *);
-.  bfd_signed_vma (*bfd_getx_signed_16) (const bfd_byte *);
-.  void           (*bfd_putx16) (bfd_vma, bfd_byte *);
+.  bfd_uint64_t   (*bfd_getx64) (const void *);
+.  bfd_int64_t    (*bfd_getx_signed_64) (const void *);
+.  void           (*bfd_putx64) (bfd_uint64_t, void *);
+.  bfd_vma        (*bfd_getx32) (const void *);
+.  bfd_signed_vma (*bfd_getx_signed_32) (const void *);
+.  void           (*bfd_putx32) (bfd_vma, void *);
+.  bfd_vma        (*bfd_getx16) (const void *);
+.  bfd_signed_vma (*bfd_getx_signed_16) (const void *);
+.  void           (*bfd_putx16) (bfd_vma, void *);
 .
 .  {* Byte swapping for the headers.  *}
-.  bfd_vma        (*bfd_h_getx64) (const bfd_byte *);
-.  bfd_signed_vma (*bfd_h_getx_signed_64) (const bfd_byte *);
-.  void           (*bfd_h_putx64) (bfd_vma, bfd_byte *);
-.  bfd_vma        (*bfd_h_getx32) (const bfd_byte *);
-.  bfd_signed_vma (*bfd_h_getx_signed_32) (const bfd_byte *);
-.  void           (*bfd_h_putx32) (bfd_vma, bfd_byte *);
-.  bfd_vma        (*bfd_h_getx16) (const bfd_byte *);
-.  bfd_signed_vma (*bfd_h_getx_signed_16) (const bfd_byte *);
-.  void           (*bfd_h_putx16) (bfd_vma, bfd_byte *);
+.  bfd_uint64_t   (*bfd_h_getx64) (const void *);
+.  bfd_int64_t    (*bfd_h_getx_signed_64) (const void *);
+.  void           (*bfd_h_putx64) (bfd_uint64_t, void *);
+.  bfd_vma        (*bfd_h_getx32) (const void *);
+.  bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
+.  void           (*bfd_h_putx32) (bfd_vma, void *);
+.  bfd_vma        (*bfd_h_getx16) (const void *);
+.  bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
+.  void           (*bfd_h_putx16) (bfd_vma, void *);
 .
 .  {* Format dependent routines: these are vectors of entry points
 .     within the target vector structure, one for each format to check.  *}
@@ -265,6 +265,7 @@ BFD_JUMP_TABLE macros.
 .  NAME##_bfd_merge_private_bfd_data, \
 .  NAME##_bfd_copy_private_section_data, \
 .  NAME##_bfd_copy_private_symbol_data, \
+.  NAME##_bfd_copy_private_header_data, \
 .  NAME##_bfd_set_private_flags, \
 .  NAME##_bfd_print_private_bfd_data
 .
@@ -282,6 +283,10 @@ BFD_JUMP_TABLE macros.
 .     to another.  *}
 .  bfd_boolean (*_bfd_copy_private_symbol_data)
 .    (bfd *, asymbol *, bfd *, asymbol *);
+.  {* Called to copy BFD private header data from one object file
+.     to another.  *}
+.  bfd_boolean (*_bfd_copy_private_header_data)
+.    (bfd *, bfd *);
 .  {* Called to set private backend flags.  *}
 .  bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
 .
@@ -328,7 +333,7 @@ BFD_JUMP_TABLE macros.
 .  {* Entry points used for symbols.  *}
 .#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
 .  NAME##_get_symtab_upper_bound, \
-.  NAME##_get_symtab, \
+.  NAME##_canonicalize_symtab, \
 .  NAME##_make_empty_symbol, \
 .  NAME##_print_symbol, \
 .  NAME##_get_symbol_info, \
@@ -341,20 +346,20 @@ BFD_JUMP_TABLE macros.
 .
 .  long        (*_bfd_get_symtab_upper_bound) (bfd *);
 .  long        (*_bfd_canonicalize_symtab)
-.    (bfd *, struct symbol_cache_entry **);
-.  struct symbol_cache_entry *
+.    (bfd *, struct bfd_symbol **);
+.  struct bfd_symbol *
 .              (*_bfd_make_empty_symbol) (bfd *);
 .  void        (*_bfd_print_symbol)
-.    (bfd *, void *, struct symbol_cache_entry *, bfd_print_symbol_type);
+.    (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
 .#define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
 .  void        (*_bfd_get_symbol_info)
-.    (bfd *, struct symbol_cache_entry *, symbol_info *);
+.    (bfd *, struct bfd_symbol *, symbol_info *);
 .#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
 .  bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
 .
-.  alent *     (*_get_lineno) (bfd *, struct symbol_cache_entry *);
+.  alent *     (*_get_lineno) (bfd *, struct bfd_symbol *);
 .  bfd_boolean (*_bfd_find_nearest_line)
-.    (bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+.    (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
 .     const char **, const char **, unsigned int *);
 . {* Back-door to allow format-aware applications to create debug symbols
 .    while using BFD for everything else.  Currently used by the assembler
@@ -378,7 +383,7 @@ BFD_JUMP_TABLE macros.
 .
 .  long        (*_get_reloc_upper_bound) (bfd *, sec_ptr);
 .  long        (*_bfd_canonicalize_reloc)
-.    (bfd *, sec_ptr, arelent **, struct symbol_cache_entry **);
+.    (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
 .  {* See documentation on reloc types.  *}
 .  reloc_howto_type *
 .              (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
@@ -391,7 +396,7 @@ BFD_JUMP_TABLE macros.
 .  bfd_boolean (*_bfd_set_arch_mach)
 .    (bfd *, enum bfd_architecture, unsigned long);
 .  bfd_boolean (*_bfd_set_section_contents)
-.    (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
+.    (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
 .
 .  {* Routines used by the linker.  *}
 .#define BFD_JUMP_TABLE_LINK(NAME) \
@@ -406,15 +411,16 @@ BFD_JUMP_TABLE macros.
 .  NAME##_bfd_link_split_section, \
 .  NAME##_bfd_gc_sections, \
 .  NAME##_bfd_merge_sections, \
+.  NAME##_bfd_is_group_section, \
 .  NAME##_bfd_discard_group
 .
 .  int         (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
 .  bfd_byte *  (*_bfd_get_relocated_section_contents)
 .    (bfd *, struct bfd_link_info *, struct bfd_link_order *,
-.     bfd_byte *, bfd_boolean, struct symbol_cache_entry **);
+.     bfd_byte *, bfd_boolean, struct bfd_symbol **);
 .
 .  bfd_boolean (*_bfd_relax_section)
-.    (bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *);
+.    (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
 .
 .  {* Create a hash table for the linker.  Different backends store
 .     different information in this table.  *}
@@ -435,7 +441,7 @@ BFD_JUMP_TABLE macros.
 .  bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
 .
 .  {* Should this section be split up into smaller pieces during linking.  *}
-.  bfd_boolean (*_bfd_link_split_section) (bfd *, struct sec *);
+.  bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
 .
 .  {* Remove sections that are not referenced from the output.  *}
 .  bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
@@ -443,13 +449,17 @@ BFD_JUMP_TABLE macros.
 .  {* Attempt to merge SEC_MERGE sections.  *}
 .  bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
 .
+.  {* Is this section a member of a group?  *}
+.  bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
+.
 .  {* Discard members of a group.  *}
-.  bfd_boolean (*_bfd_discard_group) (bfd *, struct sec *);
+.  bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
 .
 .  {* Routines to handle dynamic symbols and relocs.  *}
 .#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
 .  NAME##_get_dynamic_symtab_upper_bound, \
 .  NAME##_canonicalize_dynamic_symtab, \
+.  NAME##_get_synthetic_symtab, \
 .  NAME##_get_dynamic_reloc_upper_bound, \
 .  NAME##_canonicalize_dynamic_reloc
 .
@@ -457,12 +467,15 @@ BFD_JUMP_TABLE macros.
 .  long        (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
 .  {* Read in the dynamic symbols.  *}
 .  long        (*_bfd_canonicalize_dynamic_symtab)
-.    (bfd *, struct symbol_cache_entry **);
+.    (bfd *, struct bfd_symbol **);
+.  {* Create synthetized symbols.  *}
+.  long        (*_bfd_get_synthetic_symtab)
+.    (bfd *, struct bfd_symbol **, struct bfd_symbol **);
 .  {* Get the amount of memory required to hold the dynamic relocs.  *}
 .  long        (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
 .  {* Read in the dynamic relocs.  *}
 .  long        (*_bfd_canonicalize_dynamic_reloc)
-.    (bfd *, arelent **, struct symbol_cache_entry **);
+.    (bfd *, arelent **, struct bfd_symbol **);
 .
 
 A pointer to an alternative bfd_target in case the current one is not
@@ -517,12 +530,14 @@ extern const bfd_target bfd_elf32_bigarc_vec;
 extern const bfd_target bfd_elf32_bigarm_oabi_vec;
 extern const bfd_target bfd_elf32_bigarm_vec;
 extern const bfd_target bfd_elf32_bigmips_vec;
+extern const bfd_target bfd_elf32_cr16c_vec;
 extern const bfd_target bfd_elf32_cris_vec;
 extern const bfd_target bfd_elf32_d10v_vec;
 extern const bfd_target bfd_elf32_d30v_vec;
 extern const bfd_target bfd_elf32_dlx_big_vec;
 extern const bfd_target bfd_elf32_fr30_vec;
 extern const bfd_target bfd_elf32_frv_vec;
+extern const bfd_target bfd_elf32_frvfdpic_vec;
 extern const bfd_target bfd_elf32_h8300_vec;
 extern const bfd_target bfd_elf32_hppa_linux_vec;
 extern const bfd_target bfd_elf32_hppa_vec;
@@ -542,6 +557,9 @@ extern const bfd_target bfd_elf32_littlearm_oabi_vec;
 extern const bfd_target bfd_elf32_littlearm_vec;
 extern const bfd_target bfd_elf32_littlemips_vec;
 extern const bfd_target bfd_elf32_m32r_vec;
+extern const bfd_target bfd_elf32_m32rle_vec;
+extern const bfd_target bfd_elf32_m32rlin_vec;
+extern const bfd_target bfd_elf32_m32rlelin_vec;
 extern const bfd_target bfd_elf32_m68hc11_vec;
 extern const bfd_target bfd_elf32_m68hc12_vec;
 extern const bfd_target bfd_elf32_m68k_vec;
@@ -804,12 +822,14 @@ static const bfd_target * const _bfd_target_vector[] = {
        &bfd_elf32_bigarm_oabi_vec,
        &bfd_elf32_bigarm_vec,
        &bfd_elf32_bigmips_vec,
+       &bfd_elf32_cr16c_vec,
        &bfd_elf32_cris_vec,
        &bfd_elf32_d10v_vec,
        &bfd_elf32_d30v_vec,
        &bfd_elf32_dlx_big_vec,
        &bfd_elf32_fr30_vec,
        &bfd_elf32_frv_vec,
+       &bfd_elf32_frvfdpic_vec,
        &bfd_elf32_h8300_vec,
        &bfd_elf32_hppa_linux_vec,
        &bfd_elf32_hppa_vec,
@@ -831,6 +851,9 @@ static const bfd_target * const _bfd_target_vector[] = {
        &bfd_elf32_littlearm_vec,
        &bfd_elf32_littlemips_vec,
        &bfd_elf32_m32r_vec,
+        &bfd_elf32_m32rle_vec,
+        &bfd_elf32_m32rlin_vec,
+        &bfd_elf32_m32rlelin_vec,
        &bfd_elf32_m68hc11_vec,
        &bfd_elf32_m68hc12_vec,
        &bfd_elf32_m68k_vec,
@@ -898,9 +921,7 @@ static const bfd_target * const _bfd_target_vector[] = {
        &bfd_elf64_sh64nbsd_vec,
        &bfd_elf64_sh64lin_vec,
        &bfd_elf64_sh64blin_vec,
-#if 0
        &bfd_elf64_sparc_vec,
-#endif
        &bfd_elf64_tradbigmips_vec,
        &bfd_elf64_tradlittlemips_vec,
        &bfd_elf64_x86_64_vec,
This page took 0.032041 seconds and 4 git commands to generate.