Changeset 609 for branches/GNU/src/binutils/bfd/coff-ia64.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/bfd/coff-ia64.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* 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. 3 3 Contributed by David Mosberger <davidm@hpl.hp.com> 4 4 … … 50 50 51 51 #ifdef COFF_WITH_PE 52 /* Return trueif this relocation should52 /* Return TRUE if this relocation should 53 53 appear in the output .reloc section. */ 54 54 55 static boolean 55 static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *)); 56 57 static bfd_boolean 56 58 in_reloc_p(abfd, howto) 57 59 bfd * abfd ATTRIBUTE_UNUSED; 58 60 reloc_howto_type *howto ATTRIBUTE_UNUSED; 59 61 { 60 return 0; /* We don't do relocs for now... */62 return FALSE; /* We don't do relocs for now... */ 61 63 } 62 64 #endif 63 65 64 66 #include "coffcode.h" 67 68 static const bfd_target *ia64coff_object_p PARAMS ((bfd *)); 65 69 66 70 static const bfd_target * … … 74 78 file_ptr offset; 75 79 76 if (bfd_seek (abfd, 0x00, SEEK_SET) != 077 || 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))) 79 83 { 80 84 if (bfd_get_error () != bfd_error_system_call) … … 93 97 the e_magic number here, and, if it doesn't match, clobber the 94 98 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) 96 100 { 97 101 bfd_set_error (bfd_error_wrong_format); … … 99 103 } 100 104 101 offset = bfd_h_get_32 (abfd, (bfd_byte *)dos_hdr.e_lfanew);102 if (bfd_seek (abfd, (file_ptr)offset, SEEK_SET) != 0103 || 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))) 105 109 { 106 110 if (bfd_get_error () != bfd_error_system_call) … … 109 113 } 110 114 111 if ( bfd_h_get_32 (abfd, (bfd_byte *)image_hdr.nt_signature)115 if (H_GET_32 (abfd, image_hdr.nt_signature) 112 116 != 0x4550) 113 117 { … … 119 123 pick up the COFF header for PE, see "struct external_PEI_filehdr" 120 124 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) 125 126 { 126 127 if (bfd_get_error () != bfd_error_system_call) -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.