. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
. (bfd_assert (__FILE__,__LINE__), NULL))
.#endif
-
+.
This is the structure which defines the type of BFD this is. The
<<xvec>> member of the struct <<bfd>> itself points here. Each
module that implements access to a different target under BFD,
the entry points which call them. Too bad we can't have one
macro to define them both!
-.enum bfd_flavour {
+.enum bfd_flavour
+.{
. bfd_target_unknown_flavour,
. bfd_target_aout_flavour,
. bfd_target_coff_flavour,
.
.typedef struct bfd_target
.{
-
-Identifies the kind of target, e.g., SunOS4, Ultrix, etc.
-
+. {* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. *}
. char *name;
-
-The "flavour" of a back end is a general indication about the contents
-of a file.
-
+.
+. {* The "flavour" of a back end is a general indication about
+. the contents of a file. *}
. enum bfd_flavour flavour;
-
-The order of bytes within the data area of a file.
-
+.
+. {* The order of bytes within the data area of a file. *}
. enum bfd_endian byteorder;
-
-The order of bytes within the header parts of a file.
-
+.
+. {* The order of bytes within the header parts of a file. *}
. enum bfd_endian header_byteorder;
-
-A mask of all the flags which an executable may have set -
-from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>.
-
+.
+. {* A mask of all the flags which an executable may have set -
+. from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>. *}
. flagword object_flags;
-
-A mask of all the flags which a section may have set - from
-the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>.
-
+.
+. {* A mask of all the flags which a section may have set - from
+. the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>. *}
. flagword section_flags;
-
-The character normally found at the front of a symbol
-(if any), perhaps `_'.
-
+.
+. {* The character normally found at the front of a symbol.
+. (if any), perhaps `_'. *}
. char symbol_leading_char;
-
-The pad character for file names within an archive header.
-
+.
+. {* The pad character for file names within an archive header. *}
. char ar_pad_char;
-
-The maximum number of characters in an archive header.
-
+.
+. {* The maximum number of characters in an archive header. *}
. unsigned short ar_max_namelen;
-
-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.
-
+.
+. {* 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) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
. void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
. bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
. void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
-
-Byte swapping for the headers
-
+.
+. {* Byte swapping for the headers. *}
. bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
. void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
. bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
. void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
-
-Format dependent routines: these are vectors of entry points
-within the target vector structure, one for each format to check.
-
-Check the format of a file being read. Return a <<bfd_target *>> or zero.
-
+.
+. {* Format dependent routines: these are vectors of entry points
+. within the target vector structure, one for each format to check. *}
+.
+. {* Check the format of a file being read. Return a <<bfd_target *>> or zero. *}
. const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
-
-Set the format of a file being written.
-
+.
+. {* Set the format of a file being written. *}
. boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
-
-Write cached information into a file being written, at <<bfd_close>>.
-
+.
+. {* Write cached information into a file being written, at <<bfd_close>>. *}
. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
-
+.
The general target vector. These vectors are initialized using the
BFD_JUMP_TABLE macros.
-
.
. {* Generic entry points. *}
Do not "beautify" the CONCAT* macro args. Traditional C will not
. to another. *}
. boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
. bfd *, asymbol *));
-. {* Called to set private backend flags *}
+. {* Called to set private backend flags. *}
. boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
.
-. {* Called to print private BFD data *}
+. {* Called to print private BFD data. *}
. boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
.
. {* Core file entry points. *}
.CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
.CONCAT2 (NAME,_bfd_relax_section), \
.CONCAT2 (NAME,_bfd_link_hash_table_create), \
+.CONCAT2 (NAME,_bfd_link_hash_table_free), \
.CONCAT2 (NAME,_bfd_link_add_symbols), \
+.CONCAT2 (NAME,_bfd_link_just_syms), \
.CONCAT2 (NAME,_bfd_final_link), \
.CONCAT2 (NAME,_bfd_link_split_section), \
.CONCAT2 (NAME,_bfd_gc_sections), \
-.CONCAT2 (NAME,_bfd_merge_sections)
+.CONCAT2 (NAME,_bfd_merge_sections), \
+.CONCAT2 (NAME,_bfd_discard_group)
. int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
. bfd_byte *(*_bfd_get_relocated_section_contents)
. PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
. different information in this table. *}
. struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
.
+. {* Release the memory associated with the linker hash table. *}
+. void (*_bfd_link_hash_table_free) PARAMS ((struct bfd_link_hash_table *));
+.
. {* Add symbols from this object file into the hash table. *}
. boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
.
+. {* Indicate that we are only retrieving symbol values from this section. *}
+. void (*_bfd_link_just_syms) PARAMS ((asection *, struct bfd_link_info *));
+.
. {* Do a link based on the link_order structures attached to each
. section of the BFD. *}
. boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
. {* Attempt to merge SEC_MERGE sections. *}
. boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
.
+. {* Discard members of a group. *}
+. boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+.
. {* Routines to handle dynamic symbols and relocs. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
.CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
.CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
.CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
.CONCAT2 (NAME,_canonicalize_dynamic_reloc)
-. {* Get the amount of memory required to hold the dynamic symbols. *}
+. {* Get the amount of memory required to hold the dynamic symbols. *}
. long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
. {* Read in the dynamic symbols. *}
. long (*_bfd_canonicalize_dynamic_symtab)
endianness. The function open_output() in ld/ldlang.c uses this field
to find an alternative output format that is suitable.
-. {* Opposite endian version of this target. *}
-. const struct bfd_target * alternative_target;
+. {* Opposite endian version of this target. *}
+. const struct bfd_target * alternative_target;
.
-Data for use by back-end routines, which isn't generic enough to belong
-in this structure.
-
-. PTR backend_data;
+. {* Data for use by back-end routines, which isn't
+. generic enough to belong in this structure. *}
+. PTR backend_data;
.
.} bfd_target;
-
+.
*/
/* All known xvecs (even those that don't compile on all systems).
we can't intermix extern's and initializers. */
extern const bfd_target a29kcoff_big_vec;
extern const bfd_target a_out_adobe_vec;
+extern const bfd_target aix5coff64_vec;
extern const bfd_target aout0_big_vec;
extern const bfd_target aout_arm_big_vec;
extern const bfd_target aout_arm_little_vec;
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_bigarmqnx_vec;
extern const bfd_target bfd_elf32_bigmips_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_h8300_vec;
extern const bfd_target bfd_elf32_hppa_linux_vec;
extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
+extern const bfd_target bfd_elf32_i386_freebsd_vec;
extern const bfd_target bfd_elf32_i386_vec;
+extern const bfd_target bfd_elf32_i386qnx_vec;
extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec;
extern const bfd_target bfd_elf32_i960_vec;
extern const bfd_target bfd_elf32_ia64_big_vec;
extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
+extern const bfd_target bfd_elf32_ip2k_vec;
extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
+extern const bfd_target bfd_elf32_littlearmqnx_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m68hc11_vec;
extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
+extern const bfd_target bfd_elf32_nbigmips_vec;
+extern const bfd_target bfd_elf32_nlittlemips_vec;
+extern const bfd_target bfd_elf32_ntradbigmips_vec;
+extern const bfd_target bfd_elf32_ntradlittlemips_vec;
extern const bfd_target bfd_elf32_openrisc_vec;
+extern const bfd_target bfd_elf32_or32_big_vec;
extern const bfd_target bfd_elf32_pj_vec;
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
+extern const bfd_target bfd_elf32_powerpcleqnx_vec;
+extern const bfd_target bfd_elf32_powerpcqnx_vec;
extern const bfd_target bfd_elf32_s390_vec;
+extern const bfd_target bfd_elf32_sh64_vec;
+extern const bfd_target bfd_elf32_sh64l_vec;
+extern const bfd_target bfd_elf32_sh64lin_vec;
+extern const bfd_target bfd_elf32_sh64blin_vec;
+extern const bfd_target bfd_elf32_sh64lnbsd_vec;
+extern const bfd_target bfd_elf32_sh64nbsd_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
extern const bfd_target bfd_elf32_shlin_vec;
extern const bfd_target bfd_elf32_shlnbsd_vec;
+extern const bfd_target bfd_elf32_shlqnx_vec;
extern const bfd_target bfd_elf32_shnbsd_vec;
+extern const bfd_target bfd_elf32_shqnx_vec;
extern const bfd_target bfd_elf32_sparc_vec;
extern const bfd_target bfd_elf32_tradbigmips_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
extern const bfd_target bfd_elf32_us_cris_vec;
extern const bfd_target bfd_elf32_v850_vec;
+extern const bfd_target bfd_elf32_vax_vec;
extern const bfd_target bfd_elf32_xstormy16_vec;
+extern const bfd_target bfd_elf64_alpha_freebsd_vec;
extern const bfd_target bfd_elf64_alpha_vec;
extern const bfd_target bfd_elf64_big_generic_vec;
extern const bfd_target bfd_elf64_bigmips_vec;
extern const bfd_target bfd_elf64_powerpc_vec;
extern const bfd_target bfd_elf64_powerpcle_vec;
extern const bfd_target bfd_elf64_s390_vec;
+extern const bfd_target bfd_elf64_sh64_vec;
+extern const bfd_target bfd_elf64_sh64l_vec;
+extern const bfd_target bfd_elf64_sh64lin_vec;
+extern const bfd_target bfd_elf64_sh64blin_vec;
+extern const bfd_target bfd_elf64_sh64lnbsd_vec;
+extern const bfd_target bfd_elf64_sh64nbsd_vec;
extern const bfd_target bfd_elf64_sparc_vec;
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
extern const bfd_target nlm32_powerpc_vec;
extern const bfd_target nlm32_sparc_vec;
extern const bfd_target oasys_vec;
+extern const bfd_target or32coff_big_vec;
extern const bfd_target pc532machaout_vec;
extern const bfd_target pc532netbsd_vec;
extern const bfd_target pdp11_aout_vec;
extern const bfd_target sunos_big_vec;
extern const bfd_target tic30_aout_vec;
extern const bfd_target tic30_coff_vec;
+extern const bfd_target tic4x_coff0_beh_vec;
+extern const bfd_target tic4x_coff0_vec;
+extern const bfd_target tic4x_coff1_beh_vec;
+extern const bfd_target tic4x_coff1_vec;
+extern const bfd_target tic4x_coff2_beh_vec;
+extern const bfd_target tic4x_coff2_vec;
extern const bfd_target tic54x_coff0_beh_vec;
extern const bfd_target tic54x_coff0_vec;
extern const bfd_target tic54x_coff1_beh_vec;
extern const bfd_target tic54x_coff2_beh_vec;
extern const bfd_target tic54x_coff2_vec;
extern const bfd_target tic80coff_vec;
+extern const bfd_target vaxbsd_vec;
extern const bfd_target vaxnetbsd_vec;
+extern const bfd_target vax1knetbsd_vec;
extern const bfd_target versados_vec;
extern const bfd_target vms_alpha_vec;
extern const bfd_target vms_vax_vec;
it wasn't omitted by mistake. */
&a29kcoff_big_vec,
&a_out_adobe_vec,
+#ifdef BFD64
+ &aix5coff64_vec,
+#endif
&aout0_big_vec,
#if 0
/* We have no way of distinguishing these from other a.out variants */
&bfd_elf32_bigarc_vec,
&bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigarm_vec,
+ &bfd_elf32_bigarmqnx_vec,
&bfd_elf32_bigmips_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_h8300_vec,
&bfd_elf32_hppa_linux_vec,
&bfd_elf32_hppa_vec,
&bfd_elf32_i370_vec,
+ &bfd_elf32_i386_freebsd_vec,
&bfd_elf32_i386_vec,
+ &bfd_elf32_i386qnx_vec,
&bfd_elf32_i860_little_vec,
&bfd_elf32_i860_vec,
&bfd_elf32_i960_vec,
#if 0
&bfd_elf32_ia64_big_vec,
#endif
+ &bfd_elf32_ia64_hpux_big_vec,
+ &bfd_elf32_ip2k_vec,
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
&bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlearm_vec,
+ &bfd_elf32_littlearmqnx_vec,
&bfd_elf32_littlemips_vec,
&bfd_elf32_m32r_vec,
&bfd_elf32_m68hc11_vec,
&bfd_elf32_mcore_little_vec,
&bfd_elf32_mn10200_vec,
&bfd_elf32_mn10300_vec,
+#ifdef BFD64
+ &bfd_elf32_nbigmips_vec,
+ &bfd_elf32_nlittlemips_vec,
+ &bfd_elf32_ntradbigmips_vec,
+ &bfd_elf32_ntradlittlemips_vec,
+#endif
&bfd_elf32_openrisc_vec,
+ &bfd_elf32_or32_big_vec,
&bfd_elf32_pj_vec,
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
&bfd_elf32_powerpcle_vec,
+ &bfd_elf32_powerpcleqnx_vec,
+ &bfd_elf32_powerpcqnx_vec,
&bfd_elf32_s390_vec,
&bfd_elf32_sh_vec,
&bfd_elf32_shblin_vec,
&bfd_elf32_shl_vec,
&bfd_elf32_shlin_vec,
&bfd_elf32_shlnbsd_vec,
+ &bfd_elf32_shlqnx_vec,
&bfd_elf32_shnbsd_vec,
+ &bfd_elf32_shqnx_vec,
+#ifdef BFD64
+ &bfd_elf32_sh64_vec,
+ &bfd_elf32_sh64l_vec,
+ &bfd_elf32_sh64lnbsd_vec,
+ &bfd_elf32_sh64nbsd_vec,
+ &bfd_elf32_sh64lin_vec,
+ &bfd_elf32_sh64blin_vec,
+#endif
&bfd_elf32_sparc_vec,
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
&bfd_elf32_us_cris_vec,
&bfd_elf32_v850_vec,
+ &bfd_elf32_vax_vec,
&bfd_elf32_xstormy16_vec,
#ifdef BFD64
+ &bfd_elf64_alpha_freebsd_vec,
&bfd_elf64_alpha_vec,
&bfd_elf64_big_generic_vec,
&bfd_elf64_bigmips_vec,
&bfd_elf64_ia64_aix_big_vec,
&bfd_elf64_ia64_aix_little_vec,
&bfd_elf64_ia64_big_vec,
+ &bfd_elf64_ia64_hpux_big_vec,
&bfd_elf64_ia64_little_vec,
&bfd_elf64_little_generic_vec,
&bfd_elf64_littlemips_vec,
&bfd_elf64_powerpc_vec,
&bfd_elf64_powerpcle_vec,
&bfd_elf64_s390_vec,
+ &bfd_elf64_sh64_vec,
+ &bfd_elf64_sh64l_vec,
+ &bfd_elf64_sh64lnbsd_vec,
+ &bfd_elf64_sh64nbsd_vec,
+ &bfd_elf64_sh64lin_vec,
+ &bfd_elf64_sh64blin_vec,
#if 0
&bfd_elf64_sparc_vec,
#endif
can be annoying target mis-matches. */
&oasys_vec,
#endif
+ /* Entry for the OpenRISC family. */
+ &or32coff_big_vec,
+
&pc532machaout_vec,
&pc532netbsd_vec,
&pdp11_aout_vec,
&tic54x_coff2_beh_vec,
&tic54x_coff2_vec,
&tic80coff_vec,
+ &vaxbsd_vec,
&vaxnetbsd_vec,
+ &vax1knetbsd_vec,
&versados_vec,
#ifdef BFD64
&vms_alpha_vec,
NULL
};
+/* bfd_associated_vector[] contains the associated target vectors used
+ to reduce the ambiguity in bfd_check_format_matches. */
+
+static const bfd_target *_bfd_associated_vector[] = {
+#ifdef ASSOCIATED_VECS
+ ASSOCIATED_VECS,
+#endif
+ NULL
+};
+const bfd_target * const *bfd_associated_vector = _bfd_associated_vector;
+
/* When there is an ambiguous match, bfd_check_format_matches puts the
names of the matching targets in an array. This variable is the maximum
number of entries that the array could possibly need. */
vec_length++;
amt = (vec_length + 1) * sizeof (char **);
- name_ptr = name_list = (const char **) bfd_zmalloc (amt);
+ name_ptr = name_list = (const char **) bfd_malloc (amt);
if (name_list == NULL)
return NULL;
for (target = &bfd_target_vector[0]; *target != NULL; target++)
- *(name_ptr++) = (*target)->name;
+ if (target == &bfd_target_vector[0]
+ || *target != bfd_target_vector[0])
+ *name_ptr++ = (*target)->name;
+ *name_ptr = NULL;
return name_list;
}