Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/bfd/ieee.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* BFD back-end for ieee-695 objects.
    22   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    3    2000, 2001
     3   2000, 2001, 2002, 2003
    44   Free Software Foundation, Inc.
    55
    66   Written by Steve Chamberlain of Cygnus Support.
    77
    8 This file is part of BFD, the Binary File Descriptor library.
    9 
    10 This program is free software; you can redistribute it and/or modify
    11 it under the terms of the GNU General Public License as published by
    12 the Free Software Foundation; either version 2 of the License, or
    13 (at your option) any later version.
    14 
    15 This program is distributed in the hope that it will be useful,
    16 but WITHOUT ANY WARRANTY; without even the implied warranty of
    17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    18 GNU General Public License for more details.
    19 
    20 You should have received a copy of the GNU General Public License
    21 along with this program; if not, write to the Free Software
    22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
     8   This file is part of BFD, the Binary File Descriptor library.
     9
     10   This program is free software; you can redistribute it and/or modify
     11   it under the terms of the GNU General Public License as published by
     12   the Free Software Foundation; either version 2 of the License, or
     13   (at your option) any later version.
     14
     15   This program is distributed in the hope that it will be useful,
     16   but WITHOUT ANY WARRANTY; without even the implied warranty of
     17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18   GNU General Public License for more details.
     19
     20   You should have received a copy of the GNU General Public License
     21   along with this program; if not, write to the Free Software
     22   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    2323
    2424#define KEEPMINUSPCININST 0
     
    3333#include "ieee.h"
    3434#include "libieee.h"
    35 
    36 #include <ctype.h>
    37 
    38 static boolean ieee_write_byte PARAMS ((bfd *, int));
    39 static boolean ieee_write_2bytes PARAMS ((bfd *, int));
    40 static boolean ieee_write_int PARAMS ((bfd *, bfd_vma));
    41 static boolean ieee_write_id PARAMS ((bfd *, const char *));
    42 static boolean ieee_write_expression
    43   PARAMS ((bfd *, bfd_vma, asymbol *, boolean, unsigned int));
    44 static void ieee_write_int5 PARAMS ((bfd_byte *, bfd_vma));
    45 static boolean ieee_write_int5_out PARAMS ((bfd *, bfd_vma));
    46 static boolean ieee_write_section_part PARAMS ((bfd *));
    47 static boolean do_with_relocs PARAMS ((bfd *, asection *));
    48 static boolean do_as_repeat PARAMS ((bfd *, asection *));
    49 static boolean do_without_relocs PARAMS ((bfd *, asection *));
    50 static boolean ieee_write_external_part PARAMS ((bfd *));
    51 static boolean ieee_write_data_part PARAMS ((bfd *));
    52 static boolean ieee_write_debug_part PARAMS ((bfd *));
    53 static boolean ieee_write_me_part PARAMS ((bfd *));
    54 static boolean ieee_write_processor PARAMS ((bfd *));
    55 
    56 static boolean ieee_slurp_debug PARAMS ((bfd *));
    57 static boolean ieee_slurp_section_data PARAMS ((bfd *));
     35#include "safe-ctype.h"
     36
     37struct output_buffer_struct
     38{
     39  unsigned char *ptrp;
     40  int buffer;
     41};
     42
     43static bfd_boolean ieee_write_byte
     44  PARAMS ((bfd *, int));
     45static bfd_boolean ieee_write_2bytes
     46  PARAMS ((bfd *, int));
     47static bfd_boolean ieee_write_int
     48  PARAMS ((bfd *, bfd_vma));
     49static bfd_boolean ieee_write_id
     50  PARAMS ((bfd *, const char *));
     51static unsigned short read_2bytes
     52  PARAMS ((common_header_type *));
     53static void bfd_get_string
     54  PARAMS ((common_header_type *, char *, size_t));
     55static char *read_id
     56  PARAMS ((common_header_type *));
     57static bfd_boolean ieee_write_expression
     58  PARAMS ((bfd *, bfd_vma, asymbol *, bfd_boolean, unsigned int));
     59static void ieee_write_int5
     60  PARAMS ((bfd_byte *, bfd_vma));
     61static bfd_boolean ieee_write_int5_out
     62  PARAMS ((bfd *, bfd_vma));
     63static bfd_boolean parse_int
     64  PARAMS ((common_header_type *, bfd_vma *));
     65static int parse_i
     66  PARAMS ((common_header_type *, bfd_boolean *));
     67static bfd_vma must_parse_int
     68  PARAMS ((common_header_type *));
     69static void parse_expression
     70  PARAMS ((ieee_data_type *, bfd_vma *, ieee_symbol_index_type *,
     71           bfd_boolean *, unsigned int *, asection **));
     72static file_ptr ieee_part_after
     73  PARAMS ((ieee_data_type *, file_ptr));
     74static ieee_symbol_type *get_symbol
     75  PARAMS ((bfd *, ieee_data_type *, ieee_symbol_type *, unsigned int *,
     76           ieee_symbol_type ***, unsigned int *, int));
     77static bfd_boolean ieee_slurp_external_symbols
     78  PARAMS ((bfd *));
     79static bfd_boolean ieee_slurp_symbol_table
     80  PARAMS ((bfd *));
     81static long ieee_get_symtab_upper_bound
     82  PARAMS ((bfd *));
     83static long ieee_get_symtab
     84  PARAMS ((bfd *, asymbol **));
     85static asection *get_section_entry
     86  PARAMS ((bfd *, ieee_data_type *i, unsigned int));
     87static void ieee_slurp_sections
     88  PARAMS ((bfd *));
     89static bfd_boolean ieee_slurp_debug
     90  PARAMS ((bfd *));
     91const bfd_target *ieee_archive_p
     92  PARAMS ((bfd *));
     93const bfd_target *ieee_object_p
     94  PARAMS ((bfd *));
     95static void ieee_get_symbol_info
     96  PARAMS ((bfd *, asymbol *, symbol_info *));
     97static void ieee_print_symbol
     98  PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
     99static bfd_boolean do_one
     100  PARAMS ((ieee_data_type *, ieee_per_section_type *, unsigned char *,
     101           asection *, int));
     102static bfd_boolean ieee_slurp_section_data
     103  PARAMS ((bfd *));
     104static bfd_boolean ieee_new_section_hook
     105  PARAMS ((bfd *, asection *));
     106static long ieee_get_reloc_upper_bound
     107  PARAMS ((bfd *, sec_ptr));
     108static bfd_boolean ieee_get_section_contents
     109  PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
     110static long ieee_canonicalize_reloc
     111  PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
     112static int comp
     113  PARAMS ((const PTR, const PTR));
     114static bfd_boolean ieee_write_section_part
     115  PARAMS ((bfd *));
     116static bfd_boolean do_with_relocs
     117  PARAMS ((bfd *, asection *));
     118static bfd_boolean do_as_repeat
     119  PARAMS ((bfd *, asection *));
     120static bfd_boolean do_without_relocs
     121  PARAMS ((bfd *, asection *));
     122static bfd_boolean ieee_mkobject
     123  PARAMS ((bfd *));
     124static void fill
     125  PARAMS ((void));
     126static void flush
     127  PARAMS ((void));
     128static void write_int
     129  PARAMS ((int));
     130static void copy_id
     131  PARAMS ((void));
     132static void copy_expression
     133  PARAMS ((void));
     134static void fill_int
     135  PARAMS ((struct output_buffer_struct *));
     136static void drop_int
     137  PARAMS ((struct output_buffer_struct *));
     138static void copy_int
     139  PARAMS ((void));
     140static void f1_record
     141  PARAMS ((void));
     142static void f0_record
     143  PARAMS ((void));
     144static void copy_till_end
     145  PARAMS ((void));
     146static void f2_record
     147  PARAMS ((void));
     148static void f8_record
     149  PARAMS ((void));
     150static void e2_record
     151  PARAMS ((void));
     152static void block
     153  PARAMS ((void));
     154static void relocate_debug
     155  PARAMS ((bfd *, bfd *));
     156static bfd_boolean ieee_write_debug_part
     157  PARAMS ((bfd *));
     158static bfd_boolean ieee_write_data_part
     159  PARAMS ((bfd *));
     160static bfd_boolean init_for_output
     161  PARAMS ((bfd *));
     162static bfd_boolean ieee_set_section_contents
     163  PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
     164static bfd_boolean ieee_write_external_part
     165  PARAMS ((bfd *));
     166static bfd_boolean ieee_write_me_part
     167  PARAMS ((bfd *));
     168static bfd_boolean ieee_write_processor
     169  PARAMS ((bfd *));
     170static bfd_boolean ieee_write_object_contents
     171  PARAMS ((bfd *));
     172static asymbol *ieee_make_empty_symbol
     173  PARAMS ((bfd *));
     174static bfd *ieee_openr_next_archived_file
     175  PARAMS ((bfd *, bfd *));
     176static bfd_boolean ieee_find_nearest_line
     177  PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
     178           const char **, unsigned int *));
     179static int ieee_generic_stat_arch_elt
     180  PARAMS ((bfd *, struct stat *));
     181static int ieee_sizeof_headers
     182  PARAMS ((bfd *, bfd_boolean));
    58183
    59184/* Functions for writing to ieee files in the strange way that the
    60185   standard requires. */
    61186
    62 static boolean
     187static bfd_boolean
    63188ieee_write_byte (abfd, barg)
    64189     bfd *abfd;
     
    68193
    69194  byte = barg;
    70   if (bfd_write ((PTR) &byte, 1, 1, abfd) != 1)
    71     return false;
    72   return true;
    73 }
    74 
    75 static boolean
     195  if (bfd_bwrite ((PTR) &byte, (bfd_size_type) 1, abfd) != 1)
     196    return FALSE;
     197  return TRUE;
     198}
     199
     200static bfd_boolean
    76201ieee_write_2bytes (abfd, bytes)
    77202     bfd *abfd;
     
    82207  buffer[0] = bytes >> 8;
    83208  buffer[1] = bytes & 0xff;
    84   if (bfd_write ((PTR) buffer, 1, 2, abfd) != 2)
    85     return false;
    86   return true;
    87 }
    88 
    89 static boolean
     209  if (bfd_bwrite ((PTR) buffer, (bfd_size_type) 2, abfd) != 2)
     210    return FALSE;
     211  return TRUE;
     212}
     213
     214static bfd_boolean
    90215ieee_write_int (abfd, value)
    91216     bfd *abfd;
     
    95220    {
    96221      if (! ieee_write_byte (abfd, (bfd_byte) value))
    97         return false;
     222        return FALSE;
    98223    }
    99224  else
     
    101226      unsigned int length;
    102227
    103       /* How many significant bytes ? */
    104       /* FIXME FOR LONGER INTS */
     228      /* How many significant bytes ?  */
     229      /* FIXME FOR LONGER INTS. */
    105230      if (value & 0xff000000)
    106231        length = 4;
     
    115240                             (bfd_byte) ((int) ieee_number_repeat_start_enum
    116241                                         + length)))
    117         return false;
     242        return FALSE;
    118243      switch (length)
    119244        {
    120245        case 4:
    121246          if (! ieee_write_byte (abfd, (bfd_byte) (value >> 24)))
    122             return false;
     247            return FALSE;
    123248          /* Fall through.  */
    124249        case 3:
    125250          if (! ieee_write_byte (abfd, (bfd_byte) (value >> 16)))
    126             return false;
     251            return FALSE;
    127252          /* Fall through.  */
    128253        case 2:
    129254          if (! ieee_write_byte (abfd, (bfd_byte) (value >> 8)))
    130             return false;
     255            return FALSE;
    131256          /* Fall through.  */
    132257        case 1:
    133258          if (! ieee_write_byte (abfd, (bfd_byte) (value)))
    134             return false;
     259            return FALSE;
    135260        }
    136261    }
    137262
    138   return true;
    139 }
    140 
    141 static boolean
     263  return TRUE;
     264}
     265
     266static bfd_boolean
    142267ieee_write_id (abfd, id)
    143268     bfd *abfd;
     
    149274    {
    150275      if (! ieee_write_byte (abfd, (bfd_byte) length))
    151         return false;
     276        return FALSE;
    152277    }
    153278  else if (length < 255)
     
    155280      if (! ieee_write_byte (abfd, ieee_extension_length_1_enum)
    156281          || ! ieee_write_byte (abfd, (bfd_byte) length))
    157         return false;
     282        return FALSE;
    158283    }
    159284  else if (length < 65535)
     
    161286      if (! ieee_write_byte (abfd, ieee_extension_length_2_enum)
    162287          || ! ieee_write_2bytes (abfd, (int) length))
    163         return false;
     288        return FALSE;
    164289    }
    165290  else
     
    169294         bfd_get_filename (abfd), length);
    170295      bfd_set_error (bfd_error_invalid_operation);
    171       return false;
    172     }
    173 
    174   if (bfd_write ((PTR) id, 1, length, abfd) != length)
    175     return false;
    176   return true;
    177 }
    178 
    179 
    180 /***************************************************************************
    181 Functions for reading from ieee files in the strange way that the
    182 standard requires:
    183 */
     296      return FALSE;
     297    }
     298
     299  if (bfd_bwrite ((PTR) id, (bfd_size_type) length, abfd) != length)
     300    return FALSE;
     301  return TRUE;
     302}
     303
     304
     305/* Functions for reading from ieee files in the strange way that the
     306   standard requires.  */
    184307
    185308#define this_byte(ieee) *((ieee)->input_p)
     
    193316  unsigned char c1 = this_byte_and_next (ieee);
    194317  unsigned char c2 = this_byte_and_next (ieee);
     318
    195319  return (c1 << 8) | c2;
    196320}
     
    203327{
    204328  size_t i;
     329
    205330  for (i = 0; i < length; i++)
    206     {
    207       string[i] = this_byte_and_next (ieee);
    208     }
     331    string[i] = this_byte_and_next (ieee);
    209332}
    210333
     
    215338  size_t length;
    216339  char *string;
     340
    217341  length = this_byte_and_next (ieee);
    218342  if (length <= 0x7f)
    219343    {
    220       /* Simple string of length 0 to 127 */
     344      /* Simple string of length 0 to 127. */
    221345    }
    222346  else if (length == 0xde)
    223347    {
    224       /* Length is next byte, allowing 0..255 */
     348      /* Length is next byte, allowing 0..255. */
    225349      length = this_byte_and_next (ieee);
    226350    }
    227351  else if (length == 0xdf)
    228352    {
    229       /* Length is next two bytes, allowing 0..65535 */
     353      /* Length is next two bytes, allowing 0..65535. */
    230354      length = this_byte_and_next (ieee);
    231355      length = (length * 256) + this_byte_and_next (ieee);
    232356    }
    233   /* Buy memory and read string */
    234   string = bfd_alloc (ieee->abfd, length + 1);
     357
     358  /* Buy memory and read string.  */
     359  string = bfd_alloc (ieee->abfd, (bfd_size_type) length + 1);
    235360  if (!string)
    236361    return NULL;
     
    240365}
    241366
    242 static boolean
     367static bfd_boolean
    243368ieee_write_expression (abfd, value, symbol, pcrel, index)
    244369     bfd *abfd;
    245370     bfd_vma value;
    246371     asymbol *symbol;
    247      boolean pcrel;
     372     bfd_boolean pcrel;
    248373     unsigned int index;
    249374{
     
    253378    {
    254379      if (! ieee_write_int (abfd, value))
    255         return false;
     380        return FALSE;
    256381      term_count++;
    257382    }
    258383
    259   if (bfd_is_com_section (symbol->section)
    260       || bfd_is_und_section (symbol->section))
    261     {
    262       /* Def of a common symbol */
    263       if (! ieee_write_byte (abfd, ieee_variable_X_enum)
    264           || ! ieee_write_int (abfd, symbol->value))
    265         return false;
    266       term_count++;
    267     }
    268   else if (! bfd_is_abs_section (symbol->section))
    269     {
    270       /* Ref to defined symbol - */
    271 
    272       if (symbol->flags & BSF_GLOBAL)
     384  /* Badly formatted binaries can have a missing symbol,
     385     so test here to prevent a seg fault.  */
     386  if (symbol != NULL)
     387    {
     388      if (bfd_is_com_section (symbol->section)
     389          || bfd_is_und_section (symbol->section))
    273390        {
    274           if (! ieee_write_byte (abfd, ieee_variable_I_enum)
     391          /* Def of a common symbol.  */
     392          if (! ieee_write_byte (abfd, ieee_variable_X_enum)
    275393              || ! ieee_write_int (abfd, symbol->value))
    276             return false;
    277           term_count++;
     394            return FALSE;
     395          term_count ++;
    278396        }
    279       else if (symbol->flags & (BSF_LOCAL | BSF_SECTION_SYM))
     397      else if (! bfd_is_abs_section (symbol->section))
    280398        {
    281           /* This is a reference to a defined local symbol.  We can
    282              easily do a local as a section+offset.  */
    283           if (! ieee_write_byte (abfd, ieee_variable_R_enum)
    284               || ! ieee_write_byte (abfd,
    285                                     (bfd_byte) (symbol->section->index
    286                                                 + IEEE_SECTION_NUMBER_BASE)))
    287             return false;
    288           term_count++;
    289           if (symbol->value != 0)
     399          /* Ref to defined symbol -  */
     400
     401          if (symbol->flags & BSF_GLOBAL)
    290402            {
    291               if (! ieee_write_int (abfd, symbol->value))
    292                 return false;
     403              if (! ieee_write_byte (abfd, ieee_variable_I_enum)
     404                  || ! ieee_write_int (abfd, symbol->value))
     405                return FALSE;
    293406              term_count++;
    294407            }
     408          else if (symbol->flags & (BSF_LOCAL | BSF_SECTION_SYM))
     409            {
     410              /* This is a reference to a defined local symbol.  We can
     411                 easily do a local as a section+offset.  */
     412              if (! ieee_write_byte (abfd, ieee_variable_R_enum)
     413                  || ! ieee_write_byte (abfd,
     414                                        (bfd_byte) (symbol->section->index
     415                                                    + IEEE_SECTION_NUMBER_BASE)))
     416                return FALSE;
     417
     418              term_count++;
     419              if (symbol->value != 0)
     420                {
     421                  if (! ieee_write_int (abfd, symbol->value))
     422                    return FALSE;
     423                  term_count++;
     424                }
     425            }
     426          else
     427            {
     428              (*_bfd_error_handler)
     429                (_("%s: unrecognized symbol `%s' flags 0x%x"),
     430                 bfd_get_filename (abfd), bfd_asymbol_name (symbol),
     431                 symbol->flags);
     432              bfd_set_error (bfd_error_invalid_operation);
     433              return FALSE;
     434            }
    295435        }
    296       else
    297         {
    298           (*_bfd_error_handler)
    299             (_("%s: unrecognized symbol `%s' flags 0x%x"),
    300              bfd_get_filename (abfd), bfd_asymbol_name (symbol),
    301              symbol->flags);
    302           bfd_set_error (bfd_error_invalid_operation);
    303           return false;
    304         }
    305436    }
    306437
    307438  if (pcrel)
    308439    {
    309       /* subtract the pc from here by asking for PC of this section*/
     440      /* Subtract the pc from here by asking for PC of this section.  */
    310441      if (! ieee_write_byte (abfd, ieee_variable_P_enum)
    311442          || ! ieee_write_byte (abfd,
    312443                                (bfd_byte) (index + IEEE_SECTION_NUMBER_BASE))
    313444          || ! ieee_write_byte (abfd, ieee_function_minus_enum))
    314         return false;
     445        return FALSE;
    315446    }
    316447
    317448  /* Handle the degenerate case of a 0 address.  */
    318449  if (term_count == 0)
    319     {
    320       if (! ieee_write_int (abfd, 0))
    321         return false;
    322     }
     450    if (! ieee_write_int (abfd, (bfd_vma) 0))
     451      return FALSE;
    323452
    324453  while (term_count > 1)
    325454    {
    326455      if (! ieee_write_byte (abfd, ieee_function_plus_enum))
    327         return false;
     456        return FALSE;
    328457      term_count--;
    329458    }
    330459
    331   return true;
    332 }
    333 
    334 
    335 /*****************************************************************************/
    336 
    337 /*
    338 writes any integer into the buffer supplied and always takes 5 bytes
    339 */
     460  return TRUE;
     461}
     462
     463
     464/* Writes any integer into the buffer supplied and always takes 5 bytes.  */
     465
    340466static void
    341467ieee_write_int5 (buffer, value)
     
    350476}
    351477
    352 static boolean
     478static bfd_boolean
    353479ieee_write_int5_out (abfd, value)
    354480     bfd *abfd;
     
    358484
    359485  ieee_write_int5 (b, value);
    360   if (bfd_write ((PTR) b, 1, 5, abfd) != 5)
    361     return false;
    362   return true;
    363 }
    364 
    365 static boolean
     486  if (bfd_bwrite ((PTR) b, (bfd_size_type) 5, abfd) != 5)
     487    return FALSE;
     488  return TRUE;
     489}
     490
     491static bfd_boolean
    366492parse_int (ieee, value_ptr)
    367493     common_header_type *ieee;
     
    370496  int value = this_byte (ieee);
    371497  int result;
     498
    372499  if (value >= 0 && value <= 127)
    373500    {
    374501      *value_ptr = value;
    375502      next_byte (ieee);
    376       return true;
     503      return TRUE;
    377504    }
    378505  else if (value >= 0x80 && value <= 0x88)
    379506    {
    380507      unsigned int count = value & 0xf;
     508
    381509      result = 0;
    382510      next_byte (ieee);
     
    387515        }
    388516      *value_ptr = result;
    389       return true;
    390     }
    391   return false;
     517      return TRUE;
     518    }
     519  return FALSE;
    392520}
    393521
     
    395523parse_i (ieee, ok)
    396524     common_header_type *ieee;
    397      boolean *ok;
     525     bfd_boolean *ok;
    398526{
    399527  bfd_vma x;
     
    407535{
    408536  bfd_vma result;
    409   BFD_ASSERT (parse_int (ieee, &result) == true);
     537  BFD_ASSERT (parse_int (ieee, &result));
    410538  return result;
    411539}
     
    422550
    423551#define SRC_MASK(arg) arg
    424 #define PCREL_OFFSET false
     552#define PCREL_OFFSET FALSE
    425553
    426554#else
    427555
    428556#define SRC_MASK(arg) 0
    429 #define PCREL_OFFSET true
     557#define PCREL_OFFSET TRUE
    430558
    431559#endif
     
    436564         2,
    437565         32,
    438          false,
     566         FALSE,
    439567         0,
    440568         complain_overflow_bitfield,
    441569         0,
    442570         "abs32",
    443          true,
     571         TRUE,
    444572         0xffffffff,
    445573         0xffffffff,
    446          false);
     574         FALSE);
    447575
    448576static reloc_howto_type abs16_howto =
     
    451579         1,
    452580         16,
    453          false,
     581         FALSE,
    454582         0,
    455583         complain_overflow_bitfield,
    456584         0,
    457585         "abs16",
    458          true,
     586         TRUE,
    459587         0x0000ffff,
    460588         0x0000ffff,
    461          false);
     589         FALSE);
    462590
    463591static reloc_howto_type abs8_howto =
     
    466594         0,
    467595         8,
    468          false,
     596         FALSE,
    469597         0,
    470598         complain_overflow_bitfield,
    471599         0,
    472600         "abs8",
    473          true,
     601         TRUE,
    474602         0x000000ff,
    475603         0x000000ff,
    476          false);
     604         FALSE);
    477605
    478606static reloc_howto_type rel32_howto =
     
    481609         2,
    482610         32,
    483          true,
     611         TRUE,
    484612         0,
    485613         complain_overflow_signed,
    486614         0,
    487615         "rel32",
    488          true,
     616         TRUE,
    489617         SRC_MASK (0xffffffff),
    490618         0xffffffff,
     
    496624         1,
    497625         16,
    498          true,
     626         TRUE,
    499627         0,
    500628         complain_overflow_signed,
    501629         0,
    502630         "rel16",
    503          true,
     631         TRUE,
    504632         SRC_MASK (0x0000ffff),
    505633         0x0000ffff,
     
    511639         0,
    512640         8,
    513          true,
     641         TRUE,
    514642         0,
    515643         complain_overflow_signed,
    516644         0,
    517645         "rel8",
    518          true,
     646         TRUE,
    519647         SRC_MASK (0x000000ff),
    520648         0x000000ff,
     
    528656     bfd_vma *value;
    529657     ieee_symbol_index_type *symbol;
    530      boolean *pcrel;
     658     bfd_boolean *pcrel;
    531659     unsigned int *extra;
    532660     asection **section;
     
    539667#define DEC sp--;
    540668
    541   boolean loop = true;
     669  bfd_boolean loop = TRUE;
    542670  ieee_value_type stack[10];
    543671
    544   /* The stack pointer always points to the next unused location */
     672  /* The stack pointer always points to the next unused location. */
    545673#define PUSH(x,y,z) TOS.symbol=x;TOS.section=y;TOS.value=z;INC;
    546674#define POP(x,y,z) DEC;x=TOS.symbol;y=TOS.section;z=TOS.value;
    547675  ieee_value_type *sp = stack;
    548 
    549   while (loop)
     676  asection *dummy;
     677
     678  while (loop && ieee->h.input_p < ieee->h.last_byte)
    550679    {
    551680      switch (this_byte (&(ieee->h)))
    552681        {
    553682        case ieee_variable_P_enum:
    554           /* P variable, current program counter for section n */
     683          /* P variable, current program counter for section n. */
    555684          {
    556685            int section_n;
     686
    557687            next_byte (&(ieee->h));
    558             *pcrel = true;
     688            *pcrel = TRUE;
    559689            section_n = must_parse_int (&(ieee->h));
    560690            PUSH (NOSYMBOL, bfd_abs_section_ptr, 0);
     
    562692          }
    563693        case ieee_variable_L_enum:
    564           /* L variable  address of section N */
     694          /* L variable  address of section N. */
    565695          next_byte (&(ieee->h));
    566696          PUSH (NOSYMBOL, ieee->section_table[must_parse_int (&(ieee->h))], 0);
    567697          break;
    568698        case ieee_variable_R_enum:
    569           /* R variable, logical address of section module */
    570           /* FIXME, this should be different to L */
     699          /* R variable, logical address of section module. */
     700          /* FIXME, this should be different to L. */
    571701          next_byte (&(ieee->h));
    572702          PUSH (NOSYMBOL, ieee->section_table[must_parse_int (&(ieee->h))], 0);
    573703          break;
    574704        case ieee_variable_S_enum:
    575           /* S variable, size in MAUS of section module */
     705          /* S variable, size in MAUS of section module. */
    576706          next_byte (&(ieee->h));
    577707          PUSH (NOSYMBOL,
     
    580710          break;
    581711        case ieee_variable_I_enum:
    582           /* Push the address of variable n */
     712          /* Push the address of variable n. */
    583713          {
    584714            ieee_symbol_index_type sy;
     
    591721          break;
    592722        case ieee_variable_X_enum:
    593           /* Push the address of external variable n */
     723          /* Push the address of external variable n. */
    594724          {
    595725            ieee_symbol_index_type sy;
     
    640770            else
    641771              {
    642                 /*
    643                   Thats all that we can understand. As far as I can see
    644                   there is a bug in the Microtec IEEE output which I'm
    645                   using to scan, whereby the comma operator is omitted
    646                   sometimes in an expression, giving expressions with too
    647                   many terms. We can tell if that's the case by ensuring
    648                   that sp == stack here. If not, then we've pushed
    649                   something too far, so we keep adding.  */
    650 
    651                 while (sp != stack + 1)
    652                   {
    653                     asection *section1;
    654                     ieee_symbol_index_type sy1;
    655                     POP (sy1, section1, *extra);
    656                   }
    657                 {
    658                   asection *dummy;
    659 
    660                   POP (*symbol, dummy, *value);
    661                   if (section)
    662                     *section = dummy;
    663                 }
    664 
    665                 loop = false;
     772                /* Thats all that we can understand.  */
     773                loop = FALSE;
    666774              }
    667775          }
    668776        }
    669777    }
    670 }
    671 
    672 
    673 #define ieee_seek(abfd, offset) \
    674   IEEE_DATA(abfd)->h.input_p = IEEE_DATA(abfd)->h.first_byte + offset
    675 
    676 #define ieee_pos(abfd) \
    677   (IEEE_DATA(abfd)->h.input_p - IEEE_DATA(abfd)->h.first_byte)
     778
     779  /* As far as I can see there is a bug in the Microtec IEEE output
     780     which I'm using to scan, whereby the comma operator is omitted
     781     sometimes in an expression, giving expressions with too many
     782     terms.  We can tell if that's the case by ensuring that
     783     sp == stack here.  If not, then we've pushed something too far,
     784     so we keep adding.  */
     785  while (sp != stack + 1)
     786    {
     787      asection *section1;
     788      ieee_symbol_index_type sy1;
     789      POP (sy1, section1, *extra);
     790    }
     791
     792  POP (*symbol, dummy, *value);
     793  if (section)
     794    *section = dummy;
     795}
     796
     797
     798#define ieee_seek(ieee, offset) \
     799  do                                                            \
     800    {                                                           \
     801      ieee->h.input_p = ieee->h.first_byte + offset;            \
     802      ieee->h.last_byte = (ieee->h.first_byte                   \
     803                           + ieee_part_after (ieee, offset));   \
     804    }                                                           \
     805  while (0)
     806
     807#define ieee_pos(ieee) \
     808  (ieee->h.input_p - ieee->h.first_byte)
     809
     810/* Find the first part of the ieee file after HERE.  */
     811
     812static file_ptr
     813ieee_part_after (ieee, here)
     814     ieee_data_type *ieee;
     815     file_ptr here;
     816{
     817  int part;
     818  file_ptr after = ieee->w.r.me_record;
     819
     820  /* File parts can come in any order, except that module end is
     821     guaranteed to be last (and the header first).  */
     822  for (part = 0; part < N_W_VARIABLES; part++)
     823    if (ieee->w.offset[part] > here && after > ieee->w.offset[part])
     824      after = ieee->w.offset[part];
     825
     826  return after;
     827}
    678828
    679829static unsigned int last_index;
    680 static char last_type;          /* is the index for an X or a D */
     830static char last_type;          /* Is the index for an X or a D. */
    681831
    682832static ieee_symbol_type *
    683 get_symbol (abfd,
    684             ieee,
    685             last_symbol,
    686             symbol_count,
    687             pptr,
    688             max_index,
    689             this_type
    690 )
     833get_symbol (abfd, ieee, last_symbol, symbol_count, pptr, max_index, this_type)
    691834     bfd *abfd ATTRIBUTE_UNUSED;
    692835     ieee_data_type *ieee;
     
    695838     ieee_symbol_type ***pptr;
    696839     unsigned int *max_index;
    697      char this_type
    698       ;
    699 {
    700   /* Need a new symbol */
     840     int this_type;
     841{
     842  /* Need a new symbol.  */
    701843  unsigned int new_index = must_parse_int (&(ieee->h));
     844
    702845  if (new_index != last_index || this_type != last_type)
    703846    {
    704       ieee_symbol_type *new_symbol = (ieee_symbol_type *) bfd_alloc (ieee->h.abfd,
    705                                                  sizeof (ieee_symbol_type));
     847      ieee_symbol_type *new_symbol;
     848      bfd_size_type amt = sizeof (ieee_symbol_type);
     849
     850      new_symbol = (ieee_symbol_type *) bfd_alloc (ieee->h.abfd, amt);
    706851      if (!new_symbol)
    707852        return NULL;
     
    713858      *pptr = &new_symbol->next;
    714859      if (new_index > *max_index)
    715         {
    716           *max_index = new_index;
    717         }
     860        *max_index = new_index;
     861
    718862      last_type = this_type;
    719863      new_symbol->symbol.section = bfd_abs_section_ptr;
     
    723867}
    724868
    725 static boolean
     869static bfd_boolean
    726870ieee_slurp_external_symbols (abfd)
    727871     bfd *abfd;
     
    734878  ieee_symbol_type *symbol = (ieee_symbol_type *) NULL;
    735879  unsigned int symbol_count = 0;
    736   boolean loop = true;
     880  bfd_boolean loop = TRUE;
    737881  last_index = 0xffffff;
    738   ieee->symbol_table_full = true;
    739 
    740   ieee_seek (abfd, offset);
     882  ieee->symbol_table_full = TRUE;
     883
     884  ieee_seek (ieee, offset);
    741885
    742886  while (loop)
     
    751895                               &ieee->external_symbol_max_index, 'I');
    752896          if (symbol == NULL)
    753             return false;
     897            return FALSE;
    754898
    755899          symbol->symbol.the_bfd = abfd;
     
    765909                               &ieee->external_symbol_max_index, 'D');
    766910          if (symbol == NULL)
    767             return false;
     911            return FALSE;
    768912
    769913          BFD_ASSERT (symbol->index >= ieee->external_symbol_min_index);
     
    780924            unsigned int symbol_attribute_def;
    781925            bfd_vma value;
    782             switch (read_2bytes (ieee))
     926            switch (read_2bytes (&ieee->h))
    783927              {
    784928              case ieee_attribute_record_enum:
     
    794938                  default:
    795939                    (*_bfd_error_handler)
    796                       (_("%s: unimplemented ATI record  %u for symbol %u"),
    797                        bfd_get_filename (abfd), symbol_attribute_def,
     940                      (_("%s: unimplemented ATI record %u for symbol %u"),
     941                       bfd_archive_filename (abfd), symbol_attribute_def,
    798942                       symbol_name_index);
    799943                    bfd_set_error (bfd_error_bad_value);
    800                     return false;
     944                    return FALSE;
    801945                    break;
    802946                  }
    803947                break;
    804948              case ieee_external_reference_info_record_enum:
    805                 /* Skip over ATX record. */
     949                /* Skip over ATX record.  */
    806950                parse_int (&(ieee->h), &value);
    807951                parse_int (&(ieee->h), &value);
     
    812956                /* We may get call optimization information here,
    813957                   which we just ignore.  The format is
    814                    {$F1}${CE}{index}{$00}{$3F}{$3F}{#_of_ASNs} */
     958                   {$F1}${CE}{index}{$00}{$3F}{$3F}{#_of_ASNs}. */
    815959                parse_int (&ieee->h, &value);
    816960                parse_int (&ieee->h, &value);
     
    820964                    (*_bfd_error_handler)
    821965                      (_("%s: unexpected ATN type %d in external part"),
    822                          bfd_get_filename (abfd), (int) value);
     966                         bfd_archive_filename (abfd), (int) value);
    823967                    bfd_set_error (bfd_error_bad_value);
    824                     return false;
     968                    return FALSE;
    825969                  }
    826970                parse_int (&ieee->h, &value);
     
    832976                    --value;
    833977
    834                     switch (read_2bytes (ieee))
     978                    switch (read_2bytes (&ieee->h))
    835979                      {
    836980                      case ieee_asn_record_enum:
     
    842986                        (*_bfd_error_handler)
    843987                          (_("%s: unexpected type after ATN"),
    844                              bfd_get_filename (abfd));
     988                             bfd_archive_filename (abfd));
    845989                        bfd_set_error (bfd_error_bad_value);
    846                         return false;
     990                        return FALSE;
    847991                      }
    848992                  }
     
    854998            unsigned int symbol_name_index;
    855999            ieee_symbol_index_type symbol_ignore;
    856             boolean pcrel_ignore;
     1000            bfd_boolean pcrel_ignore;
    8571001            unsigned int extra;
    8581002            next_byte (&(ieee->h));
     
    8981042            bfd_vma value;
    8991043            next_byte (&(ieee->h));
    900             /* Throw away the external reference index */
     1044            /* Throw away the external reference index. */
    9011045            (void) must_parse_int (&(ieee->h));
    902             /* Fetch the default size if not resolved */
     1046            /* Fetch the default size if not resolved. */
    9031047            size = must_parse_int (&(ieee->h));
    904             /* Fetch the defautlt value if available */
    905             if (parse_int (&(ieee->h), &value) == false)
     1048            /* Fetch the defautlt value if available. */
     1049            if (! parse_int (&(ieee->h), &value))
    9061050              {
    9071051                value = 0;
    9081052              }
    909             /* This turns into a common */
     1053            /* This turns into a common. */
    9101054            symbol->symbol.section = bfd_com_section_ptr;
    9111055            symbol->symbol.value = size;
     
    9201064                               &ieee->external_reference_max_index, 'X');
    9211065          if (symbol == NULL)
    922             return false;
     1066            return FALSE;
    9231067
    9241068          symbol->symbol.the_bfd = abfd;
     
    9331077
    9341078        default:
    935           loop = false;
     1079          loop = FALSE;
    9361080        }
    9371081    }
     
    9651109    {
    9661110      /* There are gaps in the table -- */
    967       ieee->symbol_table_full = false;
     1111      ieee->symbol_table_full = FALSE;
    9681112    }
    9691113
     
    9711115  *prev_reference_ptr = (ieee_symbol_type *) NULL;
    9721116
    973   return true;
    974 }
    975 
    976 static boolean
     1117  return TRUE;
     1118}
     1119
     1120static bfd_boolean
    9771121ieee_slurp_symbol_table (abfd)
    9781122     bfd *abfd;
    9791123{
    980   if (IEEE_DATA (abfd)->read_symbols == false)
     1124  if (! IEEE_DATA (abfd)->read_symbols)
    9811125    {
    9821126      if (! ieee_slurp_external_symbols (abfd))
    983         return false;
    984       IEEE_DATA (abfd)->read_symbols = true;
    985     }
    986   return true;
    987 }
    988 
    989 long
     1127        return FALSE;
     1128      IEEE_DATA (abfd)->read_symbols = TRUE;
     1129    }
     1130  return TRUE;
     1131}
     1132
     1133static long
    9901134ieee_get_symtab_upper_bound (abfd)
    9911135     bfd *abfd;
     
    9981142}
    9991143
    1000 /*
    1001 Move from our internal lists to the canon table, and insert in
    1002 symbol index order
    1003 */
     1144/* Move from our internal lists to the canon table, and insert in
     1145   symbol index order.  */
    10041146
    10051147extern const bfd_target ieee_vec;
    10061148
    1007 long
     1149static long
    10081150ieee_get_symtab (abfd, location)
    10091151     bfd *abfd;
     
    10321174        return -1;
    10331175
    1034       if (ieee->symbol_table_full == false)
     1176      if (! ieee->symbol_table_full)
    10351177        {
    1036           /* Arrgh - there are gaps in the table, run through and fill them */
    1037           /* up with pointers to a null place */
     1178          /* Arrgh - there are gaps in the table, run through and fill them
     1179             up with pointers to a null place. */
    10381180          unsigned int i;
     1181
    10391182          for (i = 0; i < abfd->symcount; i++)
    1040             {
    1041               location[i] = &empty_symbol;
    1042             }
     1183            location[i] = &empty_symbol;
    10431184        }
    10441185
     
    10471188           symp != (ieee_symbol_type *) NULL;
    10481189           symp = symp->next)
    1049         {
    1050           /* Place into table at correct index locations */
    1051           location[symp->index + ieee->external_symbol_base_offset] = &symp->symbol;
    1052         }
    1053 
    1054       /* The external refs are indexed in a bit */
     1190        /* Place into table at correct index locations.  */
     1191        location[symp->index + ieee->external_symbol_base_offset] = &symp->symbol;
     1192
     1193      /* The external refs are indexed in a bit.  */
    10551194      ieee->external_reference_base_offset =
    10561195        -ieee->external_reference_min_index + ieee->external_symbol_count;
     
    10591198           symp != (ieee_symbol_type *) NULL;
    10601199           symp = symp->next)
    1061         {
    1062           location[symp->index + ieee->external_reference_base_offset] =
    1063             &symp->symbol;
    1064 
    1065         }
    1066     }
     1200        location[symp->index + ieee->external_reference_base_offset] =
     1201          &symp->symbol;
     1202    }
     1203
    10671204  if (abfd->symcount)
    1068     {
    1069       location[abfd->symcount] = (asymbol *) NULL;
    1070     }
     1205    location[abfd->symcount] = (asymbol *) NULL;
     1206
    10711207  return abfd->symcount;
    10721208}
     
    10821218      unsigned int c, i;
    10831219      asection **n;
     1220      bfd_size_type amt;
    10841221
    10851222      c = ieee->section_table_size;
     
    10891226        c *= 2;
    10901227
    1091       n = ((asection **)
    1092            bfd_realloc (ieee->section_table, c * sizeof (asection *)));
     1228      amt = c;
     1229      amt *= sizeof (asection *);
     1230      n = (asection **) bfd_realloc (ieee->section_table, amt);
    10931231      if (n == NULL)
    10941232        return NULL;
     
    11031241  if (ieee->section_table[index] == (asection *) NULL)
    11041242    {
    1105       char *tmp = bfd_alloc (abfd, 11);
     1243      char *tmp = bfd_alloc (abfd, (bfd_size_type) 11);
    11061244      asection *section;
    11071245
     
    11241262  ieee_data_type *ieee = IEEE_DATA (abfd);
    11251263  file_ptr offset = ieee->w.r.section_part;
    1126   asection *section = (asection *) NULL;
    11271264  char *name;
    11281265
     
    11301267    {
    11311268      bfd_byte section_type[3];
    1132       ieee_seek (abfd, offset);
    1133       while (true)
     1269      ieee_seek (ieee, offset);
     1270      while (TRUE)
    11341271        {
    11351272          switch (this_byte (&(ieee->h)))
     
    11371274            case ieee_section_type_enum:
    11381275              {
     1276                asection *section;
    11391277                unsigned int section_index;
    11401278                next_byte (&(ieee->h));
     
    11461284
    11471285                /* Set minimal section attributes. Attributes are
    1148                    extended later, based on section contents. */
    1149 
     1286                   extended later, based on section contents.  */
    11501287                switch (section_type[0])
    11511288                  {
    11521289                  case 0xC1:
    1153                     /* Normal attributes for absolute sections  */
     1290                    /* Normal attributes for absolute sections*/
    11541291                    section_type[1] = this_byte (&(ieee->h));
    11551292                    section->flags = SEC_ALLOC;
    11561293                    switch (section_type[1])
    11571294                      {
    1158                       case 0xD3:        /* AS Absolute section attributes */
     1295                      case 0xD3:        /* AS Absolute section attributes. */
    11591296                        next_byte (&(ieee->h));
    11601297                        section_type[2] = this_byte (&(ieee->h));
     
    11621299                          {
    11631300                          case 0xD0:
    1164                             /* Normal code */
     1301                            /* Normal code. */
    11651302                            next_byte (&(ieee->h));
    11661303                            section->flags |= SEC_CODE;
    11671304                            break;
    11681305                          case 0xC4:
    1169                             /* Normal data */
     1306                            /* Normal data. */
    11701307                            next_byte (&(ieee->h));
    11711308                            section->flags |= SEC_DATA;
     
    11731310                          case 0xD2:
    11741311                            next_byte (&(ieee->h));
    1175                             /* Normal rom data */
     1312                            /* Normal rom data. */
    11761313                            section->flags |= SEC_ROM | SEC_DATA;
    11771314                            break;
     
    11811318                      }
    11821319                    break;
    1183                   case 0xC3:    /* Named relocatable sections (type C) */
     1320                  case 0xC3:    /* Named relocatable sections (type C). */
    11841321                    section_type[1] = this_byte (&(ieee->h));
    11851322                    section->flags = SEC_ALLOC;
    11861323                    switch (section_type[1])
    11871324                      {
    1188                       case 0xD0:        /* Normal code (CP) */
     1325                      case 0xD0:        /* Normal code (CP). */
    11891326                        next_byte (&(ieee->h));
    11901327                        section->flags |= SEC_CODE;
    11911328                        break;
    1192                       case 0xC4:        /* Normal data (CD) */
     1329                      case 0xC4:        /* Normal data (CD). */
    11931330                        next_byte (&(ieee->h));
    11941331                        section->flags |= SEC_DATA;
    11951332                        break;
    1196                       case 0xD2:        /* Normal rom data (CR) */
     1333                      case 0xD2:        /* Normal rom data (CR). */
    11971334                        next_byte (&(ieee->h));
    11981335                        section->flags |= SEC_ROM | SEC_DATA;
     
    12031340                  }
    12041341
    1205                 /* Read section name, use it if non empty. */
     1342                /* Read section name, use it if non empty.  */
    12061343                name = read_id (&ieee->h);
    12071344                if (name[0])
    12081345                  section->name = name;
    12091346
    1210                 /* Skip these fields, which we don't care about */
     1347                /* Skip these fields, which we don't care about. */
    12111348                {
    12121349                  bfd_vma parent, brother, context;
     
    12361373            case ieee_e2_first_byte_enum:
    12371374              {
    1238                 ieee_record_enum_type t = (ieee_record_enum_type) (read_2bytes (&(ieee->h)));
    1239 
     1375                asection *section;
     1376                ieee_record_enum_type t;
     1377
     1378                t = (ieee_record_enum_type) (read_2bytes (&(ieee->h)));
    12401379                switch (t)
    12411380                  {
     
    12871426   out.  */
    12881427
    1289 static boolean
     1428static bfd_boolean
    12901429ieee_slurp_debug (abfd)
    12911430     bfd *abfd;
     
    12961435
    12971436  if (ieee->w.r.debug_information_part == 0)
    1298     return true;
     1437    return TRUE;
    12991438
    13001439  sec = bfd_make_section (abfd, ".debug");
    13011440  if (sec == NULL)
    1302     return false;
     1441    return FALSE;
    13031442  sec->flags |= SEC_DEBUGGING | SEC_HAS_CONTENTS;
    13041443  sec->filepos = ieee->w.r.debug_information_part;
    13051444
    1306   debug_end = ieee->w.r.data_part;
    1307   if (debug_end == 0)
    1308     debug_end = ieee->w.r.trailer_part;
    1309   if (debug_end == 0)
    1310     debug_end = ieee->w.r.me_record;
     1445  debug_end = ieee_part_after (ieee, ieee->w.r.debug_information_part);
    13111446  sec->_raw_size = debug_end - ieee->w.r.debug_information_part;
    13121447
    1313   return true;
    1314 }
    1315 
    1316 
    1317 /***********************************************************************
    1318 *  archive stuff
    1319 */
     1448  return TRUE;
     1449}
     1450
     1451
     1452/* Archive stuff.  */
    13201453
    13211454const bfd_target *
     
    13291462  ieee_ar_data_type *save = abfd->tdata.ieee_ar_data;
    13301463  ieee_ar_data_type *ieee;
    1331   unsigned int alc_elts;
     1464  bfd_size_type alc_elts;
    13321465  ieee_ar_obstack_type *elts = NULL;
    1333 
    1334   abfd->tdata.ieee_ar_data =
    1335     (ieee_ar_data_type *) bfd_alloc (abfd, sizeof (ieee_ar_data_type));
     1466  bfd_size_type amt = sizeof (ieee_ar_data_type);
     1467
     1468  abfd->tdata.ieee_ar_data = (ieee_ar_data_type *) bfd_alloc (abfd, amt);
    13361469  if (!abfd->tdata.ieee_ar_data)
    1337     goto error_return;
     1470    goto error_ret_restore;
    13381471  ieee = IEEE_AR_DATA (abfd);
    13391472
    1340   /* FIXME: Check return value.  I'm not sure whether it needs to read
    1341      the entire buffer or not.  */
    1342   bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
     1473  /* Ignore the return value here.  It doesn't matter if we don't read
     1474     the entire buffer.  We might have a very small ieee file.  */
     1475  bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
    13431476
    13441477  ieee->h.first_byte = buffer;
     
    14001533
    14011534      /* Make sure that we don't go over the end of the buffer.  */
    1402       if ((size_t) ieee_pos (abfd) > sizeof (buffer) / 2)
     1535      if ((size_t) ieee_pos (IEEE_DATA (abfd)) > sizeof (buffer) / 2)
    14031536        {
    14041537          /* Past half way, reseek and reprime.  */
    1405           buffer_offset += ieee_pos (abfd);
     1538          buffer_offset += ieee_pos (IEEE_DATA (abfd));
    14061539          if (bfd_seek (abfd, buffer_offset, SEEK_SET) != 0)
    14071540            goto error_return;
    14081541
    1409           /* FIXME: Check return value.  I'm not sure whether it needs
    1410              to read the entire buffer or not.  */
    1411           bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
     1542          /* Again ignore return value of bfd_bread.  */
     1543          bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
    14121544          ieee->h.first_byte = buffer;
    14131545          ieee->h.input_p = buffer;
     
    14151547    }
    14161548
    1417   ieee->elements = ((ieee_ar_obstack_type *)
    1418                     bfd_alloc (abfd,
    1419                                ieee->element_count * sizeof *ieee->elements));
     1549  amt = ieee->element_count;
     1550  amt *= sizeof *ieee->elements;
     1551  ieee->elements = (ieee_ar_obstack_type *) bfd_alloc (abfd, amt);
    14201552  if (ieee->elements == NULL)
    14211553    goto error_return;
    14221554
    1423   memcpy (ieee->elements, elts,
    1424           ieee->element_count * sizeof *ieee->elements);
     1555  memcpy (ieee->elements, elts, (size_t) amt);
    14251556  free (elts);
    14261557  elts = NULL;
     
    14321563        goto error_return;
    14331564
    1434       /* FIXME: Check return value.  I'm not sure whether it needs to
    1435          read the entire buffer or not.  */
    1436       bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
     1565      /* Again ignore return value of bfd_bread.  */
     1566      bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
    14371567      ieee->h.first_byte = buffer;
    14381568      ieee->h.input_p = buffer;
     
    14411571      next_byte (&(ieee->h));           /* Drop 14.  */
    14421572      must_parse_int (&(ieee->h));      /* Drop size of block.  */
    1443      
     1573
    14441574      if (must_parse_int (&(ieee->h)) != 0)
    14451575        /* This object has been deleted.  */
     
    14541584
    14551585 got_wrong_format_error:
    1456   bfd_release (abfd, ieee);
    1457   abfd->tdata.ieee_ar_data = save;
    14581586  bfd_set_error (bfd_error_wrong_format);
    1459 
    14601587 error_return:
    14611588  if (elts != NULL)
    14621589    free (elts);
     1590  bfd_release (abfd, ieee);
     1591 error_ret_restore:
     1592  abfd->tdata.ieee_ar_data = save;
    14631593
    14641594  return NULL;
    1465 }
    1466 
    1467 static boolean
    1468 ieee_mkobject (abfd)
    1469      bfd *abfd;
    1470 {
    1471   abfd->tdata.ieee_data = (ieee_data_type *) bfd_zalloc (abfd, sizeof (ieee_data_type));
    1472   return abfd->tdata.ieee_data ? true : false;
    14731595}
    14741596
     
    14821604  unsigned char buffer[300];
    14831605  ieee_data_type *save = IEEE_DATA (abfd);
     1606  bfd_size_type amt;
    14841607
    14851608  abfd->tdata.ieee_data = 0;
     
    14891612  if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
    14901613    goto fail;
    1491   /* Read the first few bytes in to see if it makes sense */
    1492   /* FIXME: Check return value.  I'm not sure whether it needs to read
    1493      the entire buffer or not.  */
    1494   bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
     1614  /* Read the first few bytes in to see if it makes sense.  Ignore
     1615     bfd_bread return value;  The file might be very small.  */
     1616  bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
    14951617
    14961618  ieee->h.input_p = buffer;
     
    14981620    goto got_wrong_format;
    14991621
    1500   ieee->read_symbols = false;
    1501   ieee->read_data = false;
     1622  ieee->read_symbols = FALSE;
     1623  ieee->read_data = FALSE;
    15021624  ieee->section_count = 0;
    15031625  ieee->external_symbol_max_index = 0;
     
    15131635    goto got_wrong_format;
    15141636  ieee->mb.module_name = read_id (&(ieee->h));
    1515   if (abfd->filename == (CONST char *) NULL)
    1516     {
    1517       abfd->filename = ieee->mb.module_name;
    1518     }
    1519   /* Determine the architecture and machine type of the object file.
    1520      */
     1637  if (abfd->filename == (const char *) NULL)
     1638    abfd->filename = ieee->mb.module_name;
     1639
     1640  /* Determine the architecture and machine type of the object file.  */
    15211641  {
    15221642    const bfd_arch_info_type *arch;
     
    15571677              }
    15581678          }
    1559         else if (toupper (processor[3]) == 'F')   /* 68F333 */
    1560           strcpy (family, "68332");               /* CPU32 */
    1561         else if ((toupper (processor[3]) == 'C')  /* Embedded controllers */
    1562                  && ((toupper (processor[2]) == 'E')
    1563                      || (toupper (processor[2]) == 'H')
    1564                      || (toupper (processor[2]) == 'L')))
     1679        else if (TOUPPER (processor[3]) == 'F')  /* 68F333 */
     1680          strcpy (family, "68332");                /* CPU32 */
     1681        else if ((TOUPPER (processor[3]) == 'C') /* Embedded controllers. */
     1682                 && ((TOUPPER (processor[2]) == 'E')
     1683                     || (TOUPPER (processor[2]) == 'H')
     1684                     || (TOUPPER (processor[2]) == 'L')))
    15651685          {
    15661686            strcpy (family, "68");
     
    15681688            family[9] = '\0';
    15691689          }
    1570         else                             /* "Regular" processors */
     1690        else                             /* "Regular" processors. */
    15711691          {
    15721692            strncpy (family, processor, 9);
     
    15901710
    15911711  if (this_byte (&(ieee->h)) != (int) ieee_address_descriptor_enum)
    1592     {
    1593       goto fail;
    1594     }
     1712    goto fail;
     1713
    15951714  next_byte (&(ieee->h));
    15961715
    1597   if (parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau) == false)
    1598     {
    1599       goto fail;
    1600     }
    1601   if (parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address) == false)
    1602     {
    1603       goto fail;
    1604     }
    1605 
    1606   /* If there is a byte order info, take it */
    1607   if (this_byte (&(ieee->h)) == (int) ieee_variable_L_enum ||
    1608       this_byte (&(ieee->h)) == (int) ieee_variable_M_enum)
     1716  if (! parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau))
     1717    goto fail;
     1718
     1719  if (! parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address))
     1720    goto fail;
     1721
     1722  /* If there is a byte order info, take it.  */
     1723  if (this_byte (&(ieee->h)) == (int) ieee_variable_L_enum
     1724      || this_byte (&(ieee->h)) == (int) ieee_variable_M_enum)
    16091725    next_byte (&(ieee->h));
    16101726
    16111727  for (part = 0; part < N_W_VARIABLES; part++)
    16121728    {
    1613       boolean ok;
     1729      bfd_boolean ok;
     1730
    16141731      if (read_2bytes (&(ieee->h)) != (int) ieee_assign_value_to_variable_enum)
    1615         {
    1616           goto fail;
    1617         }
     1732        goto fail;
     1733
    16181734      if (this_byte_and_next (&(ieee->h)) != part)
    1619         {
    1620           goto fail;
    1621         }
     1735        goto fail;
    16221736
    16231737      ieee->w.offset[part] = parse_i (&(ieee->h), &ok);
    1624       if (ok == false)
    1625         {
    1626           goto fail;
    1627         }
    1628 
     1738      if (! ok)
     1739        goto fail;
    16291740    }
    16301741
     
    16351746     the whole thing into memory so that we can run up and down it
    16361747     quickly.  We can work out how big the file is from the trailer
    1637      record */
    1638 
     1748     record.  */
     1749
     1750  amt = ieee->w.r.me_record + 1;
    16391751  IEEE_DATA (abfd)->h.first_byte =
    1640     (unsigned char *) bfd_alloc (ieee->h.abfd, ieee->w.r.me_record + 1);
     1752    (unsigned char *) bfd_alloc (ieee->h.abfd, amt);
    16411753  if (!IEEE_DATA (abfd)->h.first_byte)
    16421754    goto fail;
     
    16451757  /* FIXME: Check return value.  I'm not sure whether it needs to read
    16461758     the entire buffer or not.  */
    1647   bfd_read ((PTR) (IEEE_DATA (abfd)->h.first_byte), 1,
    1648             ieee->w.r.me_record + 1, abfd);
     1759  bfd_bread ((PTR) (IEEE_DATA (abfd)->h.first_byte),
     1760            (bfd_size_type) ieee->w.r.me_record + 1, abfd);
    16491761
    16501762  ieee_slurp_sections (abfd);
     
    16551767  /* Parse section data to activate file and section flags implied by
    16561768     section contents. */
    1657 
    16581769  if (! ieee_slurp_section_data (abfd))
    16591770    goto fail;
    1660    
     1771
    16611772  return abfd->xvec;
    16621773got_wrong_format:
    16631774  bfd_set_error (bfd_error_wrong_format);
    16641775fail:
    1665   (void) bfd_release (abfd, ieee);
     1776  bfd_release (abfd, ieee);
    16661777  abfd->tdata.ieee_data = save;
    16671778  return (const bfd_target *) NULL;
    16681779}
    16691780
    1670 void
     1781static void
    16711782ieee_get_symbol_info (ignore_abfd, symbol, ret)
    16721783     bfd *ignore_abfd ATTRIBUTE_UNUSED;
     
    16811792}
    16821793
    1683 void
    1684 ieee_print_symbol (ignore_abfd, afile, symbol, how)
    1685      bfd *ignore_abfd ATTRIBUTE_UNUSED;
     1794static void
     1795ieee_print_symbol (abfd, afile, symbol, how)
     1796     bfd *abfd;
    16861797     PTR afile;
    16871798     asymbol *symbol;
     
    17081819           ? "*abs"
    17091820           : symbol->section->name);
     1821
    17101822        if (symbol->name[0] == ' ')
    17111823          {
     
    17141826        else
    17151827          {
    1716             bfd_print_symbol_vandf ((PTR) file, symbol);
     1828            bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
    17171829
    17181830            fprintf (file, " %-5s %04x %02x %s",
     
    17271839}
    17281840
    1729 static boolean
     1841static bfd_boolean
    17301842do_one (ieee, current_map, location_ptr, s, iterations)
    17311843     ieee_data_type *ieee;
     
    17411853        unsigned int number_of_maus;
    17421854        unsigned int i;
     1855
    17431856        next_byte (&(ieee->h));
    17441857        number_of_maus = must_parse_int (&(ieee->h));
     
    17541867    case ieee_load_with_relocation_enum:
    17551868      {
    1756         boolean loop = true;
     1869        bfd_boolean loop = TRUE;
     1870
    17571871        next_byte (&(ieee->h));
    17581872        while (loop)
     
    17671881                {
    17681882                  unsigned int extra = 4;
    1769                   boolean pcrel = false;
     1883                  bfd_boolean pcrel = FALSE;
    17701884                  asection *section;
    1771                   ieee_reloc_type *r =
    1772                   (ieee_reloc_type *) bfd_alloc (ieee->h.abfd,
    1773                                                  sizeof (ieee_reloc_type));
     1885                  ieee_reloc_type *r;
     1886                  bfd_size_type amt = sizeof (ieee_reloc_type);
     1887
     1888                  r = (ieee_reloc_type *) bfd_alloc (ieee->h.abfd, amt);
    17741889                  if (!r)
    1775                     return false;
     1890                    return FALSE;
    17761891
    17771892                  *(current_map->reloc_tail_ptr) = r;
     
    17951910                    {
    17961911                      next_byte (&(ieee->h));
    1797                       /* Fetch number of bytes to pad */
     1912                      /* Fetch number of bytes to pad. */
    17981913                      extra = must_parse_int (&(ieee->h));
    17991914                    };
     
    18131928                      break;
    18141929                    }
    1815                   /* Build a relocation entry for this type */
     1930                  /* Build a relocation entry for this type. */
    18161931                  /* If pc rel then stick -ve pc into instruction
    18171932                     and take out of reloc ..
     
    18251940                    case 4:
    18261941
    1827                       if (pcrel == true)
     1942                      if (pcrel)
    18281943                        {
    18291944#if KEEPMINUSPCININST
    1830                           bfd_put_32 (ieee->h.abfd, -current_map->pc, location_ptr +
    1831                                       current_map->pc);
     1945                          bfd_put_32 (ieee->h.abfd, -current_map->pc,
     1946                                      location_ptr + current_map->pc);
    18321947                          r->relent.howto = &rel32_howto;
    1833                           r->relent.addend -=
    1834                             current_map->pc;
     1948                          r->relent.addend -= current_map->pc;
    18351949#else
    1836                           bfd_put_32 (ieee->h.abfd, 0, location_ptr +
     1950                          bfd_put_32 (ieee->h.abfd, (bfd_vma) 0, location_ptr +
    18371951                                      current_map->pc);
    18381952                          r->relent.howto = &rel32_howto;
     
    18411955                      else
    18421956                        {
    1843                           bfd_put_32 (ieee->h.abfd, 0, location_ptr +
    1844                                       current_map->pc);
     1957                          bfd_put_32 (ieee->h.abfd, (bfd_vma) 0,
     1958                                      location_ptr + current_map->pc);
    18451959                          r->relent.howto = &abs32_howto;
    18461960                        }
     
    18481962                      break;
    18491963                    case 2:
    1850                       if (pcrel == true)
     1964                      if (pcrel)
    18511965                        {
    18521966#if KEEPMINUSPCININST
    1853                           bfd_put_16 (ieee->h.abfd, (int) (-current_map->pc), location_ptr + current_map->pc);
     1967                          bfd_put_16 (ieee->h.abfd, (bfd_vma) -current_map->pc,
     1968                                      location_ptr + current_map->pc);
    18541969                          r->relent.addend -= current_map->pc;
    18551970                          r->relent.howto = &rel16_howto;
    18561971#else
    18571972
    1858                           bfd_put_16 (ieee->h.abfd, 0, location_ptr + current_map->pc);
     1973                          bfd_put_16 (ieee->h.abfd, (bfd_vma) 0,
     1974                                      location_ptr + current_map->pc);
    18591975                          r->relent.howto = &rel16_howto;
    18601976#endif
     
    18631979                      else
    18641980                        {
    1865                           bfd_put_16 (ieee->h.abfd, 0, location_ptr + current_map->pc);
     1981                          bfd_put_16 (ieee->h.abfd, (bfd_vma) 0,
     1982                                      location_ptr + current_map->pc);
    18661983                          r->relent.howto = &abs16_howto;
    18671984                        }
     
    18691986                      break;
    18701987                    case 1:
    1871                       if (pcrel == true)
     1988                      if (pcrel)
    18721989                        {
    18731990#if KEEPMINUSPCININST
     
    18902007                    default:
    18912008                      BFD_FAIL ();
    1892                       return false;
     2009                      return FALSE;
    18932010                    }
    18942011                }
     
    18972014                {
    18982015                  bfd_vma this_size;
    1899                   if (parse_int (&(ieee->h), &this_size) == true)
     2016                  if (parse_int (&(ieee->h), &this_size))
    19002017                    {
    19012018                      unsigned int i;
     
    19082025                  else
    19092026                    {
    1910                       loop = false;
     2027                      loop = FALSE;
    19112028                    }
    19122029                }
     
    19162033               from being repeated (MRI convention). */
    19172034            if (iterations != 1)
    1918               loop = false;
     2035              loop = FALSE;
    19192036          }
    19202037      }
    19212038    }
    1922   return true;
    1923 }
    1924 
    1925 /* Read in all the section data and relocation stuff too */
    1926 static boolean
     2039  return TRUE;
     2040}
     2041
     2042/* Read in all the section data and relocation stuff too.  */
     2043
     2044static bfd_boolean
    19272045ieee_slurp_section_data (abfd)
    19282046     bfd *abfd;
     
    19342052  ieee_per_section_type *current_map = (ieee_per_section_type *) NULL;
    19352053  asection *s;
    1936   /* Seek to the start of the data area */
    1937   if (ieee->read_data == true)
    1938     return true;
    1939   ieee->read_data = true;
    1940   ieee_seek (abfd, ieee->w.r.data_part);
    1941 
    1942   /* Allocate enough space for all the section contents */
    1943 
     2054  /* Seek to the start of the data area.  */
     2055  if (ieee->read_data)
     2056    return TRUE;
     2057  ieee->read_data = TRUE;
     2058  ieee_seek (ieee, ieee->w.r.data_part);
     2059
     2060  /* Allocate enough space for all the section contents.  */
    19442061  for (s = abfd->sections; s != (asection *) NULL; s = s->next)
    19452062    {
    1946       ieee_per_section_type *per = (ieee_per_section_type *) s->used_by_bfd;
     2063      ieee_per_section_type *per = ieee_per_section (s);
    19472064      if ((s->flags & SEC_DEBUGGING) != 0)
    19482065        continue;
    19492066      per->data = (bfd_byte *) bfd_alloc (ieee->h.abfd, s->_raw_size);
    19502067      if (!per->data)
    1951         return false;
    1952       /*SUPPRESS 68*/
     2068        return FALSE;
    19532069      per->reloc_tail_ptr =
    19542070        (ieee_reloc_type **) & (s->relocation);
    19552071    }
    19562072
    1957   while (true)
     2073  while (TRUE)
    19582074    {
    19592075      switch (this_byte (&(ieee->h)))
    19602076        {
    1961           /* IF we see anything strange then quit */
     2077          /* IF we see anything strange then quit. */
    19622078        default:
    1963           return true;
     2079          return TRUE;
    19642080
    19652081        case ieee_set_current_section_enum:
     
    19682084          s = ieee->section_table[section_number];
    19692085          s->flags |= SEC_LOAD | SEC_HAS_CONTENTS;
    1970           current_map = (ieee_per_section_type *) s->used_by_bfd;
     2086          current_map = ieee_per_section (s);
    19712087          location_ptr = current_map->data - s->vma;
    1972           /* The document I have says that Microtec's compilers reset */
    1973           /* this after a sec section, even though the standard says not */
    1974           /* to. SO .. */
     2088          /* The document I have says that Microtec's compilers reset
     2089             this after a sec section, even though the standard says not
     2090             to, SO... */
    19752091          current_map->pc = s->vma;
    19762092          break;
     
    19852101                ieee_symbol_index_type symbol;
    19862102                unsigned int extra;
    1987                 boolean pcrel;
     2103                bfd_boolean pcrel;
     2104
    19882105                next_byte (&(ieee->h));
    1989                 must_parse_int (&(ieee->h));    /* Thow away section #*/
     2106                must_parse_int (&(ieee->h));    /* Throw away section #.  */
    19902107                parse_expression (ieee, &value,
    19912108                                  &symbol,
     
    20022119                next_byte (&(ieee->h));
    20032120              abfd->start_address = must_parse_int (&(ieee->h));
    2004               /* We've got to the end of the data now - */
    2005               return true;
     2121              /* We've got to the end of the data now -  */
     2122              return TRUE;
    20062123            default:
    20072124              BFD_FAIL ();
    2008               return false;
     2125              return FALSE;
    20092126            }
    20102127          break;
     
    20122129          {
    20132130            /* Repeat the following LD or LR n times - we do this by
    2014                  remembering the stream pointer before running it and
    2015                  resetting it and running it n times. We special case
    2016                  the repetition of a repeat_data/load_constant
    2017                  */
    2018 
     2131               remembering the stream pointer before running it and
     2132               resetting it and running it n times. We special case
     2133               the repetition of a repeat_data/load_constant.  */
    20192134            unsigned int iterations;
    20202135            unsigned char *start;
     2136
    20212137            next_byte (&(ieee->h));
    20222138            iterations = must_parse_int (&(ieee->h));
    20232139            start = ieee->h.input_p;
    2024             if (start[0] == (int) ieee_load_constant_bytes_enum &&
    2025                 start[1] == 1)
     2140            if (start[0] == (int) ieee_load_constant_bytes_enum
     2141                && start[1] == 1)
    20262142              {
    20272143                while (iterations != 0)
     
    20402156                    ieee->h.input_p = start;
    20412157                    if (!do_one (ieee, current_map, location_ptr, s,
    2042                                  iterations))
    2043                       return false;
     2158                                 (int) iterations))
     2159                      return FALSE;
    20442160                    iterations--;
    20452161                  }
     
    20492165        case ieee_load_constant_bytes_enum:
    20502166        case ieee_load_with_relocation_enum:
    2051           {
    2052             if (!do_one (ieee, current_map, location_ptr, s, 1))
    2053               return false;
    2054           }
     2167          if (!do_one (ieee, current_map, location_ptr, s, 1))
     2168            return FALSE;
    20552169        }
    20562170    }
    20572171}
    20582172
    2059 boolean
     2173static bfd_boolean
    20602174ieee_new_section_hook (abfd, newsect)
    20612175     bfd *abfd;
    20622176     asection *newsect;
    20632177{
    2064   newsect->used_by_bfd = (PTR)
    2065     bfd_alloc (abfd, sizeof (ieee_per_section_type));
     2178  newsect->used_by_bfd
     2179    = (PTR) bfd_alloc (abfd, (bfd_size_type) sizeof (ieee_per_section_type));
    20662180  if (!newsect->used_by_bfd)
    2067     return false;
     2181    return FALSE;
    20682182  ieee_per_section (newsect)->data = (bfd_byte *) NULL;
    20692183  ieee_per_section (newsect)->section = newsect;
    2070   return true;
    2071 }
    2072 
    2073 long
     2184  return TRUE;
     2185}
     2186
     2187static long
    20742188ieee_get_reloc_upper_bound (abfd, asect)
    20752189     bfd *abfd;
     
    20832197}
    20842198
    2085 static boolean
     2199static bfd_boolean
    20862200ieee_get_section_contents (abfd, section, location, offset, count)
    20872201     bfd *abfd;
     
    20912205     bfd_size_type count;
    20922206{
    2093   ieee_per_section_type *p = (ieee_per_section_type *) section->used_by_bfd;
     2207  ieee_per_section_type *p = ieee_per_section (section);
    20942208  if ((section->flags & SEC_DEBUGGING) != 0)
    20952209    return _bfd_generic_get_section_contents (abfd, section, location,
     
    20972211  ieee_slurp_section_data (abfd);
    20982212  (void) memcpy ((PTR) location, (PTR) (p->data + offset), (unsigned) count);
    2099   return true;
    2100 }
    2101 
    2102 long
     2213  return TRUE;
     2214}
     2215
     2216static long
    21032217ieee_canonicalize_reloc (abfd, section, relptr, symbols)
    21042218     bfd *abfd;
     
    21072221     asymbol **symbols;
    21082222{
    2109 /*  ieee_per_section_type *p = (ieee_per_section_type *) section->used_by_bfd;*/
    21102223  ieee_reloc_type *src = (ieee_reloc_type *) (section->relocation);
    21112224  ieee_data_type *ieee = IEEE_DATA (abfd);
     
    21162229  while (src != (ieee_reloc_type *) NULL)
    21172230    {
    2118       /* Work out which symbol to attach it this reloc to */
     2231      /* Work out which symbol to attach it this reloc to. */
    21192232      switch (src->symbol.letter)
    21202233        {
     
    21452258static int
    21462259comp (ap, bp)
    2147      CONST PTR ap;
    2148      CONST PTR bp;
     2260     const PTR ap;
     2261     const PTR bp;
    21492262{
    21502263  arelent *a = *((arelent **) ap);
     
    21552268/* Write the section headers.  */
    21562269
    2157 static boolean
     2270static bfd_boolean
    21582271ieee_write_section_part (abfd)
    21592272     bfd *abfd;
     
    21712284                                    (bfd_byte) (s->index
    21722285                                                + IEEE_SECTION_NUMBER_BASE)))
    2173             return false;
     2286            return FALSE;
    21742287
    21752288          if (abfd->flags & EXEC_P)
    21762289            {
    2177               /* This image is executable, so output absolute sections */
     2290              /* This image is executable, so output absolute sections. */
    21782291              if (! ieee_write_byte (abfd, ieee_variable_A_enum)
    21792292                  || ! ieee_write_byte (abfd, ieee_variable_S_enum))
    2180                 return false;
     2293                return FALSE;
    21812294            }
    21822295          else
    21832296            {
    21842297              if (! ieee_write_byte (abfd, ieee_variable_C_enum))
    2185                 return false;
     2298                return FALSE;
    21862299            }
    21872300
     
    21912304            case SEC_CODE:
    21922305              if (! ieee_write_byte (abfd, ieee_variable_P_enum))
    2193                 return false;
     2306                return FALSE;
    21942307              break;
    21952308            case SEC_DATA:
    21962309            default:
    21972310              if (! ieee_write_byte (abfd, ieee_variable_D_enum))
    2198                 return false;
     2311                return FALSE;
    21992312              break;
    22002313            case SEC_ROM:
     
    22032316            case SEC_ROM | SEC_DATA | SEC_LOAD:
    22042317              if (! ieee_write_byte (abfd, ieee_variable_R_enum))
    2205                 return false;
     2318                return FALSE;
    22062319            }
    22072320
    22082321
    22092322          if (! ieee_write_id (abfd, s->name))
    2210             return false;
     2323            return FALSE;
    22112324#if 0
    22122325          ieee_write_int (abfd, 0);     /* Parent */
     
    22142327          ieee_write_int (abfd, 0);     /* Context */
    22152328#endif
    2216           /* Alignment */
     2329          /* Alignment. */
    22172330          if (! ieee_write_byte (abfd, ieee_section_alignment_enum)
    22182331              || ! ieee_write_byte (abfd,
    22192332                                    (bfd_byte) (s->index
    22202333                                                + IEEE_SECTION_NUMBER_BASE))
    2221               || ! ieee_write_int (abfd, 1 << s->alignment_power))
    2222             return false;
    2223 
    2224           /* Size */
     2334              || ! ieee_write_int (abfd, (bfd_vma) 1 << s->alignment_power))
     2335            return FALSE;
     2336
     2337          /* Size. */
    22252338          if (! ieee_write_2bytes (abfd, ieee_section_size_enum)
    22262339              || ! ieee_write_byte (abfd,
     
    22282341                                                + IEEE_SECTION_NUMBER_BASE))
    22292342              || ! ieee_write_int (abfd, s->_raw_size))
    2230             return false;
     2343            return FALSE;
    22312344          if (abfd->flags & EXEC_P)
    22322345            {
    2233               /* Relocateable sections don't have asl records */
    2234               /* Vma */
     2346              /* Relocateable sections don't have asl records. */
     2347              /* Vma. */
    22352348              if (! ieee_write_2bytes (abfd, ieee_section_base_address_enum)
    22362349                  || ! ieee_write_byte (abfd,
     
    22392352                                          + IEEE_SECTION_NUMBER_BASE)))
    22402353                  || ! ieee_write_int (abfd, s->lma))
    2241                 return false;
     2354                return FALSE;
    22422355            }
    22432356        }
    22442357    }
    22452358
    2246   return true;
    2247 }
    2248 
    2249 
    2250 static boolean
     2359  return TRUE;
     2360}
     2361
     2362
     2363static bfd_boolean
    22512364do_with_relocs (abfd, s)
    22522365     bfd *abfd;
     
    22652378         comp);
    22662379
    2267   /* Output the section preheader */
     2380  /* Output the section preheader. */
    22682381  if (! ieee_write_byte (abfd, ieee_set_current_section_enum)
    22692382      || ! ieee_write_byte (abfd,
     
    22722385      || ! ieee_write_byte (abfd,
    22732386                            (bfd_byte) (s->index + IEEE_SECTION_NUMBER_BASE)))
    2274     return false;
     2387    return FALSE;
     2388
    22752389  if ((abfd->flags & EXEC_P) != 0 && relocs_to_go == 0)
    22762390    {
    22772391      if (! ieee_write_int (abfd, s->lma))
    2278         return false;
     2392        return FALSE;
    22792393    }
    22802394  else
    22812395    {
    2282       if (! ieee_write_expression (abfd, 0, s->symbol, 0, 0))
    2283         return false;
     2396      if (! ieee_write_expression (abfd, (bfd_vma) 0, s->symbol, 0, 0))
     2397        return FALSE;
    22842398    }
    22852399
     
    22872401    {
    22882402      /* If there aren't any relocations then output the load constant
    2289          byte opcode rather than the load with relocation opcode */
    2290 
     2403         byte opcode rather than the load with relocation opcode.  */
    22912404      while (current_byte_index < s->_raw_size)
    22922405        {
    22932406          bfd_size_type run;
    22942407          unsigned int MAXRUN = 127;
     2408
    22952409          run = MAXRUN;
    22962410          if (run > s->_raw_size - current_byte_index)
    2297             {
    2298               run = s->_raw_size - current_byte_index;
    2299             }
     2411            run = s->_raw_size - current_byte_index;
    23002412
    23012413          if (run != 0)
    23022414            {
    23032415              if (! ieee_write_byte (abfd, ieee_load_constant_bytes_enum))
    2304                 return false;
    2305               /* Output a stream of bytes */
     2416                return FALSE;
     2417              /* Output a stream of bytes. */
    23062418              if (! ieee_write_int (abfd, run))
    2307                 return false;
    2308               if (bfd_write ((PTR) (stream + current_byte_index),
    2309                              1,
    2310                              run,
    2311                              abfd)
     2419                return FALSE;
     2420              if (bfd_bwrite ((PTR) (stream + current_byte_index), run, abfd)
    23122421                  != run)
    2313                 return false;
     2422                return FALSE;
    23142423              current_byte_index += run;
    23152424            }
     
    23192428    {
    23202429      if (! ieee_write_byte (abfd, ieee_load_with_relocation_enum))
    2321         return false;
     2430        return FALSE;
    23222431
    23232432      /* Output the data stream as the longest sequence of bytes
     
    23272436      if ((PTR) stream == (PTR) NULL)
    23282437        {
    2329           /* Outputting a section without data, fill it up */
    2330           stream = (unsigned char *) (bfd_alloc (abfd, s->_raw_size));
     2438          /* Outputting a section without data, fill it up. */
     2439          stream = (unsigned char *) bfd_zalloc (abfd, s->_raw_size);
    23312440          if (!stream)
    2332             return false;
    2333           memset ((PTR) stream, 0, (size_t) s->_raw_size);
     2441            return FALSE;
    23342442        }
    23352443      while (current_byte_index < s->_raw_size)
     
    23372445          bfd_size_type run;
    23382446          unsigned int MAXRUN = 127;
     2447
    23392448          if (relocs_to_go)
    23402449            {
     
    23442453            }
    23452454          else
    2346             {
    2347               run = MAXRUN;
    2348             }
     2455            run = MAXRUN;
     2456
    23492457          if (run > s->_raw_size - current_byte_index)
    2350             {
    2351               run = s->_raw_size - current_byte_index;
    2352             }
     2458            run = s->_raw_size - current_byte_index;
    23532459
    23542460          if (run != 0)
    23552461            {
    2356               /* Output a stream of bytes */
     2462              /* Output a stream of bytes. */
    23572463              if (! ieee_write_int (abfd, run))
    2358                 return false;
    2359               if (bfd_write ((PTR) (stream + current_byte_index),
    2360                              1,
    2361                              run,
    2362                              abfd)
     2464                return FALSE;
     2465              if (bfd_bwrite ((PTR) (stream + current_byte_index), run, abfd)
    23632466                  != run)
    2364                 return false;
     2467                return FALSE;
    23652468              current_byte_index += run;
    23662469            }
    2367           /* Output any relocations here */
     2470
     2471          /* Output any relocations here.  */
    23682472          if (relocs_to_go && (*p) && (*p)->address == current_byte_index)
    23692473            {
     
    23732477                  arelent *r = *p;
    23742478                  bfd_signed_vma ov;
    2375 
    23762479#if 0
    23772480                  if (r->howto->pc_relative)
    2378                     {
    2379                       r->addend += current_byte_index;
    2380                     }
     2481                    r->addend += current_byte_index;
    23812482#endif
    2382 
    23832483                  switch (r->howto->size)
    23842484                    {
     
    24022502                      ov = 0;
    24032503                      BFD_FAIL ();
    2404                       return false;
     2504                      return FALSE;
    24052505                    }
    24062506
     
    24132513                  if (! ieee_write_byte (abfd,
    24142514                                         ieee_function_either_open_b_enum))
    2415                     return false;
     2515                    return FALSE;
    24162516
    24172517/*                abort();*/
     
    24222522                                                   *(r->sym_ptr_ptr),
    24232523                                                   r->howto->pc_relative,
    2424                                                    s->index))
    2425                         return false;
     2524                                                   (unsigned) s->index))
     2525                        return FALSE;
    24262526                    }
    24272527                  else
     
    24302530                                                   (asymbol *) NULL,
    24312531                                                   r->howto->pc_relative,
    2432                                                    s->index))
    2433                         return false;
     2532                                                   (unsigned) s->index))
     2533                        return FALSE;
    24342534                    }
    24352535
     
    24372537                      != bfd_get_reloc_size (r->howto))
    24382538                    {
    2439                       if (! ieee_write_int (abfd,
    2440                                             bfd_get_reloc_size (r->howto)))
    2441                         return false;
     2539                      bfd_vma rsize = bfd_get_reloc_size (r->howto);
     2540                      if (! ieee_write_int (abfd, rsize))
     2541                        return FALSE;
    24422542                    }
    24432543                  if (! ieee_write_byte (abfd,
    24442544                                         ieee_function_either_close_b_enum))
    2445                     return false;
     2545                    return FALSE;
    24462546
    24472547                  relocs_to_go--;
     
    24532553    }
    24542554
    2455   return true;
     2555  return TRUE;
    24562556}
    24572557
     
    24602560   bytes.  */
    24612561
    2462 static boolean
     2562static bfd_boolean
    24632563do_as_repeat (abfd, s)
    24642564     bfd *abfd;
     
    24752575          || ! ieee_write_byte (abfd,
    24762576                                (bfd_byte) (s->index
    2477                                             + IEEE_SECTION_NUMBER_BASE))
    2478           || ! ieee_write_int (abfd, s->lma)
    2479           || ! ieee_write_byte (abfd, ieee_repeat_data_enum)
     2577                                            + IEEE_SECTION_NUMBER_BASE)))
     2578        return FALSE;
     2579
     2580      if ((abfd->flags & EXEC_P) != 0)
     2581        {
     2582          if (! ieee_write_int (abfd, s->lma))
     2583            return FALSE;
     2584        }
     2585      else
     2586        {
     2587          if (! ieee_write_expression (abfd, (bfd_vma) 0, s->symbol, 0, 0))
     2588            return FALSE;
     2589        }
     2590
     2591      if (! ieee_write_byte (abfd, ieee_repeat_data_enum)
    24802592          || ! ieee_write_int (abfd, s->_raw_size)
    24812593          || ! ieee_write_byte (abfd, ieee_load_constant_bytes_enum)
    24822594          || ! ieee_write_byte (abfd, 1)
    24832595          || ! ieee_write_byte (abfd, 0))
    2484         return false;
    2485     }
    2486 
    2487   return true;
    2488 }
    2489 
    2490 static boolean
     2596        return FALSE;
     2597    }
     2598
     2599  return TRUE;
     2600}
     2601
     2602static bfd_boolean
    24912603do_without_relocs (abfd, s)
    24922604     bfd *abfd;
     
    24982610    {
    24992611      if (! do_as_repeat (abfd, s))
    2500         return false;
     2612        return FALSE;
    25012613    }
    25022614  else
    25032615    {
    25042616      unsigned int i;
     2617
    25052618      for (i = 0; i < s->_raw_size; i++)
    25062619        {
     
    25082621            {
    25092622              if (! do_with_relocs (abfd, s))
    2510                 return false;
    2511               return true;
     2623                return FALSE;
     2624              return TRUE;
    25122625            }
    25132626        }
    25142627      if (! do_as_repeat (abfd, s))
    2515         return false;
    2516     }
    2517 
    2518   return true;
     2628        return FALSE;
     2629    }
     2630
     2631  return TRUE;
    25192632}
    25202633
     
    25302643static int output_buffer;
    25312644
     2645static bfd_boolean
     2646ieee_mkobject (abfd)
     2647     bfd *abfd;
     2648{
     2649  bfd_size_type amt;
     2650
     2651  output_ptr_start = NULL;
     2652  output_ptr = NULL;
     2653  output_ptr_end = NULL;
     2654  input_ptr_start = NULL;
     2655  input_ptr = NULL;
     2656  input_ptr_end = NULL;
     2657  input_bfd = NULL;
     2658  output_bfd = NULL;
     2659  output_buffer = 0;
     2660  amt = sizeof (ieee_data_type);
     2661  abfd->tdata.ieee_data = (ieee_data_type *) bfd_zalloc (abfd, amt);
     2662  return abfd->tdata.ieee_data != NULL;
     2663}
     2664
    25322665static void
    25332666fill ()
    25342667{
     2668  bfd_size_type amt = input_ptr_end - input_ptr_start;
    25352669  /* FIXME: Check return value.  I'm not sure whether it needs to read
    25362670     the entire buffer or not.  */
    2537   bfd_read ((PTR) input_ptr_start, 1, input_ptr_end - input_ptr_start, input_bfd);
     2671  bfd_bread ((PTR) input_ptr_start, amt, input_bfd);
    25382672  input_ptr = input_ptr_start;
    25392673}
     2674
    25402675static void
    25412676flush ()
    25422677{
    2543   if (bfd_write ((PTR) (output_ptr_start), 1, output_ptr - output_ptr_start,
    2544                  output_bfd)
    2545       != (bfd_size_type) (output_ptr - output_ptr_start))
     2678  bfd_size_type amt = output_ptr - output_ptr_start;
     2679
     2680  if (bfd_bwrite ((PTR) (output_ptr_start), amt, output_bfd) != amt)
    25462681    abort ();
    25472682  output_ptr = output_ptr_start;
     
    25642699    {
    25652700      unsigned int length;
    2566       /* How many significant bytes ? */
    2567       /* FIXME FOR LONGER INTS */
     2701      /* How many significant bytes ?  */
     2702      /* FIXME FOR LONGER INTS. */
    25682703      if (value & 0xff000000)
    2569         {
    2570           length = 4;
    2571         }
     2704        length = 4;
    25722705      else if (value & 0x00ff0000)
    2573         {
    2574           length = 3;
    2575         }
     2706        length = 3;
    25762707      else if (value & 0x0000ff00)
    2577         {
    2578           length = 2;
    2579         }
     2708        length = 2;
    25802709      else
    25812710        length = 1;
     
    25932722          OUT (value);
    25942723        }
    2595 
    25962724    }
    25972725}
     
    26022730  int length = THIS ();
    26032731  char ch;
     2732
    26042733  OUT (length);
    26052734  NEXT ();
     
    26182747  int stack[10];
    26192748  int *tos = stack;
    2620   int value = 0;
     2749  int value;
     2750
    26212751  while (1)
    26222752    {
     
    26662796          if (THIS () > 0x84)
    26672797            {
    2668               /* Not a number, just bug out with the answer */
     2798              /* Not a number, just bug out with the answer. */
    26692799              write_int (*(--tos));
    26702800              return;
     
    26722802          *tos++ = THIS ();
    26732803          NEXT ();
    2674           value = 0;
    26752804          break;
    26762805        case 0xa5:
    2677           /* PLUS anything */
    2678           {
    2679             int value = *(--tos);
    2680             value += *(--tos);
    2681             *tos++ = value;
    2682             NEXT ();
    2683           }
     2806          /* PLUS anything.  */
     2807          value = *(--tos);
     2808          value += *(--tos);
     2809          *tos++ = value;
     2810          NEXT ();
    26842811          break;
    26852812        case VAR ('R'):
     
    26882815            ieee_data_type *ieee;
    26892816            asection *s;
     2817
    26902818            NEXT ();
    26912819            section_number = THIS ();
     
    26942822            ieee = IEEE_DATA (input_bfd);
    26952823            s = ieee->section_table[section_number];
     2824            value = 0;
    26962825            if (s->output_section)
    2697               {
    2698                 value = s->output_section->lma;
    2699               }
    2700             else
    2701               {
    2702                 value = 0;
    2703               }
     2826              value = s->output_section->lma;
    27042827            value += s->output_offset;
    27052828            *tos++ = value;
    2706             value = 0;
    27072829          }
    27082830          break;
     
    27132835            OUT (0x90);
    27142836            return;
    2715 
    27162837          }
    27172838        }
    27182839    }
    2719 
    27202840}
    27212841
    27222842/* Drop the int in the buffer, and copy a null into the gap, which we
    27232843   will overwrite later */
    2724 
    2725 struct output_buffer_struct
    2726 {
    2727   unsigned char *ptrp;
    2728   int buffer;
    2729 };
    27302844
    27312845static void
     
    27352849  if (buf->buffer == output_buffer)
    27362850    {
    2737       /* Still a chance to output the size */
     2851      /* Still a chance to output the size. */
    27382852      int value = output_ptr - buf->ptrp + 3;
    27392853      buf->ptrp[0] = value >> 24;
     
    27502864  int type = THIS ();
    27512865  int ch;
     2866
    27522867  if (type <= 0x84)
    27532868    {
     
    28162931#define INT copy_int()
    28172932#define EXP copy_expression()
    2818 static void copy_till_end ();
    28192933#define INTn(q) copy_int()
    28202934#define EXPn(q) copy_expression()
     
    28242938{
    28252939  int ch;
    2826   /* ATN record */
     2940
     2941  /* ATN record.  */
    28272942  NEXT ();
    28282943  ch = THIS ();
     
    28642979      break;
    28652980    case 0xd8:
    2866       /* EXternal ref */
     2981      /* EXternal ref. */
    28672982      NEXT ();
    28682983      OUT (0xf1);
     
    29183033        }
    29193034    }
    2920 
    29213035}
    29223036
     
    29243038f0_record ()
    29253039{
    2926   /* Attribute record */
     3040  /* Attribute record. */
    29273041  NEXT ();
    29283042  OUT (0xf0);
     
    29353049{
    29363050  int ch = THIS ();
     3051
    29373052  while (1)
    29383053    {
     
    29823097
    29833098
    2984 static void block ();
    29853099static void
    29863100f8_record ()
     
    29943108    case 0x02:
    29953109    case 0x03:
    2996       /* Unique typedefs for module */
    2997       /* GLobal typedefs  */
    2998       /* High level module scope beginning */
     3110      /* Unique typedefs for module. */
     3111      /* GLobal typedefs.   */
     3112      /* High level module scope beginning. */
    29993113      {
    30003114        struct output_buffer_struct ob;
     3115
    30013116        NEXT ();
    30023117        OUT (0xf8);
     
    30133128      break;
    30143129    case 0x04:
    3015       /* Global function */
     3130      /* Global function. */
    30163131      {
    30173132        struct output_buffer_struct ob;
     3133
    30183134        NEXT ();
    30193135        OUT (0xf8);
     
    30353151
    30363152    case 0x05:
    3037       /* File name for source line numbers */
     3153      /* File name for source line numbers. */
    30383154      {
    30393155        struct output_buffer_struct ob;
     3156
    30403157        NEXT ();
    30413158        OUT (0xf8);
     
    30573174
    30583175    case 0x06:
    3059       /* Local function */
     3176      /* Local function. */
    30603177      {
    30613178        struct output_buffer_struct ob;
     3179
    30623180        NEXT ();
    30633181        OUT (0xf8);
     
    30773195
    30783196    case 0x0a:
    3079       /* Assembler module scope beginning -*/
     3197      /* Assembler module scope beginning -  */
    30803198      {
    30813199        struct output_buffer_struct ob;
     
    31063224      {
    31073225        struct output_buffer_struct ob;
     3226
    31083227        NEXT ();
    31093228        OUT (0xf8);
     
    31423261{
    31433262  int ch;
     3263
    31443264  while (1)
    31453265    {
     
    31733293
    31743294
    3175 
    3176 /* relocate_debug,
    3177    moves all the debug information from the source bfd to the output
    3178    bfd, and relocates any expressions it finds
    3179 */
     3295/* Moves all the debug information from the source bfd to the output
     3296   bfd, and relocates any expressions it finds.  */
    31803297
    31813298static void
     
    31933310  /* FIXME: Check return value.  I'm not sure whether it needs to read
    31943311     the entire buffer or not.  */
    3195   bfd_read ((PTR) input_ptr_start, 1, IBS, input);
     3312  bfd_bread ((PTR) input_ptr_start, (bfd_size_type) IBS, input);
    31963313  block ();
    31973314}
     
    32003317   one place, relocating it and emitting it as we go.  */
    32013318
    3202 static boolean
     3319static bfd_boolean
    32033320ieee_write_debug_part (abfd)
    32043321     bfd *abfd;
     
    32063323  ieee_data_type *ieee = IEEE_DATA (abfd);
    32073324  bfd_chain_type *chain = ieee->chain_root;
    3208   unsigned char output_buffer[OBS];
    3209   boolean some_debug = false;
     3325  unsigned char obuff[OBS];
     3326  bfd_boolean some_debug = FALSE;
    32103327  file_ptr here = bfd_tell (abfd);
    32113328
    3212   output_ptr_start = output_ptr = output_buffer;
    3213   output_ptr_end = output_buffer + OBS;
    3214   output_ptr = output_buffer;
     3329  output_ptr_start = output_ptr = obuff;
     3330  output_ptr_end = obuff + OBS;
     3331  output_ptr = obuff;
    32153332  output_bfd = abfd;
    32163333
     
    32253342        {
    32263343          ieee->w.r.debug_information_part = 0;
    3227           return true;
     3344          return TRUE;
    32283345        }
    32293346
    32303347      ieee->w.r.debug_information_part = here;
    3231       if (bfd_write (s->contents, 1, s->_raw_size, abfd) != s->_raw_size)
    3232         return false;
     3348      if (bfd_bwrite (s->contents, s->_raw_size, abfd) != s->_raw_size)
     3349        return FALSE;
    32333350    }
    32343351  else
     
    32383355          bfd *entry = chain->this;
    32393356          ieee_data_type *entry_ieee = IEEE_DATA (entry);
     3357
    32403358          if (entry_ieee->w.r.debug_information_part)
    32413359            {
    32423360              if (bfd_seek (entry, entry_ieee->w.r.debug_information_part,
    3243                             SEEK_SET)
    3244                   != 0)
    3245                 return false;
     3361                            SEEK_SET) != 0)
     3362                return FALSE;
    32463363              relocate_debug (abfd, entry);
    32473364            }
     
    32493366          chain = chain->next;
    32503367        }
     3368
    32513369      if (some_debug)
    3252         {
    3253           ieee->w.r.debug_information_part = here;
    3254         }
     3370        ieee->w.r.debug_information_part = here;
    32553371      else
    3256         {
    3257           ieee->w.r.debug_information_part = 0;
    3258         }
     3372        ieee->w.r.debug_information_part = 0;
    32593373
    32603374      flush ();
    32613375    }
    32623376
    3263   return true;
     3377  return TRUE;
    32643378}
    32653379
    32663380/* Write the data in an ieee way.  */
    32673381
    3268 static boolean
     3382static bfd_boolean
    32693383ieee_write_data_part (abfd)
    32703384     bfd *abfd;
    32713385{
    32723386  asection *s;
     3387
    32733388  ieee_data_type *ieee = IEEE_DATA (abfd);
    32743389  ieee->w.r.data_part = bfd_tell (abfd);
     3390
    32753391  for (s = abfd->sections; s != (asection *) NULL; s = s->next)
    32763392    {
     
    32853401        {
    32863402          if (! do_with_relocs (abfd, s))
    3287             return false;
     3403            return FALSE;
    32883404        }
    32893405      else
    32903406        {
    32913407          if (! do_without_relocs (abfd, s))
    3292             return false;
     3408            return FALSE;
    32933409        }
    32943410    }
    32953411
    3296   return true;
    3297 }
    3298 
    3299 
    3300 static boolean
     3412  return TRUE;
     3413}
     3414
     3415
     3416static bfd_boolean
    33013417init_for_output (abfd)
    33023418     bfd *abfd;
    33033419{
    33043420  asection *s;
     3421
    33053422  for (s = abfd->sections; s != (asection *) NULL; s = s->next)
    33063423    {
     
    33093426      if (s->_raw_size != 0)
    33103427        {
    3311           ieee_per_section (s)->data = (bfd_byte *) (bfd_alloc (abfd, s->_raw_size));
     3428          bfd_size_type size = s->_raw_size;
     3429          ieee_per_section (s)->data = (bfd_byte *) (bfd_alloc (abfd, size));
    33123430          if (!ieee_per_section (s)->data)
    3313             return false;
     3431            return FALSE;
    33143432        }
    33153433    }
    3316   return true;
    3317 }
    3318 
    3319 
    3320 /** exec and core file sections */
    3321 
    3322 /* set section contents is complicated with IEEE since the format is
    3323 * not a byte image, but a record stream.
    3324 */
    3325 boolean
     3434  return TRUE;
     3435}
     3436
     3437
     3438/* Exec and core file sections. */
     3439
     3440/* Set section contents is complicated with IEEE since the format is
     3441   not a byte image, but a record stream.  */
     3442
     3443static bfd_boolean
    33263444ieee_set_section_contents (abfd, section, location, offset, count)
    33273445     bfd *abfd;
     
    33353453      if (section->contents == NULL)
    33363454        {
    3337           section->contents = ((unsigned char *)
    3338                                bfd_alloc (abfd, section->_raw_size));
     3455          bfd_size_type size = section->_raw_size;
     3456          section->contents = (unsigned char *) bfd_alloc (abfd, size);
    33393457          if (section->contents == NULL)
    3340             return false;
     3458            return FALSE;
    33413459        }
    33423460      /* bfd_set_section_contents has already checked that everything
    33433461         is within range.  */
    3344       memcpy (section->contents + offset, location, count);
    3345       return true;
     3462      memcpy (section->contents + offset, location, (size_t) count);
     3463      return TRUE;
    33463464    }
    33473465
     
    33493467    {
    33503468      if (!init_for_output (abfd))
    3351         return false;
     3469        return FALSE;
    33523470    }
    33533471  memcpy ((PTR) (ieee_per_section (section)->data + offset),
    33543472          (PTR) location,
    33553473          (unsigned int) count);
    3356   return true;
     3474  return TRUE;
    33573475}
    33583476
     
    33623480   symbol values into indexes from the right base.  */
    33633481
    3364 static boolean
     3482static bfd_boolean
    33653483ieee_write_external_part (abfd)
    33663484     bfd *abfd;
     
    33683486  asymbol **q;
    33693487  ieee_data_type *ieee = IEEE_DATA (abfd);
    3370 
    33713488  unsigned int reference_index = IEEE_REFERENCE_BASE;
    33723489  unsigned int public_index = IEEE_PUBLIC_BASE + 2;
    33733490  file_ptr here = bfd_tell (abfd);
    3374   boolean hadone = false;
     3491  bfd_boolean hadone = FALSE;
     3492
    33753493  if (abfd->outsymbols != (asymbol **) NULL)
    33763494    {
     
    33793497        {
    33803498          asymbol *p = *q;
     3499
    33813500          if (bfd_is_und_section (p->section))
    33823501            {
    3383               /* This must be a symbol reference .. */
     3502              /* This must be a symbol reference. */
    33843503              if (! ieee_write_byte (abfd, ieee_external_reference_enum)
    3385                   || ! ieee_write_int (abfd, reference_index)
     3504                  || ! ieee_write_int (abfd, (bfd_vma) reference_index)
    33863505                  || ! ieee_write_id (abfd, p->name))
    3387                 return false;
     3506                return FALSE;
    33883507              p->value = reference_index;
    33893508              reference_index++;
    3390               hadone = true;
     3509              hadone = TRUE;
    33913510            }
    33923511          else if (bfd_is_com_section (p->section))
    33933512            {
    3394               /* This is a weak reference */
     3513              /* This is a weak reference. */
    33953514              if (! ieee_write_byte (abfd, ieee_external_reference_enum)
    3396                   || ! ieee_write_int (abfd, reference_index)
     3515                  || ! ieee_write_int (abfd, (bfd_vma) reference_index)
    33973516                  || ! ieee_write_id (abfd, p->name)
    33983517                  || ! ieee_write_byte (abfd,
    33993518                                        ieee_weak_external_reference_enum)
    3400                   || ! ieee_write_int (abfd, reference_index)
     3519                  || ! ieee_write_int (abfd, (bfd_vma) reference_index)
    34013520                  || ! ieee_write_int (abfd, p->value))
    3402                 return false;
     3521                return FALSE;
    34033522              p->value = reference_index;
    34043523              reference_index++;
    3405               hadone = true;
     3524              hadone = TRUE;
    34063525            }
    34073526          else if (p->flags & BSF_GLOBAL)
    34083527            {
    3409               /* This must be a symbol definition */
    3410 
     3528              /* This must be a symbol definition.  */
    34113529              if (! ieee_write_byte (abfd, ieee_external_symbol_enum)
    3412                   || ! ieee_write_int (abfd, public_index)
     3530                  || ! ieee_write_int (abfd, (bfd_vma) public_index)
    34133531                  || ! ieee_write_id (abfd, p->name)
    34143532                  || ! ieee_write_2bytes (abfd, ieee_attribute_record_enum)
    3415                   || ! ieee_write_int (abfd, public_index)
     3533                  || ! ieee_write_int (abfd, (bfd_vma) public_index)
    34163534                  || ! ieee_write_byte (abfd, 15) /* instruction address */
    34173535                  || ! ieee_write_byte (abfd, 19) /* static symbol */
    34183536                  || ! ieee_write_byte (abfd, 1)) /* one of them */
    3419                 return false;
    3420 
    3421               /* Write out the value */
     3537                return FALSE;
     3538
     3539              /* Write out the value. */
    34223540              if (! ieee_write_2bytes (abfd, ieee_value_record_enum)
    3423                   || ! ieee_write_int (abfd, public_index))
    3424                 return false;
     3541                  || ! ieee_write_int (abfd, (bfd_vma) public_index))
     3542                return FALSE;
    34253543              if (! bfd_is_abs_section (p->section))
    34263544                {
     
    34283546                    {
    34293547                      /* If fully linked, then output all symbols
    3430                          relocated */
     3548                         relocated. */
    34313549                      if (! (ieee_write_int
    34323550                             (abfd,
     
    34343552                               + p->section->output_offset
    34353553                               + p->section->output_section->vma))))
    3436                         return false;
     3554                        return FALSE;
    34373555                    }
    34383556                  else
     
    34423560                              p->value + p->section->output_offset,
    34433561                              p->section->output_section->symbol,
    3444                               false, 0)))
    3445                         return false;
     3562                              FALSE, 0)))
     3563                        return FALSE;
    34463564                    }
    34473565                }
     
    34513569                                               p->value,
    34523570                                               bfd_abs_section_ptr->symbol,
    3453                                                false, 0))
    3454                     return false;
     3571                                               FALSE, 0))
     3572                    return FALSE;
    34553573                }
    34563574              p->value = public_index;
    34573575              public_index++;
    3458               hadone = true;
     3576              hadone = TRUE;
    34593577            }
    34603578          else
    34613579            {
    3462               /* This can happen - when there are gaps in the symbols read */
    3463               /* from an input ieee file */
     3580              /* This can happen - when there are gaps in the symbols read
     3581                 from an input ieee file. */
    34643582            }
    34653583        }
     
    34683586    ieee->w.r.external_part = here;
    34693587
    3470   return true;
    3471 }
    3472 
    3473 
    3474 static CONST unsigned char exten[] =
     3588  return TRUE;
     3589}
     3590
     3591
     3592static const unsigned char exten[] =
    34753593{
    34763594  0xf0, 0x20, 0x00,
    3477   0xf1, 0xce, 0x20, 0x00, 37, 3, 3,     /* Set version 3 rev 3          */
    3478   0xf1, 0xce, 0x20, 0x00, 39, 2,/* keep symbol in  original case */
    3479   0xf1, 0xce, 0x20, 0x00, 38    /* set object type relocateable to x */
     3595  0xf1, 0xce, 0x20, 0x00, 37, 3, 3,     /* Set version 3 rev 3*/
     3596  0xf1, 0xce, 0x20, 0x00, 39, 2,        /* Keep symbol in  original case. */
     3597  0xf1, 0xce, 0x20, 0x00, 38            /* Set object type relocateable to x. */
    34803598};
    34813599
    3482 static CONST unsigned char envi[] =
     3600static const unsigned char envi[] =
    34833601{
    34843602  0xf0, 0x21, 0x00,
     
    34933611};
    34943612
    3495 static boolean
     3613static bfd_boolean
    34963614ieee_write_me_part (abfd)
    34973615     bfd *abfd;
     
    35053623          || ! ieee_write_int (abfd, abfd->start_address)
    35063624          || ! ieee_write_byte (abfd, ieee_function_either_close_b_enum))
    3507         return false;
     3625        return FALSE;
    35083626    }
    35093627  ieee->w.r.me_record = bfd_tell (abfd);
    35103628  if (! ieee_write_byte (abfd, ieee_module_end_enum))
    3511     return false;
    3512   return true;
     3629    return FALSE;
     3630  return TRUE;
    35133631}
    35143632
    35153633/* Write out the IEEE processor ID.  */
    35163634
    3517 static boolean
     3635static bfd_boolean
    35183636ieee_write_processor (abfd)
    35193637     bfd *abfd;
     
    35263644    default:
    35273645      if (! ieee_write_id (abfd, bfd_printable_name (abfd)))
    3528         return false;
     3646        return FALSE;
    35293647      break;
    35303648
    35313649    case bfd_arch_a29k:
    35323650      if (! ieee_write_id (abfd, "29000"))
    3533         return false;
     3651        return FALSE;
    35343652      break;
    35353653
    35363654    case bfd_arch_h8300:
    35373655      if (! ieee_write_id (abfd, "H8/300"))
    3538         return false;
     3656        return FALSE;
    35393657      break;
    35403658
    35413659    case bfd_arch_h8500:
    35423660      if (! ieee_write_id (abfd, "H8/500"))
    3543         return false;
     3661        return FALSE;
    35443662      break;
    35453663
     
    35513669        case bfd_mach_i960_ka_sa:
    35523670          if (! ieee_write_id (abfd, "80960KA"))
    3553             return false;
     3671            return FALSE;
    35543672          break;
    35553673
    35563674        case bfd_mach_i960_kb_sb:
    35573675          if (! ieee_write_id (abfd, "80960KB"))
    3558             return false;
     3676            return FALSE;
    35593677          break;
    35603678
    35613679        case bfd_mach_i960_ca:
    35623680          if (! ieee_write_id (abfd, "80960CA"))
    3563             return false;
     3681            return FALSE;
    35643682          break;
    35653683
     
    35673685        case bfd_mach_i960_xa:
    35683686          if (! ieee_write_id (abfd, "80960MC"))
    3569             return false;
     3687            return FALSE;
    35703688          break;
    35713689        }
     
    35943712
    35953713        if (! ieee_write_id (abfd, id))
    3596           return false;
     3714          return FALSE;
    35973715      }
    35983716      break;
    35993717    }
    36003718
    3601   return true;
    3602 }
    3603 
    3604 boolean
     3719  return TRUE;
     3720}
     3721
     3722static bfd_boolean
    36053723ieee_write_object_contents (abfd)
    36063724     bfd *abfd;
     
    36103728  file_ptr old;
    36113729
    3612   /* Fast forward over the header area */
     3730  /* Fast forward over the header area. */
    36133731  if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
    3614     return false;
     3732    return FALSE;
    36153733
    36163734  if (! ieee_write_byte (abfd, ieee_module_beginning_enum)
    36173735      || ! ieee_write_processor (abfd)
    36183736      || ! ieee_write_id (abfd, abfd->filename))
    3619     return false;
    3620 
    3621   /* Fast forward over the variable bits */
     3737    return FALSE;
     3738
     3739  /* Fast forward over the variable bits. */
    36223740  if (! ieee_write_byte (abfd, ieee_address_descriptor_enum))
    3623     return false;
    3624 
    3625   /* Bits per MAU */
     3741    return FALSE;
     3742
     3743  /* Bits per MAU. */
    36263744  if (! ieee_write_byte (abfd, (bfd_byte) (bfd_arch_bits_per_byte (abfd))))
    3627     return false;
    3628   /* MAU's per address */
     3745    return FALSE;
     3746  /* MAU's per address. */
    36293747  if (! ieee_write_byte (abfd,
    36303748                         (bfd_byte) (bfd_arch_bits_per_address (abfd)
    36313749                                     / bfd_arch_bits_per_byte (abfd))))
    3632     return false;
     3750    return FALSE;
    36333751
    36343752  old = bfd_tell (abfd);
    36353753  if (bfd_seek (abfd, (file_ptr) (8 * N_W_VARIABLES), SEEK_CUR) != 0)
    3636     return false;
     3754    return FALSE;
    36373755
    36383756  ieee->w.r.extension_record = bfd_tell (abfd);
    3639   if (bfd_write ((char *) exten, 1, sizeof (exten), abfd) != sizeof (exten))
    3640     return false;
     3757  if (bfd_bwrite ((char *) exten, (bfd_size_type) sizeof (exten), abfd)
     3758      != sizeof (exten))
     3759    return FALSE;
    36413760  if (abfd->flags & EXEC_P)
    36423761    {
    36433762      if (! ieee_write_byte (abfd, 0x1)) /* Absolute */
    3644         return false;
     3763        return FALSE;
    36453764    }
    36463765  else
    36473766    {
    36483767      if (! ieee_write_byte (abfd, 0x2)) /* Relocateable */
    3649         return false;
     3768        return FALSE;
    36503769    }
    36513770
    36523771  ieee->w.r.environmental_record = bfd_tell (abfd);
    3653   if (bfd_write ((char *) envi, 1, sizeof (envi), abfd) != sizeof (envi))
    3654     return false;
     3772  if (bfd_bwrite ((char *) envi, (bfd_size_type) sizeof (envi), abfd)
     3773      != sizeof (envi))
     3774    return FALSE;
    36553775
    36563776  /* The HP emulator database requires a timestamp in the file.  */
     
    36653785        || ! ieee_write_byte (abfd, 0)
    36663786        || ! ieee_write_byte (abfd, 50)
    3667         || ! ieee_write_int (abfd, t->tm_year + 1900)
    3668         || ! ieee_write_int (abfd, t->tm_mon + 1)
    3669         || ! ieee_write_int (abfd, t->tm_mday)
    3670         || ! ieee_write_int (abfd, t->tm_hour)
    3671         || ! ieee_write_int (abfd, t->tm_min)
    3672         || ! ieee_write_int (abfd, t->tm_sec))
    3673       return false;
     3787        || ! ieee_write_int (abfd, (bfd_vma) (t->tm_year + 1900))
     3788        || ! ieee_write_int (abfd, (bfd_vma) (t->tm_mon + 1))
     3789        || ! ieee_write_int (abfd, (bfd_vma) t->tm_mday)
     3790        || ! ieee_write_int (abfd, (bfd_vma) t->tm_hour)
     3791        || ! ieee_write_int (abfd, (bfd_vma) t->tm_min)
     3792        || ! ieee_write_int (abfd, (bfd_vma) t->tm_sec))
     3793      return FALSE;
    36743794  }
    36753795
     
    36793799
    36803800  if (! ieee_write_section_part (abfd))
    3681     return false;
     3801    return FALSE;
    36823802  /* First write the symbols.  This changes their values into table
    36833803    indeces so we cant use it after this point.  */
    36843804  if (! ieee_write_external_part (abfd))
    3685     return false;
    3686 
    3687   /*  ieee_write_byte(abfd, ieee_record_seperator_enum);*/
    3688 
    3689   /*  ieee_write_byte(abfd, ieee_record_seperator_enum);*/
    3690 
     3805    return FALSE;
    36913806
    36923807  /* Write any debugs we have been told about.  */
    36933808  if (! ieee_write_debug_part (abfd))
    3694     return false;
     3809    return FALSE;
    36953810
    36963811  /* Can only write the data once the symbols have been written, since
     
    36983813     symbols.  */
    36993814  if (! ieee_write_data_part (abfd))
    3700     return false;
     3815    return FALSE;
    37013816
    37023817  /* At the end we put the end!  */
    37033818  if (! ieee_write_me_part (abfd))
    3704     return false;
    3705 
    3706   /* Generate the header */
     3819    return FALSE;
     3820
     3821  /* Generate the header. */
    37073822  if (bfd_seek (abfd, old, SEEK_SET) != 0)
    3708     return false;
     3823    return FALSE;
    37093824
    37103825  for (i = 0; i < N_W_VARIABLES; i++)
     
    37123827      if (! ieee_write_2bytes (abfd, ieee_assign_value_to_variable_enum)
    37133828          || ! ieee_write_byte (abfd, (bfd_byte) i)
    3714           || ! ieee_write_int5_out (abfd, ieee->w.offset[i]))
    3715         return false;
    3716     }
    3717 
    3718   return true;
     3829          || ! ieee_write_int5_out (abfd, (bfd_vma) ieee->w.offset[i]))
     3830        return FALSE;
     3831    }
     3832
     3833  return TRUE;
    37193834}
    37203835
     
    37243839/* We read the symbols into a buffer, which is discarded when this
    37253840   function exits.  We read the strings into a buffer large enough to
    3726    hold them all plus all the cached symbol entries. */
    3727 
    3728 asymbol *
     3841   hold them all plus all the cached symbol entries.  */
     3842
     3843static asymbol *
    37293844ieee_make_empty_symbol (abfd)
    37303845     bfd *abfd;
    37313846{
    3732   ieee_symbol_type *new =
    3733     (ieee_symbol_type *) bfd_zalloc (abfd, sizeof (ieee_symbol_type));
     3847  bfd_size_type amt = sizeof (ieee_symbol_type);
     3848  ieee_symbol_type *new = (ieee_symbol_type *) bfd_zalloc (abfd, amt);
     3849
    37343850  if (!new)
    37353851    return NULL;
     
    37443860{
    37453861  ieee_ar_data_type *ar = IEEE_AR_DATA (arch);
    3746   /* take the next one from the arch state, or reset */
     3862
     3863  /* Take the next one from the arch state, or reset.  */
    37473864  if (prev == (bfd *) NULL)
    3748     {
    3749       /* Reset the index - the first two entries are bogus*/
    3750       ar->element_index = 2;
    3751     }
    3752   while (true)
     3865    /* Reset the index - the first two entries are bogus.  */
     3866    ar->element_index = 2;
     3867
     3868  while (TRUE)
    37533869    {
    37543870      ieee_ar_obstack_type *p = ar->elements + ar->element_index;
     3871
    37553872      ar->element_index++;
    37563873      if (ar->element_index <= ar->element_count)
     
    37713888          return (bfd *) NULL;
    37723889        }
    3773 
    3774     }
    3775 }
    3776 
    3777 static boolean
    3778 ieee_find_nearest_line (abfd,
    3779                         section,
    3780                         symbols,
    3781                         offset,
    3782                         filename_ptr,
    3783                         functionname_ptr,
    3784                         line_ptr)
     3890    }
     3891}
     3892
     3893static bfd_boolean
     3894ieee_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
     3895                        functionname_ptr, line_ptr)
    37853896     bfd *abfd ATTRIBUTE_UNUSED;
    37863897     asection *section ATTRIBUTE_UNUSED;
     
    37913902     unsigned int *line_ptr ATTRIBUTE_UNUSED;
    37923903{
    3793   return false;
     3904  return FALSE;
    37943905}
    37953906
     
    38293940ieee_sizeof_headers (abfd, x)
    38303941     bfd *abfd ATTRIBUTE_UNUSED;
    3831      boolean x ATTRIBUTE_UNUSED;
     3942     bfd_boolean x ATTRIBUTE_UNUSED;
    38323943{
    38333944  return 0;
     
    38543965
    38553966/* Add this section to the list of sections we have debug info for, to
    3856    be ready to output it at close time
    3857    */
     3967   be ready to output it at close time.  */
    38583968static void
    38593969ieee_bfd_debug_info_accumulate (abfd, section)
     
    38633973  ieee_data_type *ieee = IEEE_DATA (section->owner);
    38643974  ieee_data_type *output_ieee = IEEE_DATA (abfd);
    3865   /* can only accumulate data from other ieee bfds */
     3975
     3976  /* Can only accumulate data from other ieee bfds.  */
    38663977  if (section->owner->xvec != abfd->xvec)
    38673978    return;
    3868   /* Only bother once per bfd */
    3869   if (ieee->done_debug == true)
     3979  /* Only bother once per bfd. */
     3980  if (ieee->done_debug)
    38703981    return;
    3871   ieee->done_debug = true;
    3872 
    3873   /* Don't bother if there is no debug info */
     3982  ieee->done_debug = TRUE;
     3983
     3984  /* Don't bother if there is no debug info. */
    38743985  if (ieee->w.r.debug_information_part == 0)
    38753986    return;
    38763987
    3877 
    3878   /* Add to chain */
     3988  /* Add to chain.  */
    38793989  {
    3880     bfd_chain_type *n = (bfd_chain_type *) bfd_alloc (abfd, sizeof (bfd_chain_type));
     3990    bfd_size_type amt = sizeof (bfd_chain_type);
     3991    bfd_chain_type *n = (bfd_chain_type *) bfd_alloc (abfd, amt);
     3992
    38813993    if (!n)
    38823994      abort ();         /* FIXME */
     
    38853997
    38863998    if (output_ieee->chain_head)
    3887       {
    3888         output_ieee->chain_head->next = n;
    3889       }
     3999      output_ieee->chain_head->next = n;
    38904000    else
    3891       {
    3892         output_ieee->chain_root = n;
    3893 
    3894       }
     4001      output_ieee->chain_root = n;
     4002
    38954003    output_ieee->chain_head = n;
    38964004  }
     
    39054013#define ieee_slurp_extended_name_table bfd_true
    39064014#define ieee_construct_extended_name_table \
    3907   ((boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
     4015  ((bfd_boolean (*) \
     4016    PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
    39084017   bfd_true)
    39094018#define ieee_truncate_arname bfd_dont_truncate_arname
    39104019#define ieee_write_armap \
    3911   ((boolean (*) \
     4020  ((bfd_boolean (*) \
    39124021    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int))) \
    39134022   bfd_true)
     
    39324041#define ieee_bfd_relax_section bfd_generic_relax_section
    39334042#define ieee_bfd_gc_sections bfd_generic_gc_sections
     4043#define ieee_bfd_merge_sections bfd_generic_merge_sections
     4044#define ieee_bfd_discard_group bfd_generic_discard_group
    39344045#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
     4046#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
    39354047#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
     4048#define ieee_bfd_link_just_syms _bfd_generic_link_just_syms
    39364049#define ieee_bfd_final_link _bfd_generic_final_link
    39374050#define ieee_bfd_link_split_section  _bfd_generic_link_split_section
    39384051
    3939 /*SUPPRESS 460 */
    39404052const bfd_target ieee_vec =
    39414053{
     
    39774089  },
    39784090
     4091  /* ieee_close_and_cleanup, ieee_bfd_free_cached_info, ieee_new_section_hook,
     4092     ieee_get_section_contents, ieee_get_section_contents_in_window  */
    39794093  BFD_JUMP_TABLE_GENERIC (ieee),
     4094
    39804095  BFD_JUMP_TABLE_COPY (_bfd_generic),
    39814096  BFD_JUMP_TABLE_CORE (_bfd_nocore),
     4097
     4098  /* ieee_slurp_armap, ieee_slurp_extended_name_table,
     4099     ieee_construct_extended_name_table, ieee_truncate_arname,
     4100     ieee_write_armap, ieee_read_ar_hdr, ieee_openr_next_archived_file,
     4101     ieee_get_elt_at_index, ieee_generic_stat_arch_elt,
     4102     ieee_update_armap_timestamp  */
    39824103  BFD_JUMP_TABLE_ARCHIVE (ieee),
     4104
     4105  /* ieee_get_symtab_upper_bound, ieee_get_symtab, ieee_make_empty_symbol,
     4106     ieee_print_symbol, ieee_get_symbol_info, ieee_bfd_is_local_label_name,
     4107     ieee_get_lineno, ieee_find_nearest_line, ieee_bfd_make_debug_symbol,
     4108     ieee_read_minisymbols, ieee_minisymbol_to_symbol  */
    39834109  BFD_JUMP_TABLE_SYMBOLS (ieee),
     4110
     4111  /* ieee_get_reloc_upper_bound, ieee_canonicalize_reloc,
     4112     ieee_bfd_reloc_type_lookup  */
    39844113  BFD_JUMP_TABLE_RELOCS (ieee),
     4114
     4115  /* ieee_set_arch_mach, ieee_set_section_contents  */
    39854116  BFD_JUMP_TABLE_WRITE (ieee),
     4117
     4118  /* ieee_sizeof_headers, ieee_bfd_get_relocated_section_contents,
     4119     ieee_bfd_relax_section, ieee_bfd_link_hash_table_create,
     4120     _bfd_generic_link_hash_table_free,
     4121     ieee_bfd_link_add_symbols, ieee_bfd_final_link,
     4122     ieee_bfd_link_split_section, ieee_bfd_gc_sections,
     4123     ieee_bfd_merge_sections  */
    39864124  BFD_JUMP_TABLE_LINK (ieee),
     4125
    39874126  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
    39884127
    39894128  NULL,
    3990  
     4129
    39914130  (PTR) 0
    39924131};
Note: See TracChangeset for help on using the changeset viewer.