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/coff-ia64.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* BFD back-end for HP/Intel IA-64 COFF files.
    2    Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
     2   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    33   Contributed by David Mosberger <davidm@hpl.hp.com>
    44
     
    5050
    5151#ifdef COFF_WITH_PE
    52 /* Return true if this relocation should
     52/* Return TRUE if this relocation should
    5353   appear in the output .reloc section.  */
    5454
    55 static boolean
     55static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
     56
     57static bfd_boolean
    5658in_reloc_p(abfd, howto)
    5759     bfd * abfd ATTRIBUTE_UNUSED;
    5860     reloc_howto_type *howto ATTRIBUTE_UNUSED;
    5961{
    60   return 0;                     /* We don't do relocs for now...  */
     62  return FALSE;                 /* We don't do relocs for now...  */
    6163}
    6264#endif
    6365
    6466#include "coffcode.h"
     67
     68static const bfd_target *ia64coff_object_p PARAMS ((bfd *));
    6569
    6670static const bfd_target *
     
    7478    file_ptr offset;
    7579
    76     if (bfd_seek (abfd, 0x00, SEEK_SET) != 0
    77         || bfd_read (&dos_hdr, 1, sizeof (dos_hdr), abfd)
    78            != sizeof (dos_hdr))
     80    if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
     81        || (bfd_bread (&dos_hdr, (bfd_size_type) sizeof (dos_hdr), abfd)
     82            != sizeof (dos_hdr)))
    7983      {
    8084        if (bfd_get_error () != bfd_error_system_call)
     
    9397       the e_magic number here, and, if it doesn't match, clobber the
    9498       f_magic number so that we don't get a false match.  */
    95     if (bfd_h_get_16 (abfd, (bfd_byte *) dos_hdr.e_magic) != DOSMAGIC)
     99    if (H_GET_16 (abfd, dos_hdr.e_magic) != DOSMAGIC)
    96100      {
    97101        bfd_set_error (bfd_error_wrong_format);
     
    99103      }
    100104
    101     offset = bfd_h_get_32 (abfd, (bfd_byte *) dos_hdr.e_lfanew);
    102     if (bfd_seek (abfd, (file_ptr) offset, SEEK_SET) != 0
    103         || bfd_read (&image_hdr, 1, sizeof (image_hdr), abfd)
    104            != sizeof (image_hdr))
     105    offset = H_GET_32 (abfd, dos_hdr.e_lfanew);
     106    if (bfd_seek (abfd, offset, SEEK_SET) != 0
     107        || (bfd_bread (&image_hdr, (bfd_size_type) sizeof (image_hdr), abfd)
     108            != sizeof (image_hdr)))
    105109      {
    106110        if (bfd_get_error () != bfd_error_system_call)
     
    109113      }
    110114
    111     if (bfd_h_get_32 (abfd, (bfd_byte *) image_hdr.nt_signature)
     115    if (H_GET_32 (abfd, image_hdr.nt_signature)
    112116        != 0x4550)
    113117      {
     
    119123       pick up the COFF header for PE, see "struct external_PEI_filehdr"
    120124       in include/coff/pe.h.  We adjust so that that will work. */
    121     if (bfd_seek (abfd,
    122                   (file_ptr) (offset - sizeof (dos_hdr)),
    123                   SEEK_SET)
    124         != 0)
     125    if (bfd_seek (abfd, offset - sizeof (dos_hdr), SEEK_SET) != 0)
    125126      {
    126127        if (bfd_get_error () != bfd_error_system_call)
Note: See TracChangeset for help on using the changeset viewer.