/* Generic target-file-type support for the BFD library.
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
+ Copyright (C) 1990-2020 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
.{* Forward declaration. *}
.typedef struct flag_info flag_info;
.
+.typedef void (*bfd_cleanup) (bfd *);
+.
.typedef struct bfd_target
.{
. {* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. *}
. {* 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]) (bfd *);
+. {* Check the format of a file being read. Return a <<bfd_cleanup>> on
+. success or zero on failure. *}
+. bfd_cleanup (*_bfd_check_format[bfd_type_end]) (bfd *);
.
. {* Set the format of a file being written. *}
. bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
. return abfd->xvec->symbol_leading_char;
.}
.
+.static inline enum bfd_flavour
+.bfd_asymbol_flavour (const asymbol *sy)
+.{
+. if ((sy->flags & BSF_SYNTHETIC) != 0)
+. return bfd_target_unknown_flavour;
+. return sy->the_bfd->xvec->flavour;
+.}
+.
*/
/* All known xvecs (even those that don't compile on all systems).
extern const bfd_target bfin_elf32_vec;
extern const bfd_target bfin_elf32_fdpic_vec;
extern const bfd_target cr16_elf32_vec;
-extern const bfd_target cr16c_elf32_vec;
extern const bfd_target cris_aout_vec;
extern const bfd_target cris_elf32_vec;
extern const bfd_target cris_elf32_us_vec;
extern const bfd_target tic6x_elf32_c6000_le_vec;
extern const bfd_target tic6x_elf32_linux_be_vec;
extern const bfd_target tic6x_elf32_linux_le_vec;
-extern const bfd_target tic80_coff_vec;
extern const bfd_target tilegx_elf32_be_vec;
extern const bfd_target tilegx_elf32_le_vec;
extern const bfd_target tilegx_elf64_be_vec;
extern const bfd_target xtensa_elf32_be_vec;
extern const bfd_target xtensa_elf32_le_vec;
extern const bfd_target z80_coff_vec;
+extern const bfd_target z80_elf32_vec;
extern const bfd_target z8k_coff_vec;
/* These are always included. */
&bfin_elf32_fdpic_vec,
&cr16_elf32_vec,
- &cr16c_elf32_vec,
&cris_aout_vec,
&cris_elf32_vec,
&tic54x_coff2_vec,
&tic6x_elf32_be_vec,
&tic6x_elf32_le_vec,
- &tic80_coff_vec,
&tilegx_elf32_be_vec,
&tilegx_elf32_le_vec,
&xtensa_elf32_le_vec,
&z80_coff_vec,
+ &z80_elf32_vec,
&z8k_coff_vec,
#endif /* not SELECT_VECS */
bfd_target_list (void)
{
int vec_length = 0;
- bfd_size_type amt;
+ size_t amt;
const bfd_target * const *target;
const char **name_list, **name_ptr;