* libbfd-in.h, bfd-in.h: Eliminate all PROTO calls, replace with
[deliverable/binutils-gdb.git] / bfd / targets.c
index bfd05d40f7609d5d0962684d5598ddc90564fd59..2b3188663aabf28d84e0cb27f9a93f2ef4cf57cf 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic target-file-type support for the BFD library.
-   Copyright (C) 1990-1991 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-/* $Id$ */
-
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
@@ -50,7 +48,9 @@ DESCRIPTION
 
        o If the target string is still NULL, or the target string is
        <<default>>, then the first item in the target vector is used
-       as the target type. @xref{bfd_target}.
+       as the target type, and <<target_defaulted>> is set to
+       cause <<bfd_check_format>> to loop through all the targets.
+       @xref{bfd_target}.  @xref{Formats}.
 
        o Otherwise, the elements in the target vector are inspected
        one by one, until a match on target name is found. When found,
@@ -64,7 +64,9 @@ DESCRIPTION
 
        Once the BFD has been opened and the target selected, the file
        format may be determined. This is done by calling
-       <<bfd_check_format>> on the BFD with a suggested format. The
+       <<bfd_check_format>> on the BFD with a suggested format. 
+       If <<target_defaulted>> has been set, each possible target
+       type is tried to see if it recognizes the specified format.  The
        routine returns <<true>> when the application guesses right.
 @menu
 @* bfd_target::
@@ -76,7 +78,7 @@ DESCRIPTION
 
 INODE
        bfd_target,  , Targets, Targets
-
+DOCDD
 SUBSECTION
        bfd_target
 
@@ -104,6 +106,8 @@ DESCRIPTION
        argument must be parenthesized; it contains all the arguments
        to the called function. 
 
+       They make the documentation (more) unpleasant to read, so if
+       someone wants to fix this and not break the above, please do.
 
 .#define BFD_SEND(bfd, message, arglist) \
 .               ((*((bfd)->xvec->message)) arglist)
@@ -126,7 +130,7 @@ DESCRIPTION
 .typedef struct bfd_target
 .{
 
-identifies the kind of target, eg SunOS4, Ultrix, etc 
+Identifies the kind of target, eg SunOS4, Ultrix, etc.
 
 .  char *name;
 
@@ -140,7 +144,9 @@ of a file.
 .    bfd_target_elf_flavour,
 .    bfd_target_ieee_flavour,
 .    bfd_target_oasys_flavour,
-.    bfd_target_srec_flavour} flavour;
+.    bfd_target_tekhex_flavour,
+.    bfd_target_srec_flavour,
+.    bfd_target_hppa_flavour} flavour;
 
 The order of bytes within the data area of a file.
 
@@ -160,6 +166,11 @@ 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 _.
+
+.  char symbol_leading_char;
+
 The pad character for filenames within an archive header.
 
 .  char ar_pad_char;            
@@ -238,7 +249,7 @@ Standard stuff.
 .                                            file_ptr, bfd_size_type));
 .  SDEF (boolean, _new_section_hook, (bfd *, sec_ptr));
 
-Symbols and reloctions
+Symbols and relocations
 
 .  SDEF (unsigned int, _get_symtab_upper_bound, (bfd *));
 .  SDEF (unsigned int, _bfd_canonicalize_symtab,
@@ -267,8 +278,8 @@ Symbols and reloctions
 .  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_struct *));
-.  SDEF (boolean,_bfd_relax_section,(bfd *, struct sec *, struct symbol_cache_entry **, struct bfd_seclet_struct *));
+.  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,(
@@ -328,6 +339,24 @@ Special entry points for gas to swap coff parts
 .              PTR     in,
 .      PTR     out));
 .
+. {* See documentation on reloc types.  *}
+. SDEF (CONST struct reloc_howto_struct *,
+.       reloc_type_lookup,
+.       (bfd *abfd, bfd_reloc_code_real_type code));
+.
+. {* Complete and utter crock, currently used for the assembler
+.    when creating COFF files.  *}
+. SDEF (asymbol *, _bfd_make_debug_symbol, (
+.       bfd *abfd,
+.       void *ptr,
+.       unsigned long size));
+
+Data for use by back-end routines; e.g., for a.out, includes whether
+this particular target maps ZMAGIC files contiguously or with text and
+data separated.  Could perhaps also be used to eliminate some of the
+above COFF-specific fields.
+
+. PTR backend_data;
 .} bfd_target;
 
 */
@@ -354,6 +383,8 @@ extern bfd_target ecoff_big_vec;
 extern bfd_target sunos_big_vec;
 extern bfd_target demo_64_vec;
 extern bfd_target srec_vec;
+extern bfd_target tekhex_vec;
+extern bfd_target a_out_adobe_vec;
 extern bfd_target b_out_vec_little_host;
 extern bfd_target b_out_vec_big_host;
 extern bfd_target icoff_little_vec;
@@ -366,10 +397,16 @@ extern bfd_target m88kbcs_vec;
 extern bfd_target m68kcoff_vec;
 extern bfd_target i386coff_vec;
 extern bfd_target i386aout_vec;
+extern bfd_target i386linux_vec;
 extern bfd_target a29kcoff_big_vec;
 extern bfd_target trad_core_vec;
 extern bfd_target rs6000coff_vec;
 extern bfd_target h8300coff_vec;
+extern bfd_target z8kcoff_vec;
+extern bfd_target we32kcoff_vec;
+#ifdef hp9000s800
+extern bfd_target hppa_vec;
+#endif
 
 #ifdef DEFAULT_VECTOR
 extern bfd_target DEFAULT_VECTOR;
@@ -398,7 +435,9 @@ bfd_target *target_vector[] = {
 #if 0
        /* We have no oasys tools anymore, so we can't test any of this
           anymore. If you want to test the stuff yourself, go ahead...
-          steve@cygnus.com */
+          steve@cygnus.com
+          Worse, since there is no magic number for archives, there
+          can annoying target mis-matches.  */
        &oasys_vec,
 #endif
        &sunos_big_vec,
@@ -406,17 +445,24 @@ bfd_target *target_vector[] = {
        &demo_64_vec,   /* Only compiled if host has long-long support */
 #endif
        &h8300coff_vec,
+       &z8kcoff_vec,
        &m88kbcs_vec,
        &srec_vec,
+/*     &tekhex_vec,*/
        &icoff_little_vec,
        &icoff_big_vec,
        &elf_little_vec,
        &elf_big_vec,
+       &a_out_adobe_vec,
        &b_out_vec_little_host,
        &b_out_vec_big_host,
        &m68kcoff_vec,
        &a29kcoff_big_vec,
        &rs6000coff_vec,
+#ifdef hp9000s800
+        &hppa_vec,
+#endif
+       &we32kcoff_vec,
 
 #ifdef TRAD_CORE
        &trad_core_vec,
@@ -496,7 +542,7 @@ DESCRIPTION
        modify the names 
 
 SYNOPSIS
-       CONST char **bfd_target_list();
+       CONST char **bfd_target_list(void);
 
 */
 
@@ -504,7 +550,12 @@ CONST char **
 DEFUN_VOID(bfd_target_list)
 {
   int vec_length= 0;
-  bfd_target **target;
+#ifdef NATIVE_HPPAHPUX_COMPILER
+  /* The native compiler on the HP9000/700 has a bug which causes it
+     to loop endlessly when compiling this file.  This avoids it.  */
+  volatile
+#endif
+    bfd_target **target;
   CONST  char **name_list, **name_ptr;
 
   for (target = &target_vector[0]; *target != NULL; target++)
This page took 0.026322 seconds and 4 git commands to generate.