* libbfd-in.h, bfd-in.h: Eliminate all PROTO calls, replace with
[deliverable/binutils-gdb.git] / bfd / targets.c
index 49a819616bc444f85097f6f0479dca5aaa4e11c0..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.
@@ -48,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,
@@ -62,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::
@@ -162,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;            
@@ -269,7 +278,7 @@ Symbols and relocations
 .  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 *, bfd_byte *data));
+.  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
 
@@ -375,6 +384,7 @@ 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;
@@ -401,27 +411,10 @@ extern bfd_target hppa_vec;
 #ifdef DEFAULT_VECTOR
 extern bfd_target DEFAULT_VECTOR;
 #endif
-#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
-extern bfd_target HOST_BIG_ENDIAN_DEFAULT_VECTOR;
-#endif
-#ifdef HOST_LITTLE_ENDIAN_DEFAULT_VECTOR
-extern bfd_target HOST_LITTLE_ENDIAN_DEFAULT_VECTOR;
-#endif
 
 #ifdef SELECT_VECS
 
 bfd_target *target_vector[] = {
-
-  /* 960 bout format depends on the host, so let targets choose a
-     default vector even if the provide SELECT_VECS.  */
-#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
-#ifdef HOST_BIG_ENDIAN_P
-       &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
-#else /* ! defined (HOST_BIG_ENDIAN_P) */
-       &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
-#endif /* ! defined (HOST_BIG_ENDIAN_P) */
-#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
-
        SELECT_VECS,
        0
 };
@@ -432,25 +425,19 @@ bfd_target *target_vector[] = {
 
 #ifdef DEFAULT_VECTOR
        &DEFAULT_VECTOR,
-#else /* ! defined (DEFAULT_VECTOR) */
-#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
-#ifdef HOST_BIG_ENDIAN_P
-       &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
-#else /* ! defined (HOST_BIG_ENDIAN_P) */
-       &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
-#endif /* ! defined (HOST_BIG_ENDIAN_P) */
-#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
-#endif /* ! defined (DEFAULT_VECTOR) */
+#endif
 
        &i386coff_vec,
        &i386aout_vec,
        &ecoff_little_vec,
        &ecoff_big_vec,
        &ieee_vec,
-#if 1
+#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,
@@ -466,6 +453,7 @@ bfd_target *target_vector[] = {
        &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,
@@ -490,15 +478,7 @@ bfd_target *target_vector[] = {
 bfd_target *default_vector[] = {
 #ifdef DEFAULT_VECTOR
        &DEFAULT_VECTOR,
-#else /* ! defined (DEFAULT_VECTOR) */
-#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
-#ifdef HOST_BIG_ENDIAN_P
-       &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
-#else /* ! defined (HOST_BIG_ENDIAN_P) */
-       &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
-#endif /* ! defined (HOST_BIG_ENDIAN_P) */
-#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
-#endif /* ! defined (DEFAULT_VECTOR) */
+#endif
        0,
 };
 
@@ -570,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.025157 seconds and 4 git commands to generate.