Remove redundant file
[deliverable/binutils-gdb.git] / bfd / ecoff.c
index 4f129f602f6eafa2c38ffa26c58369e6b20b2788..5991fddb7871ea07ada2e92d82d0f26caf0ac804 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic ECOFF (Extended-COFF) routines.
-   Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-   Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+   2002, 2003 Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
 
 \f
 /* Prototypes for static functions.  */
 
-static int ecoff_get_magic PARAMS ((bfd *));
-static long ecoff_sec_to_styp_flags PARAMS ((const char *, flagword));
-static boolean ecoff_slurp_symbolic_header PARAMS ((bfd *));
-static boolean ecoff_set_symbol_info PARAMS ((bfd *, SYMR *, asymbol *, int, int));
-static void ecoff_emit_aggregate PARAMS ((bfd *, FDR *, char *, RNDXR *, long, const char *));
-static char *ecoff_type_to_string PARAMS ((bfd *, FDR *, unsigned int));
-static boolean ecoff_slurp_reloc_table PARAMS ((bfd *, asection *, asymbol **));
-static int ecoff_sort_hdrs PARAMS ((const PTR, const PTR));
-static boolean ecoff_compute_section_file_positions PARAMS ((bfd *));
-static bfd_size_type ecoff_compute_reloc_file_positions PARAMS ((bfd *));
-static boolean ecoff_get_extr PARAMS ((asymbol *, EXTR *));
-static void ecoff_set_index PARAMS ((asymbol *, bfd_size_type));
-static unsigned int ecoff_armap_hash PARAMS ((const char *, unsigned int *, unsigned int, unsigned int));
+static int ecoff_get_magic
+  PARAMS ((bfd *));
+static long ecoff_sec_to_styp_flags
+  PARAMS ((const char *, flagword));
+static bfd_boolean ecoff_slurp_symbolic_header
+  PARAMS ((bfd *));
+static bfd_boolean ecoff_set_symbol_info
+  PARAMS ((bfd *, SYMR *, asymbol *, int, int));
+static void ecoff_emit_aggregate
+  PARAMS ((bfd *, FDR *, char *, RNDXR *, long, const char *));
+static char *ecoff_type_to_string
+  PARAMS ((bfd *, FDR *, unsigned int));
+static bfd_boolean ecoff_slurp_reloc_table
+  PARAMS ((bfd *, asection *, asymbol **));
+static int ecoff_sort_hdrs
+  PARAMS ((const PTR, const PTR));
+static bfd_boolean ecoff_compute_section_file_positions
+  PARAMS ((bfd *));
+static bfd_size_type ecoff_compute_reloc_file_positions
+  PARAMS ((bfd *));
+static bfd_boolean ecoff_get_extr
+  PARAMS ((asymbol *, EXTR *));
+static void ecoff_set_index
+  PARAMS ((asymbol *, bfd_size_type));
+static unsigned int ecoff_armap_hash
+  PARAMS ((const char *, unsigned int *, unsigned int, unsigned int));
 \f
 /* This stuff is somewhat copied from coffcode.h.  */
 
@@ -68,6 +81,12 @@ static asection bfd_debug_section =
   "*DEBUG*", 0,   0,     NULL, 0,     0,            0,
   /* linker_mark, linker_has_input, gc_mark, segment_mark,         */
      0,           0,                0,       0,
+  /* sec_info_type, use_rela_p, has_tls_reloc,                     */
+     0,                    0,          0,
+  /* need_finalize_relax, has_gp_reloc,                            */
+     0,                          0,
+  /* flag13, flag14, flag15, flag16, flag20, flag24,               */
+     0,      0,      0,      0,      0,             0,
   /* vma, lma, _cooked_size, _raw_size,                            */
      0,   0,   0,            0,
   /* output_offset, output_section, alignment_power,               */
@@ -76,21 +95,21 @@ static asection bfd_debug_section =
      NULL,       NULL,        0,           0,       0,
   /* line_filepos, userdata, contents, lineno, lineno_count,       */
      0,            NULL,     NULL,     NULL,   0,
-  /* entsize, comdat, moving_line_filepos,                         */
-     0,       NULL,   0,
+  /* entsize, comdat, kept_section, moving_line_filepos,           */
+     0,       NULL,   NULL,         0,
   /* target_index, used_by_bfd, constructor_chain, owner,          */
      0,            NULL,        NULL,              NULL,
   /* symbol,                                                       */
-     (struct symbol_cache_entry *) NULL,
+     (struct bfd_symbol *) NULL,
   /* symbol_ptr_ptr,                                               */
-     (struct symbol_cache_entry **) NULL,
+     (struct bfd_symbol **) NULL,
   /* link_order_head, link_order_tail                              */
      NULL,            NULL
 };
 
 /* Create an ECOFF object.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_mkobject (abfd)
      bfd *abfd;
 {
@@ -98,9 +117,9 @@ _bfd_ecoff_mkobject (abfd)
 
   abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt);
   if (abfd->tdata.ecoff_obj_data == NULL)
-    return false;
+    return FALSE;
 
-  return true;
+  return TRUE;
 }
 
 /* This is a hook called by coff_real_object_p to create any backend
@@ -151,7 +170,7 @@ _bfd_ecoff_mkobject_hook (abfd, filehdr, aouthdr)
 
 /* Initialize a new section.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_new_section_hook (abfd, section)
      bfd *abfd ATTRIBUTE_UNUSED;
      asection *section;
@@ -182,7 +201,7 @@ _bfd_ecoff_new_section_hook (abfd, section)
      uncertain about .init on some systems and I don't know how shared
      libraries work.  */
 
-  return true;
+  return TRUE;
 }
 
 /* Determine the machine architecture and type.  This is called from
@@ -190,7 +209,7 @@ _bfd_ecoff_new_section_hook (abfd, section)
    below.  This could be an ECOFF backend routine, with one version
    for each target, but there aren't all that many ECOFF targets.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_set_arch_mach_hook (abfd, filehdr)
      bfd *abfd;
      PTR filehdr;
@@ -360,7 +379,7 @@ ecoff_sec_to_styp_flags (name, flags)
 
 /* Get the BFD flags to use for a section.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
      bfd *abfd ATTRIBUTE_UNUSED;
      PTR hdr;
@@ -425,12 +444,12 @@ _bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
     sec_flags |= SEC_ALLOC | SEC_LOAD;
 
   * flags_ptr = sec_flags;
-  return true;
+  return TRUE;
 }
 \f
 /* Read in the symbolic header for an ECOFF object file.  */
 
-static boolean
+static bfd_boolean
 ecoff_slurp_symbolic_header (abfd)
      bfd *abfd;
 {
@@ -442,13 +461,13 @@ ecoff_slurp_symbolic_header (abfd)
   /* See if we've already read it in.  */
   if (ecoff_data (abfd)->debug_info.symbolic_header.magic ==
       backend->debug_swap.sym_magic)
-    return true;
+    return TRUE;
 
   /* See whether there is a symbolic header.  */
   if (ecoff_data (abfd)->sym_filepos == 0)
     {
       bfd_get_symcount (abfd) = 0;
-      return true;
+      return TRUE;
     }
 
   /* At this point bfd_get_symcount (abfd) holds the number of symbols
@@ -459,7 +478,7 @@ ecoff_slurp_symbolic_header (abfd)
   if (bfd_get_symcount (abfd) != external_hdr_size)
     {
       bfd_set_error (bfd_error_bad_value);
-      return false;
+      return FALSE;
     }
 
   /* Read the symbolic information header.  */
@@ -485,18 +504,18 @@ ecoff_slurp_symbolic_header (abfd)
 
   if (raw != NULL)
     free (raw);
-  return true;
+  return TRUE;
  error_return:
   if (raw != NULL)
     free (raw);
-  return false;
+  return FALSE;
 }
 
 /* Read in and swap the important symbolic information for an ECOFF
    object file.  This is called by gdb via the read_debug_info entry
    point in the backend structure.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
      bfd *abfd;
      asection *ignore ATTRIBUTE_UNUSED;
@@ -521,15 +540,15 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
   /* Check whether we've already gotten it, and whether there's any to
      get.  */
   if (ecoff_data (abfd)->raw_syments != (PTR) NULL)
-    return true;
+    return TRUE;
   if (ecoff_data (abfd)->sym_filepos == 0)
     {
       bfd_get_symcount (abfd) = 0;
-      return true;
+      return TRUE;
     }
 
   if (! ecoff_slurp_symbolic_header (abfd))
-    return false;
+    return FALSE;
 
   internal_symhdr = &debug->symbolic_header;
 
@@ -569,11 +588,11 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
   if (raw_size == 0)
     {
       ecoff_data (abfd)->sym_filepos = 0;
-      return true;
+      return TRUE;
     }
   raw = (PTR) bfd_alloc (abfd, raw_size);
   if (raw == NULL)
-    return false;
+    return FALSE;
 
   pos = ecoff_data (abfd)->sym_filepos;
   pos += backend->debug_swap.external_hdr_size;
@@ -581,7 +600,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
       || bfd_bread (raw, raw_size, abfd) != raw_size)
     {
       bfd_release (abfd, raw);
-      return false;
+      return FALSE;
     }
 
   ecoff_data (abfd)->raw_syments = raw;
@@ -620,7 +639,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
   amt *= sizeof (struct fdr);
   debug->fdr = (struct fdr *) bfd_alloc (abfd, amt);
   if (debug->fdr == NULL)
-    return false;
+    return FALSE;
   external_fdr_size = backend->debug_swap.external_fdr_size;
   fdr_ptr = debug->fdr;
   fraw_src = (char *) debug->external_fdr;
@@ -628,7 +647,7 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
   for (; fraw_src < fraw_end; fraw_src += external_fdr_size, fdr_ptr++)
     (*backend->debug_swap.swap_fdr_in) (abfd, (PTR) fraw_src, fdr_ptr);
 
-  return true;
+  return TRUE;
 }
 \f
 /* ECOFF symbol table routines.  The ECOFF symbol table is described
@@ -657,7 +676,7 @@ _bfd_ecoff_make_empty_symbol (abfd)
     return (asymbol *) NULL;
   new->symbol.section = (asection *) NULL;
   new->fdr = (FDR *) NULL;
-  new->local = false;
+  new->local = FALSE;
   new->native = NULL;
   new->symbol.the_bfd = abfd;
   return &new->symbol;
@@ -665,7 +684,7 @@ _bfd_ecoff_make_empty_symbol (abfd)
 
 /* Set the BFD flags and section for an ECOFF symbol.  */
 
-static boolean
+static bfd_boolean
 ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
      bfd *abfd;
      SYMR *ecoff_sym;
@@ -691,12 +710,12 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
       if (ECOFF_IS_STAB (ecoff_sym))
        {
          asym->flags = BSF_DEBUGGING;
-         return true;
+         return TRUE;
        }
       break;
     default:
       asym->flags = BSF_DEBUGGING;
-      return true;
+      return TRUE;
     }
 
   if (weak)
@@ -877,7 +896,7 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
                amt = strlen (name) + 1;
                copy = (char *) bfd_alloc (abfd, amt);
                if (!copy)
-                 return false;
+                 return FALSE;
                strcpy (copy, name);
                section = bfd_make_section (abfd, copy);
              }
@@ -886,7 +905,7 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
            amt = sizeof (arelent_chain);
            reloc_chain = (arelent_chain *) bfd_alloc (abfd, amt);
            if (!reloc_chain)
-             return false;
+             return FALSE;
            reloc_chain->relent.sym_ptr_ptr =
              bfd_get_section (asym)->symbol_ptr_ptr;
            reloc_chain->relent.address = section->_raw_size;
@@ -919,12 +938,12 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
          break;
        }
     }
-  return true;
+  return TRUE;
 }
 
 /* Read an ECOFF symbol table.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_slurp_symbol_table (abfd)
      bfd *abfd;
 {
@@ -947,20 +966,20 @@ _bfd_ecoff_slurp_symbol_table (abfd)
 
   /* If we've already read in the symbol table, do nothing.  */
   if (ecoff_data (abfd)->canonical_symbols != NULL)
-    return true;
+    return TRUE;
 
   /* Get the symbolic information.  */
   if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL,
                                        &ecoff_data (abfd)->debug_info))
-    return false;
+    return FALSE;
   if (bfd_get_symcount (abfd) == 0)
-    return true;
+    return TRUE;
 
   internal_size = bfd_get_symcount (abfd);
   internal_size *= sizeof (ecoff_symbol_type);
   internal = (ecoff_symbol_type *) bfd_alloc (abfd, internal_size);
   if (internal == NULL)
-    return false;
+    return FALSE;
 
   internal_ptr = internal;
   eraw_src = (char *) ecoff_data (abfd)->debug_info.external_ext;
@@ -977,14 +996,14 @@ _bfd_ecoff_slurp_symbol_table (abfd)
       if (!ecoff_set_symbol_info (abfd, &internal_esym.asym,
                                  &internal_ptr->symbol, 1,
                                  internal_esym.weakext))
-       return false;
+       return FALSE;
       /* The alpha uses a negative ifd field for section symbols.  */
       if (internal_esym.ifd >= 0)
        internal_ptr->fdr = (ecoff_data (abfd)->debug_info.fdr
                             + internal_esym.ifd);
       else
        internal_ptr->fdr = NULL;
-      internal_ptr->local = false;
+      internal_ptr->local = FALSE;
       internal_ptr->native = (PTR) eraw_src;
     }
 
@@ -1012,16 +1031,16 @@ _bfd_ecoff_slurp_symbol_table (abfd)
                                       + internal_sym.iss);
          if (!ecoff_set_symbol_info (abfd, &internal_sym,
                                      &internal_ptr->symbol, 0, 0))
-           return false;
+           return FALSE;
          internal_ptr->fdr = fdr_ptr;
-         internal_ptr->local = true;
+         internal_ptr->local = TRUE;
          internal_ptr->native = (PTR) lraw_src;
        }
     }
 
   ecoff_data (abfd)->canonical_symbols = internal;
 
-  return true;
+  return TRUE;
 }
 
 /* Return the amount of space needed for the canonical symbols.  */
@@ -1043,7 +1062,7 @@ _bfd_ecoff_get_symtab_upper_bound (abfd)
 /* Get the canonical symbols.  */
 
 long
-_bfd_ecoff_get_symtab (abfd, alocation)
+_bfd_ecoff_canonicalize_symtab (abfd, alocation)
      bfd *abfd;
      asymbol **alocation;
 {
@@ -1443,7 +1462,7 @@ _bfd_ecoff_get_symbol_info (abfd, symbol, ret)
 
 /* Return whether this is a local label.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_bfd_is_local_label_name (abfd, name)
      bfd *abfd ATTRIBUTE_UNUSED;
      const char *name;
@@ -1642,7 +1661,7 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how)
 \f
 /* Read in the relocs for a section.  */
 
-static boolean
+static bfd_boolean
 ecoff_slurp_reloc_table (abfd, section, symbols)
      bfd *abfd;
      asection *section;
@@ -1659,10 +1678,10 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
   if (section->relocation != (arelent *) NULL
       || section->reloc_count == 0
       || (section->flags & SEC_CONSTRUCTOR) != 0)
-    return true;
+    return TRUE;
 
   if (! _bfd_ecoff_slurp_symbol_table (abfd))
-    return false;
+    return FALSE;
 
   amt = section->reloc_count;
   amt *= sizeof (arelent);
@@ -1673,11 +1692,11 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
   external_relocs = (char *) bfd_alloc (abfd, amt);
   if (internal_relocs == (arelent *) NULL
       || external_relocs == (char *) NULL)
-    return false;
+    return FALSE;
   if (bfd_seek (abfd, section->rel_filepos, SEEK_SET) != 0)
-    return false;
+    return FALSE;
   if (bfd_bread (external_relocs, amt, abfd) != amt)
-    return false;
+    return FALSE;
 
   for (i = 0, rptr = internal_relocs; i < section->reloc_count; i++, rptr++)
     {
@@ -1747,7 +1766,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
 
   section->relocation = internal_relocs;
 
-  return true;
+  return TRUE;
 }
 
 /* Get a canonical list of relocs.  */
@@ -1795,7 +1814,7 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols)
    and return the name of the source file and the line nearest to the
    wanted location.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
                              filename_ptr, functionname_ptr, retline_ptr)
      bfd *abfd;
@@ -1814,7 +1833,7 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
   /* Make sure we have the FDR's.  */
   if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL, debug_info)
       || bfd_get_symcount (abfd) == 0)
-    return false;
+    return FALSE;
 
   if (ecoff_data (abfd)->find_line_info == NULL)
     {
@@ -1822,7 +1841,7 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
       ecoff_data (abfd)->find_line_info
        = (struct ecoff_find_line *) bfd_zalloc (abfd, amt);
       if (ecoff_data (abfd)->find_line_info == NULL)
-       return false;
+       return FALSE;
     }
   line_info = ecoff_data (abfd)->find_line_info;
 
@@ -1844,7 +1863,7 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
    the symbol table, so this function only handles the other debugging
    information.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_bfd_copy_private_bfd_data (ibfd, obfd)
      bfd *ibfd;
      bfd *obfd;
@@ -1854,13 +1873,13 @@ _bfd_ecoff_bfd_copy_private_bfd_data (ibfd, obfd)
   register int i;
   asymbol **sym_ptr_ptr;
   size_t c;
-  boolean local;
+  bfd_boolean local;
 
   /* We only want to copy information over if both BFD's use ECOFF
      format.  */
   if (bfd_get_flavour (ibfd) != bfd_target_ecoff_flavour
       || bfd_get_flavour (obfd) != bfd_target_ecoff_flavour)
-    return true;
+    return TRUE;
 
   /* Copy the GP value and the register masks.  */
   ecoff_data (obfd)->gp = ecoff_data (ibfd)->gp;
@@ -1876,15 +1895,15 @@ _bfd_ecoff_bfd_copy_private_bfd_data (ibfd, obfd)
   c = bfd_get_symcount (obfd);
   sym_ptr_ptr = bfd_get_outsymbols (obfd);
   if (c == 0 || sym_ptr_ptr == (asymbol **) NULL)
-    return true;
+    return TRUE;
 
   /* See if there are any local symbols.  */
-  local = false;
+  local = FALSE;
   for (; c > 0; c--, sym_ptr_ptr++)
     {
       if (ecoffsymbol (*sym_ptr_ptr)->local)
        {
-         local = true;
+         local = TRUE;
          break;
        }
     }
@@ -1947,14 +1966,14 @@ _bfd_ecoff_bfd_copy_private_bfd_data (ibfd, obfd)
        }
     }
 
-  return true;
+  return TRUE;
 }
 \f
 /* Set the architecture.  The supported architecture is stored in the
    backend pointer.  We always set the architecture anyhow, since many
    callers ignore the return value.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_set_arch_mach (abfd, arch, machine)
      bfd *abfd;
      enum bfd_architecture arch;
@@ -1969,7 +1988,7 @@ _bfd_ecoff_set_arch_mach (abfd, arch, machine)
 int
 _bfd_ecoff_sizeof_headers (abfd, reloc)
      bfd *abfd;
-     boolean reloc ATTRIBUTE_UNUSED;
+     bfd_boolean reloc ATTRIBUTE_UNUSED;
 {
   asection *current;
   int c;
@@ -1989,7 +2008,7 @@ _bfd_ecoff_sizeof_headers (abfd, reloc)
 
 /* Get the contents of a section.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_get_section_contents (abfd, section, location, offset, count)
      bfd *abfd;
      asection *section;
@@ -2033,7 +2052,7 @@ ecoff_sort_hdrs (arg1, arg2)
 /* Calculate the file position for each section, and set
    reloc_filepos.  */
 
-static boolean
+static bfd_boolean
 ecoff_compute_section_file_positions (abfd)
      bfd *abfd;
 {
@@ -2042,12 +2061,12 @@ ecoff_compute_section_file_positions (abfd)
   asection *current;
   unsigned int i;
   file_ptr old_sofar;
-  boolean rdata_in_text;
-  boolean first_data, first_nonalloc;
+  bfd_boolean rdata_in_text;
+  bfd_boolean first_data, first_nonalloc;
   const bfd_vma round = ecoff_backend (abfd)->round;
   bfd_size_type amt;
 
-  sofar = _bfd_ecoff_sizeof_headers (abfd, false);
+  sofar = _bfd_ecoff_sizeof_headers (abfd, FALSE);
   file_sofar = sofar;
 
   /* Sort the sections by VMA.  */
@@ -2055,7 +2074,7 @@ ecoff_compute_section_file_positions (abfd)
   amt *= sizeof (asection *);
   sorted_hdrs = (asection **) bfd_malloc (amt);
   if (sorted_hdrs == NULL)
-    return false;
+    return FALSE;
   for (current = abfd->sections, i = 0;
        current != NULL;
        current = current->next, i++)
@@ -2079,15 +2098,15 @@ ecoff_compute_section_file_positions (abfd)
              && strcmp (current->name, _PDATA) != 0
              && strcmp (current->name, _RCONST) != 0)
            {
-             rdata_in_text = false;
+             rdata_in_text = FALSE;
              break;
            }
        }
     }
   ecoff_data (abfd)->rdata_in_text = rdata_in_text;
 
-  first_data = true;
-  first_nonalloc = true;
+  first_data = TRUE;
+  first_nonalloc = TRUE;
   for (i = 0; i < abfd->section_count; i++)
     {
       unsigned int alignment_power;
@@ -2120,7 +2139,7 @@ ecoff_compute_section_file_positions (abfd)
        {
          sofar = (sofar + round - 1) &~ (round - 1);
          file_sofar = (file_sofar + round - 1) &~ (round - 1);
-         first_data = false;
+         first_data = FALSE;
        }
       else if (strcmp (current->name, _LIB) == 0)
        {
@@ -2138,7 +2157,7 @@ ecoff_compute_section_file_positions (abfd)
          /* Skip up to the next page for an unallocated section, such
              as the .comment section on the Alpha.  This leaves room
              for the .bss section.  */
-         first_nonalloc = false;
+         first_nonalloc = FALSE;
          sofar = (sofar + round - 1) &~ (round - 1);
          file_sofar = (file_sofar + round - 1) &~ (round - 1);
        }
@@ -2177,7 +2196,7 @@ ecoff_compute_section_file_positions (abfd)
 
   ecoff_data (abfd)->reloc_filepos = file_sofar;
 
-  return true;
+  return TRUE;
 }
 
 /* Determine the location of the relocs for all the sections in the
@@ -2199,7 +2218,7 @@ ecoff_compute_reloc_file_positions (abfd)
     {
       if (! ecoff_compute_section_file_positions (abfd))
        abort ();
-      abfd->output_has_begun = true;
+      abfd->output_has_begun = TRUE;
     }
 
   reloc_base = ecoff_data (abfd)->reloc_filepos;
@@ -2239,22 +2258,22 @@ ecoff_compute_reloc_file_positions (abfd)
 
 /* Set the contents of a section.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
      bfd *abfd;
      asection *section;
-     PTR location;
+     const PTR location;
      file_ptr offset;
      bfd_size_type count;
 {
   file_ptr pos;
 
   /* This must be done first, because bfd_set_section_contents is
-     going to set output_has_begun to true.  */
+     going to set output_has_begun to TRUE.  */
   if (! abfd->output_has_begun)
     {
       if (! ecoff_compute_section_file_positions (abfd))
-       return false;
+       return FALSE;
     }
 
   /* Handle the .lib section specially so that Irix 4 shared libraries
@@ -2275,14 +2294,14 @@ _bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
     }
 
   if (count == 0)
-    return true;
+    return TRUE;
 
   pos = section->filepos + offset;
   if (bfd_seek (abfd, pos, SEEK_SET) != 0
       || bfd_bwrite (location, count, abfd) != count)
-    return false;
+    return FALSE;
 
-  return true;
+  return TRUE;
 }
 
 /* Get the GP value for an ECOFF file.  This is a hook used by
@@ -2305,7 +2324,7 @@ bfd_ecoff_get_gp_value (abfd)
 /* Set the GP value for an ECOFF file.  This is a hook used by the
    assembler.  */
 
-boolean
+bfd_boolean
 bfd_ecoff_set_gp_value (abfd, gp_value)
      bfd *abfd;
      bfd_vma gp_value;
@@ -2314,18 +2333,18 @@ bfd_ecoff_set_gp_value (abfd, gp_value)
       || bfd_get_format (abfd) != bfd_object)
     {
       bfd_set_error (bfd_error_invalid_operation);
-      return false;
+      return FALSE;
     }
 
   ecoff_data (abfd)->gp = gp_value;
 
-  return true;
+  return TRUE;
 }
 
 /* Set the register masks for an ECOFF file.  This is a hook used by
    the assembler.  */
 
-boolean
+bfd_boolean
 bfd_ecoff_set_regmasks (abfd, gprmask, fprmask, cprmask)
      bfd *abfd;
      unsigned long gprmask;
@@ -2338,7 +2357,7 @@ bfd_ecoff_set_regmasks (abfd, gprmask, fprmask, cprmask)
       || bfd_get_format (abfd) != bfd_object)
     {
       bfd_set_error (bfd_error_invalid_operation);
-      return false;
+      return FALSE;
     }
 
   tdata = ecoff_data (abfd);
@@ -2352,13 +2371,13 @@ bfd_ecoff_set_regmasks (abfd, gprmask, fprmask, cprmask)
        tdata->cprmask[i] = cprmask[i];
     }
 
-  return true;
+  return TRUE;
 }
 
 /* Get ECOFF EXTR information for an external symbol.  This function
    is passed to bfd_ecoff_debug_externals.  */
 
-static boolean
+static bfd_boolean
 ecoff_get_extr (sym, esym)
      asymbol *sym;
      EXTR *esym;
@@ -2373,7 +2392,7 @@ ecoff_get_extr (sym, esym)
       if ((sym->flags & BSF_DEBUGGING) != 0
          || (sym->flags & BSF_LOCAL) != 0
          || (sym->flags & BSF_SECTION_SYM) != 0)
-       return false;
+       return FALSE;
 
       esym->jmptbl = 0;
       esym->cobol_main = 0;
@@ -2385,13 +2404,13 @@ ecoff_get_extr (sym, esym)
       esym->asym.sc = scAbs;
       esym->asym.reserved = 0;
       esym->asym.index = indexNil;
-      return true;
+      return TRUE;
     }
 
   ecoff_sym_ptr = ecoffsymbol (sym);
 
   if (ecoff_sym_ptr->local)
-    return false;
+    return FALSE;
 
   input_bfd = bfd_asymbol_bfd (sym);
   (*(ecoff_backend (input_bfd)->debug_swap.swap_ext_in))
@@ -2417,7 +2436,7 @@ ecoff_get_extr (sym, esym)
        esym->ifd = input_debug->ifdmap[esym->ifd];
     }
 
-  return true;
+  return TRUE;
 }
 
 /* Set the external symbol index.  This routine is passed to
@@ -2433,7 +2452,7 @@ ecoff_set_index (sym, indx)
 
 /* Write out an ECOFF file.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_write_object_contents (abfd)
      bfd *abfd;
 {
@@ -2445,13 +2464,11 @@ _bfd_ecoff_write_object_contents (abfd)
   const bfd_size_type external_hdr_size
     = backend->debug_swap.external_hdr_size;
   const bfd_size_type external_reloc_size = backend->external_reloc_size;
-  void (* const adjust_reloc_out) PARAMS ((bfd *,
-                                          const arelent *,
-                                          struct internal_reloc *))
+  void (* const adjust_reloc_out)
+  PARAMS ((bfd *, const arelent *, struct internal_reloc *))
     = backend->adjust_reloc_out;
-  void (* const swap_reloc_out) PARAMS ((bfd *,
-                                        const struct internal_reloc *,
-                                        PTR))
+  void (* const swap_reloc_out)
+  PARAMS ((bfd *, const struct internal_reloc *, PTR))
     = backend->swap_reloc_out;
   struct ecoff_debug_info * const debug = &ecoff_data (abfd)->debug_info;
   HDRR * const symhdr = &debug->symbolic_header;
@@ -2460,10 +2477,10 @@ _bfd_ecoff_write_object_contents (abfd)
   bfd_size_type reloc_size;
   bfd_size_type text_size;
   bfd_vma text_start;
-  boolean set_text_start;
+  bfd_boolean set_text_start;
   bfd_size_type data_size;
   bfd_vma data_start;
-  boolean set_data_start;
+  bfd_boolean set_data_start;
   bfd_size_type bss_size;
   PTR buff = NULL;
   PTR reloc_buff = NULL;
@@ -2485,14 +2502,14 @@ _bfd_ecoff_write_object_contents (abfd)
     }
 
   if ((abfd->flags & D_PAGED) != 0)
-    text_size = _bfd_ecoff_sizeof_headers (abfd, false);
+    text_size = _bfd_ecoff_sizeof_headers (abfd, FALSE);
   else
     text_size = 0;
   text_start = 0;
-  set_text_start = false;
+  set_text_start = FALSE;
   data_size = 0;
   data_start = 0;
-  set_data_start = false;
+  set_data_start = FALSE;
   bss_size = 0;
 
   /* Write section headers to the file.  */
@@ -2588,7 +2605,7 @@ _bfd_ecoff_write_object_contents (abfd)
          if (! set_text_start || text_start > vma)
            {
              text_start = vma;
-             set_text_start = true;
+             set_text_start = TRUE;
            }
        }
       else if ((section.s_flags & STYP_RDATA) != 0
@@ -2604,7 +2621,7 @@ _bfd_ecoff_write_object_contents (abfd)
          if (! set_data_start || data_start > vma)
            {
              data_start = vma;
-             set_data_start = true;
+             set_data_start = TRUE;
            }
        }
       else if ((section.s_flags & STYP_BSS) != 0
@@ -2870,13 +2887,13 @@ _bfd_ecoff_write_object_contents (abfd)
     bfd_release (abfd, reloc_buff);
   if (buff != NULL)
     free (buff);
-  return true;
+  return TRUE;
  error_return:
   if (reloc_buff != NULL)
     bfd_release (abfd, reloc_buff);
   if (buff != NULL)
     free (buff);
-  return false;
+  return FALSE;
 }
 \f
 /* Archive handling.  ECOFF uses what appears to be a unique type of
@@ -2949,7 +2966,7 @@ ecoff_armap_hash (s, rehash, size, hlog)
 
 /* Read in the armap.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_slurp_armap (abfd)
      bfd *abfd;
 {
@@ -2968,12 +2985,12 @@ _bfd_ecoff_slurp_armap (abfd)
   /* Get the name of the first element.  */
   i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
   if (i == 0)
-      return true;
+      return TRUE;
   if (i != 16)
-      return false;
+      return FALSE;
 
   if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
-    return false;
+    return FALSE;
 
   /* Irix 4.0.5F apparently can use either an ECOFF armap or a
      standard COFF armap.  We could move the ECOFF armap stuff into
@@ -2995,8 +3012,8 @@ _bfd_ecoff_slurp_armap (abfd)
       || strncmp (nextname + ARMAP_END_INDEX,
                  ARMAP_END, sizeof ARMAP_END - 1) != 0)
     {
-      bfd_has_map (abfd) = false;
-      return true;
+      bfd_has_map (abfd) = FALSE;
+      return TRUE;
     }
 
   /* Make sure we have the right byte ordering.  */
@@ -3006,27 +3023,27 @@ _bfd_ecoff_slurp_armap (abfd)
          ^ (bfd_big_endian (abfd))))
     {
       bfd_set_error (bfd_error_wrong_format);
-      return false;
+      return FALSE;
     }
 
   /* Read in the armap.  */
   ardata = bfd_ardata (abfd);
   mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
   if (mapdata == (struct areltdata *) NULL)
-    return false;
+    return FALSE;
   parsed_size = mapdata->parsed_size;
   bfd_release (abfd, (PTR) mapdata);
 
   raw_armap = (char *) bfd_alloc (abfd, parsed_size);
   if (raw_armap == (char *) NULL)
-    return false;
+    return FALSE;
 
   if (bfd_bread ((PTR) raw_armap, parsed_size, abfd) != parsed_size)
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_malformed_archive);
       bfd_release (abfd, (PTR) raw_armap);
-      return false;
+      return FALSE;
     }
 
   ardata->tdata = (PTR) raw_armap;
@@ -3086,7 +3103,7 @@ _bfd_ecoff_slurp_armap (abfd)
   amt *= sizeof (struct symdef);
   symdef_ptr = (struct symdef *) bfd_alloc (abfd, amt);
   if (!symdef_ptr)
-    return false;
+    return FALSE;
 
   ardata->symdefs = (carsym *) symdef_ptr;
 
@@ -3108,14 +3125,14 @@ _bfd_ecoff_slurp_armap (abfd)
   /* Pad to an even boundary.  */
   ardata->first_file_filepos += ardata->first_file_filepos % 2;
 
-  bfd_has_map (abfd) = true;
+  bfd_has_map (abfd) = TRUE;
 
-  return true;
+  return TRUE;
 }
 
 /* Write out an armap.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
      bfd *abfd;
      unsigned int elength;
@@ -3199,15 +3216,15 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
 
   if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), abfd)
       != sizeof (struct ar_hdr))
-    return false;
+    return FALSE;
 
   H_PUT_32 (abfd, hashsize, temp);
   if (bfd_bwrite ((PTR) temp, (bfd_size_type) 4, abfd) != 4)
-    return false;
+    return FALSE;
 
   hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize);
   if (!hashtable)
-    return false;
+    return FALSE;
 
   current = abfd->archive_head;
   last_elt = current;
@@ -3252,21 +3269,21 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
     }
 
   if (bfd_bwrite ((PTR) hashtable, symdefsize, abfd) != symdefsize)
-    return false;
+    return FALSE;
 
   bfd_release (abfd, hashtable);
 
   /* Now write the strings.  */
   H_PUT_32 (abfd, stringsize, temp);
   if (bfd_bwrite ((PTR) temp, (bfd_size_type) 4, abfd) != 4)
-    return false;
+    return FALSE;
   for (i = 0; i < orl_count; i++)
     {
       bfd_size_type len;
 
       len = strlen (*map[i].name) + 1;
       if (bfd_bwrite ((PTR) (*map[i].name), len, abfd) != len)
-       return false;
+       return FALSE;
     }
 
   /* The spec sez this should be a newline.  But in order to be
@@ -3274,10 +3291,10 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
   if (padit)
     {
       if (bfd_bwrite ("", (bfd_size_type) 1, abfd) != 1)
-       return false;
+       return FALSE;
     }
 
-  return true;
+  return TRUE;
 }
 
 /* See whether this BFD is an archive.  If it is, read in the armap
@@ -3343,7 +3360,7 @@ _bfd_ecoff_archive_p (abfd)
       first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
       if (first != NULL)
        {
-         first->target_defaulted = false;
+         first->target_defaulted = FALSE;
          if (bfd_check_format (first, bfd_object)
              && first->xvec != abfd->xvec)
            {
@@ -3372,13 +3389,13 @@ static struct bfd_hash_entry *ecoff_link_hash_newfunc
   PARAMS ((struct bfd_hash_entry *entry,
           struct bfd_hash_table *table,
           const char *string));
-static boolean ecoff_link_add_archive_symbols
+static bfd_boolean ecoff_link_add_archive_symbols
   PARAMS ((bfd *, struct bfd_link_info *));
-static boolean ecoff_link_check_archive_element
-  PARAMS ((bfd *, struct bfd_link_info *, boolean *pneeded));
-static boolean ecoff_link_add_object_symbols
+static bfd_boolean ecoff_link_check_archive_element
+  PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *pneeded));
+static bfd_boolean ecoff_link_add_object_symbols
   PARAMS ((bfd *, struct bfd_link_info *));
-static boolean ecoff_link_add_externals
+static bfd_boolean ecoff_link_add_externals
   PARAMS ((bfd *, struct bfd_link_info *, PTR, char *));
 
 /* Routine to create an entry in an ECOFF link hash table.  */
@@ -3449,7 +3466,7 @@ _bfd_ecoff_bfd_link_hash_table_create (abfd)
 #define ecoff_link_hash_traverse(table, func, info)                    \
   (bfd_link_hash_traverse                                              \
    (&(table)->root,                                                    \
-    (boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+    (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
     (info)))
 
 /* Get the ECOFF link hash table from the info structure.  This is
@@ -3460,7 +3477,7 @@ _bfd_ecoff_bfd_link_hash_table_create (abfd)
 /* Given an ECOFF BFD, add symbols to the global hash table as
    appropriate.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_bfd_link_add_symbols (abfd, info)
      bfd *abfd;
      struct bfd_link_info *info;
@@ -3473,7 +3490,7 @@ _bfd_ecoff_bfd_link_add_symbols (abfd, info)
       return ecoff_link_add_archive_symbols (abfd, info);
     default:
       bfd_set_error (bfd_error_wrong_format);
-      return false;
+      return FALSE;
     }
 }
 
@@ -3484,7 +3501,7 @@ _bfd_ecoff_bfd_link_add_symbols (abfd, info)
    already have a hash table, so there is no reason to construct
    another one.  */
 
-static boolean
+static bfd_boolean
 ecoff_link_add_archive_symbols (abfd, info)
      bfd *abfd;
      struct bfd_link_info *info;
@@ -3502,9 +3519,9 @@ ecoff_link_add_archive_symbols (abfd, info)
     {
       /* An empty archive is a special case.  */
       if (bfd_openr_next_archived_file (abfd, (bfd *) NULL) == NULL)
-       return true;
+       return TRUE;
       bfd_set_error (bfd_error_no_armap);
-      return false;
+      return FALSE;
     }
 
   /* If we don't have any raw data for this archive, as can happen on
@@ -3549,9 +3566,9 @@ ecoff_link_add_archive_symbols (abfd, info)
             entry if it is the tail, because that would lose any
             entries we add to the list later on.  */
          if (*pundef != info->hash->undefs_tail)
-           *pundef = (*pundef)->next;
+           *pundef = (*pundef)->und_next;
          else
-           pundef = &(*pundef)->next;
+           pundef = &(*pundef)->und_next;
          continue;
        }
 
@@ -3561,7 +3578,7 @@ ecoff_link_add_archive_symbols (abfd, info)
         other object format.  */
       if (h->type != bfd_link_hash_undefined)
        {
-         pundef = &(*pundef)->next;
+         pundef = &(*pundef)->und_next;
          continue;
        }
 
@@ -3573,7 +3590,7 @@ ecoff_link_add_archive_symbols (abfd, info)
       if (file_offset == 0)
        {
          /* Nothing in this slot.  */
-         pundef = &(*pundef)->next;
+         pundef = &(*pundef)->und_next;
          continue;
        }
 
@@ -3582,10 +3599,10 @@ ecoff_link_add_archive_symbols (abfd, info)
          || strcmp (name, h->root.string) != 0)
        {
          unsigned int srch;
-         boolean found;
+         bfd_boolean found;
 
          /* That was the wrong symbol.  Try rehashing.  */
-         found = false;
+         found = FALSE;
          for (srch = (hash + rehash) & (armap_count - 1);
               srch != hash;
               srch = (srch + rehash) & (armap_count - 1))
@@ -3597,14 +3614,14 @@ ecoff_link_add_archive_symbols (abfd, info)
              if (name[0] == h->root.string[0]
                  && strcmp (name, h->root.string) == 0)
                {
-                 found = true;
+                 found = TRUE;
                  break;
                }
            }
 
          if (! found)
            {
-             pundef = &(*pundef)->next;
+             pundef = &(*pundef)->und_next;
              continue;
            }
 
@@ -3613,33 +3630,33 @@ ecoff_link_add_archive_symbols (abfd, info)
 
       element = (*backend->get_elt_at_filepos) (abfd, (file_ptr) file_offset);
       if (element == (bfd *) NULL)
-       return false;
+       return FALSE;
 
       if (! bfd_check_format (element, bfd_object))
-       return false;
+       return FALSE;
 
       /* Unlike the generic linker, we know that this element provides
         a definition for an undefined symbol and we know that we want
         to include it.  We don't need to check anything.  */
       if (! (*info->callbacks->add_archive_element) (info, element, name))
-       return false;
+       return FALSE;
       if (! ecoff_link_add_object_symbols (element, info))
-       return false;
+       return FALSE;
 
-      pundef = &(*pundef)->next;
+      pundef = &(*pundef)->und_next;
     }
 
-  return true;
+  return TRUE;
 }
 
 /* This is called if we used _bfd_generic_link_add_archive_symbols
    because we were not dealing with an ECOFF archive.  */
 
-static boolean
+static bfd_boolean
 ecoff_link_check_archive_element (abfd, info, pneeded)
      bfd *abfd;
      struct bfd_link_info *info;
-     boolean *pneeded;
+     bfd_boolean *pneeded;
 {
   const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
   void (* const swap_ext_in) PARAMS ((bfd *, PTR, EXTR *))
@@ -3652,7 +3669,7 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
   char *ext_ptr;
   char *ext_end;
 
-  *pneeded = false;
+  *pneeded = FALSE;
 
   if (! ecoff_slurp_symbolic_header (abfd))
     goto error_return;
@@ -3690,7 +3707,7 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
   for (; ext_ptr < ext_end; ext_ptr += external_ext_size)
     {
       EXTR esym;
-      boolean def;
+      bfd_boolean def;
       const char *name;
       struct bfd_link_hash_entry *h;
 
@@ -3716,10 +3733,10 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
        case scInit:
        case scFini:
        case scRConst:
-         def = true;
+         def = TRUE;
          break;
        default:
-         def = false;
+         def = FALSE;
          break;
        }
 
@@ -3727,7 +3744,7 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
        continue;
 
       name = ssext + esym.asym.iss;
-      h = bfd_link_hash_lookup (info->hash, name, false, false, true);
+      h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
 
       /* Unlike the generic linker, we do not pull in elements because
         of common symbols.  */
@@ -3741,7 +3758,7 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
       if (! ecoff_link_add_externals (abfd, info, external_ext, ssext))
        goto error_return;
 
-      *pneeded = true;
+      *pneeded = TRUE;
       goto successful_return;
     }
 
@@ -3750,19 +3767,19 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
     free (external_ext);
   if (ssext != NULL)
     free (ssext);
-  return true;
+  return TRUE;
  error_return:
   if (external_ext != NULL)
     free (external_ext);
   if (ssext != NULL)
     free (ssext);
-  return false;
+  return FALSE;
 }
 
 /* Add symbols from an ECOFF object file to the global linker hash
    table.  */
 
-static boolean
+static bfd_boolean
 ecoff_link_add_object_symbols (abfd, info)
      bfd *abfd;
      struct bfd_link_info *info;
@@ -3772,14 +3789,14 @@ ecoff_link_add_object_symbols (abfd, info)
   PTR external_ext = NULL;
   bfd_size_type esize;
   char *ssext = NULL;
-  boolean result;
+  bfd_boolean result;
 
   if (! ecoff_slurp_symbolic_header (abfd))
-    return false;
+    return FALSE;
 
   /* If there are no symbols, we don't want it.  */
   if (bfd_get_symcount (abfd) == 0)
-    return true;
+    return TRUE;
 
   symhdr = &ecoff_data (abfd)->debug_info.symbolic_header;
 
@@ -3816,7 +3833,7 @@ ecoff_link_add_object_symbols (abfd, info)
     free (ssext);
   if (external_ext != NULL)
     free (external_ext);
-  return false;
+  return FALSE;
 }
 
 /* Add the external symbols of an object file to the global linker
@@ -3825,7 +3842,7 @@ ecoff_link_add_object_symbols (abfd, info)
    explicitly save any information we may need later on in the link.
    We do not want to read the external symbol information again.  */
 
-static boolean
+static bfd_boolean
 ecoff_link_add_externals (abfd, info, external_ext, ssext)
      bfd *abfd;
      struct bfd_link_info *info;
@@ -3848,7 +3865,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
   amt *= sizeof (struct bfd_link_hash_entry *);
   sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt);
   if (!sym_hash)
-    return false;
+    return FALSE;
   ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash;
 
   ext_ptr = (char *) external_ext;
@@ -3856,7 +3873,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
   for (; ext_ptr < ext_end; ext_ptr += external_ext_size, sym_hash++)
     {
       EXTR esym;
-      boolean skip;
+      bfd_boolean skip;
       bfd_vma value;
       asection *section;
       const char *name;
@@ -3867,7 +3884,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
       (*swap_ext_in) (abfd, (PTR) ext_ptr, &esym);
 
       /* Skip debugging symbols.  */
-      skip = false;
+      skip = FALSE;
       switch (esym.asym.st)
        {
        case stGlobal:
@@ -3877,7 +3894,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
        case stStaticProc:
          break;
        default:
-         skip = true;
+         skip = TRUE;
          break;
        }
 
@@ -3983,8 +4000,8 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
       if (! (_bfd_generic_link_add_one_symbol
             (info, abfd, name,
              (flagword) (esym.weakext ? BSF_WEAK : BSF_GLOBAL),
-             section, value, (const char *) NULL, true, true, sym_hash)))
-       return false;
+             section, value, (const char *) NULL, TRUE, TRUE, sym_hash)))
+       return FALSE;
 
       h = (struct ecoff_link_hash_entry *) *sym_hash;
 
@@ -4024,20 +4041,20 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
        }
     }
 
-  return true;
+  return TRUE;
 }
 \f
 /* ECOFF final link routines.  */
 
-static boolean ecoff_final_link_debug_accumulate
+static bfd_boolean ecoff_final_link_debug_accumulate
   PARAMS ((bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *,
           PTR handle));
-static boolean ecoff_link_write_external
+static bfd_boolean ecoff_link_write_external
   PARAMS ((struct ecoff_link_hash_entry *, PTR));
-static boolean ecoff_indirect_link_order
+static bfd_boolean ecoff_indirect_link_order
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
           struct bfd_link_order *));
-static boolean ecoff_reloc_link_order
+static bfd_boolean ecoff_reloc_link_order
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
           struct bfd_link_order *));
 
@@ -4054,7 +4071,7 @@ struct extsym_info
    processes all the link order information.  This may cause it to
    close and reopen some input BFDs; I'll see how bad this is.  */
 
-boolean
+bfd_boolean
 _bfd_ecoff_bfd_final_link (abfd, info)
      bfd *abfd;
      struct bfd_link_info *info;
@@ -4101,18 +4118,18 @@ _bfd_ecoff_bfd_final_link (abfd, info)
 
   handle = bfd_ecoff_debug_init (abfd, debug, &backend->debug_swap, info);
   if (handle == (PTR) NULL)
-    return false;
+    return FALSE;
 
   /* Accumulate the debugging symbols from each input BFD.  */
   for (input_bfd = info->input_bfds;
        input_bfd != (bfd *) NULL;
        input_bfd = input_bfd->link_next)
     {
-      boolean ret;
+      bfd_boolean ret;
 
       if (bfd_get_flavour (input_bfd) == bfd_target_ecoff_flavour)
        {
-         /* Abitrarily set the symbolic header vstamp to the vstamp
+         /* Arbitrarily set the symbolic header vstamp to the vstamp
             of the first object file in the link.  */
          if (symhdr->vstamp == 0)
            symhdr->vstamp
@@ -4125,7 +4142,7 @@ _bfd_ecoff_bfd_final_link (abfd, info)
                                                debug, &backend->debug_swap,
                                                input_bfd, info);
       if (! ret)
-       return false;
+       return FALSE;
 
       /* Combine the register masks.  */
       ecoff_data (abfd)->gprmask |= ecoff_data (input_bfd)->gprmask;
@@ -4143,7 +4160,7 @@ _bfd_ecoff_bfd_final_link (abfd, info)
                            ecoff_link_write_external,
                            (PTR) &einfo);
 
-  if (info->relocateable)
+  if (info->relocatable)
     {
       /* We need to make a pass over the link_orders to count up the
         number of relocations we will need to output, so that we know
@@ -4169,11 +4186,11 @@ _bfd_ecoff_bfd_final_link (abfd, info)
   if (! bfd_ecoff_write_accumulated_debug (handle, abfd, debug,
                                           &backend->debug_swap, info,
                                           ecoff_data (abfd)->sym_filepos))
-    return false;
+    return FALSE;
 
   bfd_ecoff_debug_free (handle, abfd, debug, &backend->debug_swap, info);
 
-  if (info->relocateable)
+  if (info->relocatable)
     {
       /* Now reset the reloc_count field of the sections in the output
         BFD to 0, so that we can use them to keep track of how many
@@ -4187,13 +4204,13 @@ _bfd_ecoff_bfd_final_link (abfd, info)
     {
       struct bfd_link_hash_entry *h;
 
-      h = bfd_link_hash_lookup (info->hash, "_gp", false, false, true);
+      h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE);
       if (h != (struct bfd_link_hash_entry *) NULL
          && h->type == bfd_link_hash_defined)
        ecoff_data (abfd)->gp = (h->u.def.value
                                 + h->u.def.section->output_section->vma
                                 + h->u.def.section->output_offset);
-      else if (info->relocateable)
+      else if (info->relocatable)
        {
          bfd_vma lo;
 
@@ -4230,34 +4247,34 @@ _bfd_ecoff_bfd_final_link (abfd, info)
                  == bfd_target_ecoff_flavour))
            {
              if (! ecoff_indirect_link_order (abfd, info, o, p))
-               return false;
+               return FALSE;
            }
          else if (p->type == bfd_section_reloc_link_order
                   || p->type == bfd_symbol_reloc_link_order)
            {
              if (! ecoff_reloc_link_order (abfd, info, o, p))
-               return false;
+               return FALSE;
            }
          else
            {
              if (! _bfd_default_link_order (abfd, info, o, p))
-               return false;
+               return FALSE;
            }
        }
     }
 
   bfd_get_symcount (abfd) = symhdr->iextMax + symhdr->isymMax;
 
-  ecoff_data (abfd)->linker = true;
+  ecoff_data (abfd)->linker = TRUE;
 
-  return true;
+  return TRUE;
 }
 
 /* Accumulate the debugging information for an input BFD into the
    output BFD.  This must read in the symbolic information of the
    input BFD.  */
 
-static boolean
+static bfd_boolean
 ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
      bfd *output_bfd;
      bfd *input_bfd;
@@ -4268,7 +4285,7 @@ ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
   const struct ecoff_debug_swap * const swap =
     &ecoff_backend (input_bfd)->debug_swap;
   HDRR *symhdr = &debug->symbolic_header;
-  boolean ret;
+  bfd_boolean ret;
 
 #define READ(ptr, offset, count, size, type)                            \
   if (symhdr->count == 0)                                               \
@@ -4279,13 +4296,13 @@ ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
       debug->ptr = (type) bfd_malloc (amt);                             \
       if (debug->ptr == NULL)                                           \
        {                                                                \
-          ret = false;                                                  \
+          ret = FALSE;                                                  \
           goto return_something;                                        \
        }                                                                \
       if (bfd_seek (input_bfd, (file_ptr) symhdr->offset, SEEK_SET) != 0 \
          || bfd_bread (debug->ptr, amt, input_bfd) != amt)              \
        {                                                                \
-          ret = false;                                                  \
+          ret = FALSE;                                                  \
           goto return_something;                                        \
        }                                                                \
     }
@@ -4356,37 +4373,37 @@ ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
 /* Put out information for an external symbol.  These come only from
    the hash table.  */
 
-static boolean
+static bfd_boolean
 ecoff_link_write_external (h, data)
      struct ecoff_link_hash_entry *h;
      PTR data;
 {
   struct extsym_info *einfo = (struct extsym_info *) data;
   bfd *output_bfd = einfo->abfd;
-  boolean strip;
+  bfd_boolean strip;
 
   if (h->root.type == bfd_link_hash_warning)
     {
       h = (struct ecoff_link_hash_entry *) h->root.u.i.link;
       if (h->root.type == bfd_link_hash_new)
-       return true;
+       return TRUE;
     }
 
   /* We need to check if this symbol is being stripped.  */
   if (h->root.type == bfd_link_hash_undefined
       || h->root.type == bfd_link_hash_undefweak)
-    strip = false;
+    strip = FALSE;
   else if (einfo->info->strip == strip_all
           || (einfo->info->strip == strip_some
               && bfd_hash_lookup (einfo->info->keep_hash,
                                   h->root.root.string,
-                                  false, false) == NULL))
-    strip = true;
+                                  FALSE, FALSE) == NULL))
+    strip = TRUE;
   else
-    strip = false;
+    strip = FALSE;
 
   if (strip || h->written)
-    return true;
+    return TRUE;
 
   if (h->abfd == (bfd *) NULL)
     {
@@ -4484,7 +4501,7 @@ ecoff_link_write_external (h, data)
     case bfd_link_hash_indirect:
       /* We ignore these symbols, since the indirected symbol is
         already in the hash table.  */
-      return true;
+      return TRUE;
     }
 
   /* bfd_ecoff_debug_one_external uses iextMax to keep track of the
@@ -4500,7 +4517,7 @@ ecoff_link_write_external (h, data)
 
 /* Relocate and write an ECOFF section into an ECOFF output file.  */
 
-static boolean
+static bfd_boolean
 ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
      bfd *output_bfd;
      struct bfd_link_info *info;
@@ -4509,7 +4526,6 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
 {
   asection *input_section;
   bfd *input_bfd;
-  struct ecoff_section_tdata *section_tdata;
   bfd_size_type raw_size;
   bfd_size_type cooked_size;
   bfd_byte *contents = NULL;
@@ -4521,11 +4537,10 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
   BFD_ASSERT ((output_section->flags & SEC_HAS_CONTENTS) != 0);
 
   if (link_order->size == 0)
-    return true;
+    return TRUE;
 
   input_section = link_order->u.indirect.section;
   input_bfd = input_section->owner;
-  section_tdata = ecoff_section_data (input_bfd, input_section);
 
   raw_size = input_section->_raw_size;
   cooked_size = input_section->_cooked_size;
@@ -4543,39 +4558,24 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
   if (contents == NULL && amt != 0)
     goto error_return;
 
-  /* If we are relaxing, the contents may have already been read into
-     memory, in which case we copy them into our new buffer.  We don't
-     simply reuse the old buffer in case cooked_size > raw_size.  */
-  if (section_tdata != (struct ecoff_section_tdata *) NULL
-      && section_tdata->contents != (bfd_byte *) NULL)
-    memcpy (contents, section_tdata->contents, (size_t) raw_size);
-  else
-    {
-      if (! bfd_get_section_contents (input_bfd, input_section,
-                                     (PTR) contents,
-                                     (file_ptr) 0, raw_size))
-       goto error_return;
-    }
+  if (! bfd_get_section_contents (input_bfd, input_section,
+                                 (PTR) contents,
+                                 (file_ptr) 0, raw_size))
+    goto error_return;
 
   /* Get the relocs.  If we are relaxing MIPS code, they will already
      have been read in.  Otherwise, we read them in now.  */
   external_reloc_size = ecoff_backend (input_bfd)->external_reloc_size;
   external_relocs_size = external_reloc_size * input_section->reloc_count;
 
-  if (section_tdata != (struct ecoff_section_tdata *) NULL
-      && section_tdata->external_relocs != NULL)
-    external_relocs = section_tdata->external_relocs;
-  else
-    {
-      external_relocs = (PTR) bfd_malloc (external_relocs_size);
-      if (external_relocs == NULL && external_relocs_size != 0)
-       goto error_return;
+  external_relocs = (PTR) bfd_malloc (external_relocs_size);
+  if (external_relocs == NULL && external_relocs_size != 0)
+    goto error_return;
 
-      if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
-         || (bfd_bread (external_relocs, external_relocs_size, input_bfd)
-             != external_relocs_size))
-       goto error_return;
-    }
+  if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
+      || (bfd_bread (external_relocs, external_relocs_size, input_bfd)
+         != external_relocs_size))
+    goto error_return;
 
   /* Relocate the section contents.  */
   if (! ((*ecoff_backend (input_bfd)->relocate_section)
@@ -4591,11 +4591,11 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
                                  cooked_size))
     goto error_return;
 
-  /* If we are producing relocateable output, the relocs were
+  /* If we are producing relocatable output, the relocs were
      modified, and we write them out now.  We use the reloc_count
      field of output_section to keep track of the number of relocs we
      have output so far.  */
-  if (info->relocateable)
+  if (info->relocatable)
     {
       file_ptr pos = (output_section->rel_filepos
                      + output_section->reloc_count * external_reloc_size);
@@ -4608,16 +4608,16 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
 
   if (contents != NULL)
     free (contents);
-  if (external_relocs != NULL && section_tdata == NULL)
+  if (external_relocs != NULL)
     free (external_relocs);
-  return true;
+  return TRUE;
 
  error_return:
   if (contents != NULL)
     free (contents);
-  if (external_relocs != NULL && section_tdata == NULL)
+  if (external_relocs != NULL)
     free (external_relocs);
-  return false;
+  return FALSE;
 }
 
 /* Generate a reloc when linking an ECOFF file.  This is a reloc
@@ -4625,7 +4625,7 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
    is used to build constructor and destructor tables when linking
    with -Ur.  */
 
-static boolean
+static bfd_boolean
 ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
      bfd *output_bfd;
      struct bfd_link_info *info;
@@ -4639,7 +4639,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
   struct internal_reloc in;
   bfd_size_type external_reloc_size;
   bfd_byte *rbuf;
-  boolean ok;
+  bfd_boolean ok;
   file_ptr pos;
 
   type = link_order->type;
@@ -4654,7 +4654,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
   if (rel.howto == 0)
     {
       bfd_set_error (bfd_error_bad_value);
-      return false;
+      return FALSE;
     }
 
   if (type == bfd_section_reloc_link_order)
@@ -4670,7 +4670,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
          actually against the section.  */
       h = bfd_wrapped_link_hash_lookup (output_bfd, info,
                                        link_order->u.reloc.p->u.name,
-                                       false, false, false);
+                                       FALSE, FALSE, FALSE);
       if (h != NULL
          && (h->type == bfd_link_hash_defined
              || h->type == bfd_link_hash_defweak))
@@ -4704,7 +4704,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
       size = bfd_get_reloc_size (rel.howto);
       buf = (bfd_byte *) bfd_zmalloc (size);
       if (buf == (bfd_byte *) NULL)
-       return false;
+       return FALSE;
       rstat = _bfd_relocate_contents (rel.howto, output_bfd,
                                      (bfd_vma) addend, buf);
       switch (rstat)
@@ -4724,7 +4724,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
                  (asection *) NULL, (bfd_vma) 0)))
            {
              free (buf);
-             return false;
+             return FALSE;
            }
          break;
        }
@@ -4732,7 +4732,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
                                     (file_ptr) link_order->offset, size);
       free (buf);
       if (! ok)
-       return false;
+       return FALSE;
     }
 
   rel.addend = 0;
@@ -4749,7 +4749,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
       h = ((struct ecoff_link_hash_entry *)
           bfd_wrapped_link_hash_lookup (output_bfd, info,
                                         link_order->u.reloc.p->u.name,
-                                        false, false, true));
+                                        FALSE, FALSE, TRUE));
       if (h != (struct ecoff_link_hash_entry *) NULL
          && h->indx != -1)
        in.r_symndx = h->indx;
@@ -4758,7 +4758,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
          if (! ((*info->callbacks->unattached_reloc)
                 (info, link_order->u.reloc.p->u.name, (bfd *) NULL,
                  (asection *) NULL, (bfd_vma) 0)))
-           return false;
+           return FALSE;
          in.r_symndx = 0;
        }
       in.r_extern = 1;
@@ -4810,7 +4810,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
   external_reloc_size = ecoff_backend (output_bfd)->external_reloc_size;
   rbuf = (bfd_byte *) bfd_malloc (external_reloc_size);
   if (rbuf == (bfd_byte *) NULL)
-    return false;
+    return FALSE;
 
   (*ecoff_backend (output_bfd)->swap_reloc_out) (output_bfd, &in, (PTR) rbuf);
 
This page took 0.062376 seconds and 4 git commands to generate.