--- /dev/null
+# This file is a shell script that supplies the information necessary
+# to tailor a template configure script into the configure script
+# appropriate for this directory. For more information, check any
+# existing configure script.
+
+# Since the "bfd/hosts" directory is shared by the bfd, opcodes, and
+# binutils directories (at least), the index to it is also shared.
+# This is that index. Each configure.in file should source this file
+# in its per-host part.
+
+case "${host}" in
+# WHEN ADDING ENTRIES TO THIS MATRIX:
+# Make sure that the left side always has two dashes. Otherwise you
+# can get spurious matches. Even for unambiguous cases, do this as a
+# convention, else the table becomes a real mess to understand and maintain.
+#
+# Note that these entries cannot be fully alphabetical. Don't try.
+# The order of matching is critical when multiple lines could match.
+
+a29k-*-*) my_host=ultra3 ;;
+
+hppa*-hp-hpux) my_host=hppahpux ;;
+hppa*-hp-bsd) my_host=hppabsd ;;
+
+i[34]86-*-bsd) my_host=i386bsd ;;
+i[34]86-ncr*-sysv4*) my_host=ncr3000 ;;
+i[34]86-*-go32) my_host=go32 ;;
+i[34]86-*-sysv4*) my_host=i386v4 ;;
+i[34]86-*-sysv*) my_host=i386v ;;
+i[34]86-*-solaris*) my_host=i386v ;;
+i[34]86-*-sco*) my_host=i386v ;;
+i[34]86-*-mach*) my_host=i386mach ;;
+i[34]86-*-msdos*) my_host=dose ;;
+i[34]86-*-linux) my_host=i386linux ;;
+i[34]86-*-isc*) my_host=i386isc ;;
+i[34]86-*-aix*) my_host=i386aix ;;
+
+i860-*-*) my_host=stratus ;;
+
+mips-dec-*) my_host=decstation ;;
+mips-sgi-irix3) my_host=irix3 ;;
+mips-sgi-irix4) my_host=irix4 ;;
+
+m68*-cbm-amigados) my_host=amigados ;;
+m68*-cbm-sysv4*) my_host=amix ;;
+m68*-hp-hpux) my_host=hp300 ;;
+m68*-hp-bsd) my_host=hp300bsd ;;
+m68*-sony-*) my_host=news ;;
+m68*-sun-*) my_host=sun3 ;;
+m68*-apollo*-sysv*) my_host=apollov68 ;;
+m68*-apollo*-bsd*) my_host=apollo68 ;;
+
+m88k-motorola-*) my_host=delta88 ;;
+m88k-harris-*) my_host=harris ;;
+m88k-*-dgux) my_host=dgux ;;
+
+romp-*-*) my_host=rtbsd ;;
+
+rs6000-*-*) my_host=rs6000 ;;
+
+sparc-*-sunos64) my_host=sparc-ll ;;
+sparc-*-sysv4*) my_host=sysv4 ;;
+sparc-*-solaris2*) my_host=solaris2 ;;
+sparc-*-sysv64) my_host=sysv4-ll ;;
+sparc-*-*) my_host=sparc ;;
+
+tahoe-*-*) my_host=tahoe ;;
+
+vax-*-ultrix*) my_host=vaxult ;;
+vax-*-*) my_host=vaxbsd ;;
+
+we32k-*-*) my_host=we32k ;;
+
+esac
Every BFD points to a target structure with its <<xvec>>
member.
- Shortcut for declaring fields which are prototyped function
- pointers, while avoiding anguish on compilers that don't
- support protos.
-
-.#define SDEF(ret, name, arglist) \
-. PROTO(ret,(*name),arglist)
-.#define SDEF_FMT(ret, name, arglist) \
-. PROTO(ret,(*name[bfd_type_end]),arglist)
-
These macros are used to dispatch to functions through the
bfd_target vector. They are used in a number of macros further
down in @file{bfd.h}, and are also used when calling various
The maximum number of characters in an archive header.
-. unsigned short ar_max_namelen;
+. unsigned short ar_max_namelen;
The minimum alignment restriction for any section.
entry points, since they don't take BFD as first arg. Certain other handlers
could do the same.
-. SDEF (bfd_vma, bfd_getx64, (bfd_byte *));
-. SDEF (void, bfd_putx64, (bfd_vma, bfd_byte *));
-. SDEF (bfd_vma, bfd_getx32, (bfd_byte *));
-. SDEF (void, bfd_putx32, (bfd_vma, bfd_byte *));
-. SDEF (bfd_vma, bfd_getx16, (bfd_byte *));
-. SDEF (void, bfd_putx16, (bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_getx64) PARAMS ((bfd_byte *));
+. void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_getx32) PARAMS ((bfd_byte *));
+. void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_getx16) PARAMS ((bfd_byte *));
+. void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
Byte swapping for the headers
-. SDEF (bfd_vma, bfd_h_getx64, (bfd_byte *));
-. SDEF (void, bfd_h_putx64, (bfd_vma, bfd_byte *));
-. SDEF (bfd_vma, bfd_h_getx32, (bfd_byte *));
-. SDEF (void, bfd_h_putx32, (bfd_vma, bfd_byte *));
-. SDEF (bfd_vma, bfd_h_getx16, (bfd_byte *));
-. SDEF (void, bfd_h_putx16, (bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_h_getx64) PARAMS ((bfd_byte *));
+. void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_h_getx32) PARAMS ((bfd_byte *));
+. void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_h_getx16) PARAMS ((bfd_byte *));
+. void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
-Format dependent routines, these turn into vectors of entry points
-within the target vector structure; one for each format to check.
+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 bfd_target * or zero.
-. SDEF_FMT (struct bfd_target *, _bfd_check_format, (bfd *));
+. struct bfd_target * (*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
Set the format of a file being written.
-. SDEF_FMT (boolean, _bfd_set_format, (bfd *));
+. boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
Write cached information into a file being written, at bfd_close.
-. SDEF_FMT (boolean, _bfd_write_contents, (bfd *));
+. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
The following functions are defined in <<JUMP_TABLE>>. The idea is
that the back end writer of <<foo>> names all the routines
Core file entry points
-. SDEF (char *, _core_file_failing_command, (bfd *));
-. SDEF (int, _core_file_failing_signal, (bfd *));
-. SDEF (boolean, _core_file_matches_executable_p, (bfd *, bfd *));
+. char * (*_core_file_failing_command) PARAMS ((bfd *));
+. int (*_core_file_failing_signal) PARAMS ((bfd *));
+. boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
Archive entry points
-. SDEF (boolean, _bfd_slurp_armap, (bfd *));
-. SDEF (boolean, _bfd_slurp_extended_name_table, (bfd *));
-. SDEF (void, _bfd_truncate_arname, (bfd *, CONST char *, char *));
-. SDEF (boolean, write_armap, (bfd *arch,
+. boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
+. boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
+. void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
+. boolean (*write_armap) PARAMS ((bfd *arch,
. unsigned int elength,
. struct orl *map,
. unsigned int orl_count,
Standard stuff.
-. SDEF (boolean, _close_and_cleanup, (bfd *));
-. SDEF (boolean, _bfd_set_section_contents, (bfd *, sec_ptr, PTR,
+. boolean (*_close_and_cleanup) PARAMS ((bfd *));
+. boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
. file_ptr, bfd_size_type));
-. SDEF (boolean, _bfd_get_section_contents, (bfd *, sec_ptr, PTR,
+. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
. file_ptr, bfd_size_type));
-. SDEF (boolean, _new_section_hook, (bfd *, sec_ptr));
+. boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
Symbols and relocations
-. SDEF (unsigned int, _get_symtab_upper_bound, (bfd *));
-. SDEF (unsigned int, _bfd_canonicalize_symtab,
-. (bfd *, struct symbol_cache_entry **));
-. SDEF (unsigned int, _get_reloc_upper_bound, (bfd *, sec_ptr));
-. SDEF (unsigned int, _bfd_canonicalize_reloc, (bfd *, sec_ptr, arelent **,
-. struct symbol_cache_entry**));
-. SDEF (struct symbol_cache_entry *, _bfd_make_empty_symbol, (bfd *));
-. SDEF (void, _bfd_print_symbol, (bfd *, PTR, struct symbol_cache_entry *,
+. unsigned int (*_get_symtab_upper_bound) PARAMS ((bfd *));
+. unsigned int (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
+. struct symbol_cache_entry **));
+. unsigned int (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+. unsigned int (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
+. struct symbol_cache_entry **));
+. struct symbol_cache_entry *
+. (*_bfd_make_empty_symbol) PARAMS ((bfd *));
+. void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
+. struct symbol_cache_entry *,
. bfd_print_symbol_type));
.#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
-. SDEF (alent *, _get_lineno, (bfd *, struct symbol_cache_entry *));
-.
-. SDEF (boolean, _bfd_set_arch_mach, (bfd *, enum bfd_architecture,
-. unsigned long));
-.
-. SDEF (bfd *, openr_next_archived_file, (bfd *arch, bfd *prev));
-. SDEF (boolean, _bfd_find_nearest_line,
-. (bfd *abfd, struct sec *section,
-. struct symbol_cache_entry **symbols,bfd_vma offset,
-. CONST char **file, CONST char **func, unsigned int *line));
-. SDEF (int, _bfd_stat_arch_elt, (bfd *, struct stat *));
-.
-. SDEF (int, _bfd_sizeof_headers, (bfd *, boolean));
-.
-. SDEF (void, _bfd_debug_info_start, (bfd *));
-. SDEF (void, _bfd_debug_info_end, (bfd *));
-. SDEF (void, _bfd_debug_info_accumulate, (bfd *, struct sec *));
-. SDEF (bfd_byte *, _bfd_get_relocated_section_contents, (bfd*,struct bfd_seclet *, bfd_byte *data));
-. SDEF (boolean,_bfd_relax_section,(bfd *, struct sec *, struct symbol_cache_entry **));
-Special entry points for gdb to swap in coff symbol table parts
-
-. SDEF(void, _bfd_coff_swap_aux_in,(
-. bfd *abfd ,
-. PTR ext,
-. int type,
-. int class ,
-. PTR in));
-.
-. SDEF(void, _bfd_coff_swap_sym_in,(
-. bfd *abfd ,
-. PTR ext,
-. PTR in));
-.
-. SDEF(void, _bfd_coff_swap_lineno_in, (
-. bfd *abfd,
-. PTR ext,
-. PTR in));
-.
-Special entry points for gas to swap coff parts
-
-. SDEF(unsigned int, _bfd_coff_swap_aux_out,(
-. bfd *abfd,
-. PTR in,
-. int type,
-. int class,
-. PTR ext));
-.
-. SDEF(unsigned int, _bfd_coff_swap_sym_out,(
-. bfd *abfd,
-. PTR in,
-. PTR ext));
+. alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
.
-. SDEF(unsigned int, _bfd_coff_swap_lineno_out,(
-. bfd *abfd,
-. PTR in,
-. PTR ext));
+. boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
+. unsigned long));
.
-. SDEF(unsigned int, _bfd_coff_swap_reloc_out,(
-. bfd *abfd,
-. PTR src,
-. PTR dst));
+. bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
+.
+. boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
+. struct sec *section, struct symbol_cache_entry **symbols,
+. bfd_vma offset, CONST char **file, CONST char **func,
+. unsigned int *line));
+.
+. int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
.
-. SDEF(unsigned int, _bfd_coff_swap_filehdr_out,(
-. bfd *abfd,
-. PTR in,
-. PTR out));
+. int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
.
-. SDEF(unsigned int, _bfd_coff_swap_aouthdr_out,(
-. bfd *abfd,
-. PTR in,
-. PTR out));
+. void (*_bfd_debug_info_start) PARAMS ((bfd *));
+. void (*_bfd_debug_info_end) PARAMS ((bfd *));
+. void (*_bfd_debug_info_accumulate) PARAMS ((bfd *, struct sec *));
.
-. SDEF(unsigned int, _bfd_coff_swap_scnhdr_out,(
-. bfd *abfd,
-. PTR in,
-. PTR out));
+. bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
+. struct bfd_seclet *, bfd_byte *data));
.
+. boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
+. struct symbol_cache_entry **));
+
. {* See documentation on reloc types. *}
-. SDEF (CONST struct reloc_howto_struct *,
-. reloc_type_lookup,
-. (bfd *abfd, bfd_reloc_code_real_type code));
+. CONST struct reloc_howto_struct *
+. (*reloc_type_lookup) PARAMS ((bfd *abfd,
+. bfd_reloc_code_real_type code));
.
-. {* Complete and utter crock, currently used for the assembler
+. {* Back-door to allow format-aware applications to create debug symbols
+. while using BFD for everything else. Currently used by the assembler
. when creating COFF files. *}
-. SDEF (asymbol *, _bfd_make_debug_symbol, (
+. asymbol * (*_bfd_make_debug_symbol) PARAMS ((
. bfd *abfd,
. void *ptr,
. unsigned long size));
#ifdef TRAD_CORE
#define SELECT_VECS &DEFAULT_VECTOR,&trad_core_vec
#else
+#ifdef SCO_CORE
+#define SELECT_VECS &DEFAULT_VECTOR,&sco_core_vec
+#else
+#ifdef AIX386_CORE
+#define SELECT_VECS &DEFAULT_VECTOR,&aix386_core_vec
+#else
#define SELECT_VECS &DEFAULT_VECTOR
#endif
#endif
+#endif
+#endif
/* All known xvecs. They are listed a second time below, since
we can't intermix extern's and initializers. */
extern bfd_target i386linux_vec;
extern bfd_target a29kcoff_big_vec;
extern bfd_target trad_core_vec;
+extern bfd_target sco_core_vec;
+extern bfd_target aix386_core_vec;
extern bfd_target rs6000coff_vec;
extern bfd_target h8300coff_vec;
extern bfd_target z8kcoff_vec;
#ifdef TRAD_CORE
&trad_core_vec,
+#endif
+#ifdef SCO_CORE
+ &sco_core_vec,
+#endif
+#ifdef AIX386_CORE
+ &aix386_core_vec,
#endif
NULL, /* end of list marker */
};