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/aout-target.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* Define a target vector and some small routines for a variant of a.out.
    22   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    3    2000, 2001
     3   2000, 2001, 2002
    44   Free Software Foundation, Inc.
    55
     
    8989  /* Determine the architecture and machine type of the object file.  */
    9090#ifdef SET_ARCH_MACH
    91   SET_ARCH_MACH(abfd, *execp);
     91  SET_ARCH_MACH (abfd, *execp);
    9292#else
    93   bfd_default_set_arch_mach(abfd, DEFAULT_ARCH, 0);
     93  bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
    9494#endif
    9595
     
    147147  struct internal_exec exec;            /* Cleaned-up exec header */
    148148  const bfd_target *target;
    149 
    150   if (bfd_read ((PTR) &exec_bytes, 1, EXEC_BYTES_SIZE, abfd)
    151       != EXEC_BYTES_SIZE) {
    152     if (bfd_get_error () != bfd_error_system_call)
    153       bfd_set_error (bfd_error_wrong_format);
    154     return 0;
    155   }
     149  bfd_size_type amt = EXEC_BYTES_SIZE;
     150
     151  if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
     152    {
     153      if (bfd_get_error () != bfd_error_system_call)
     154        bfd_set_error (bfd_error_wrong_format);
     155      return 0;
     156    }
    156157
    157158#ifdef SWAP_MAGIC
    158159  exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
    159160#else
    160   exec.a_info = bfd_h_get_32 (abfd, exec_bytes.e_info);
     161  exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
    161162#endif /* SWAP_MAGIC */
    162163
     
    201202#ifndef MY_mkobject
    202203
    203 static boolean MY(mkobject) PARAMS ((bfd *));
    204 
    205 static boolean
     204static bfd_boolean MY(mkobject) PARAMS ((bfd *));
     205
     206static bfd_boolean
    206207MY(mkobject) (abfd)
    207208     bfd *abfd;
    208209{
    209   if (NAME(aout,mkobject) (abfd) == false)
    210     return false;
     210  if (! NAME(aout,mkobject) (abfd))
     211    return FALSE;
    211212#if 0 /* Sizes get set in set_sizes callback, later, after we know
    212213         the architecture and machine.  */
     
    215216  adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
    216217#endif
    217   return true;
     218  return TRUE;
    218219}
    219220#define MY_mkobject MY(mkobject)
     
    228229   after the section contents have been set.  */
    229230
    230 static boolean MY_bfd_copy_private_section_data
     231static bfd_boolean MY_bfd_copy_private_section_data
    231232  PARAMS ((bfd *, asection *, bfd *, asection *));
    232233
    233 static boolean
     234static bfd_boolean
    234235MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
    235236     bfd *ibfd;
     
    241242      && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
    242243    obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
    243   return true;
     244  return TRUE;
    244245}
    245246
     
    251252
    252253#ifndef MY_write_object_contents
    253 static boolean
     254static bfd_boolean MY(write_object_contents) PARAMS ((bfd *));
     255
     256static bfd_boolean
    254257MY(write_object_contents) (abfd)
    255258     bfd *abfd;
     
    262265  WRITE_HEADERS(abfd, execp);
    263266
    264   return true;
     267  return TRUE;
    265268}
    266269#define MY_write_object_contents MY(write_object_contents)
     
    269272#ifndef MY_set_sizes
    270273
    271 static boolean MY(set_sizes) PARAMS ((bfd *));
    272 
    273 static boolean
     274static bfd_boolean MY(set_sizes) PARAMS ((bfd *));
     275
     276static bfd_boolean
    274277MY(set_sizes) (abfd)
    275278     bfd *abfd;
     
    285288
    286289  adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
    287   return true;
     290  return TRUE;
    288291}
    289292#define MY_set_sizes MY(set_sizes)
     
    327330#endif
    328331
    329 static CONST struct aout_backend_data MY(backend_data) = {
     332static const struct aout_backend_data MY(backend_data) = {
    330333  MY_zmagic_contiguous,
    331334  MY_text_includes_header,
     
    373376   offsets in the output file.  */
    374377
    375 static boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
    376 
    377 static boolean
     378static bfd_boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
     379
     380static bfd_boolean
    378381MY_bfd_final_link (abfd, info)
    379382     bfd *abfd;
     
    508511#define MY_bfd_gc_sections bfd_generic_gc_sections
    509512#endif
     513#ifndef MY_bfd_merge_sections
     514#define MY_bfd_merge_sections bfd_generic_merge_sections
     515#endif
     516#ifndef MY_bfd_discard_group
     517#define MY_bfd_discard_group bfd_generic_discard_group
     518#endif
    510519#ifndef MY_bfd_reloc_type_lookup
    511520#define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
     
    523532#define MY_bfd_link_hash_table_create NAME(aout,link_hash_table_create)
    524533#endif
     534#ifndef MY_bfd_link_hash_table_free
     535#define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
     536#endif
    525537#ifndef MY_bfd_link_add_symbols
    526538#define MY_bfd_link_add_symbols NAME(aout,link_add_symbols)
     539#endif
     540#ifndef MY_bfd_link_just_syms
     541#define MY_bfd_link_just_syms _bfd_generic_link_just_syms
    527542#endif
    528543#ifndef MY_bfd_link_split_section
Note: See TracChangeset for help on using the changeset viewer.