Changeset 609 for branches/GNU/src/binutils/bfd/osf-core.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
-
branches/GNU/src/binutils/bfd/osf-core.c (modified) (12 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/bfd/osf-core.c
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r608 r609 1 1 /* BFD back-end for OSF/1 core files. 2 Copyright 1993, 1994, 1995, 1998, 1999 Free Software Foundation, Inc. 2 Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002 3 Free Software Foundation, Inc. 3 4 4 5 This file is part of BFD, the Binary File Descriptor library. … … 30 31 /* forward declarations */ 31 32 32 static asection * 33 make_bfd_asection PARAMS ((bfd *, CONST char *, flagword, bfd_size_type, 34 bfd_vma, file_ptr)); 35 static asymbol * 36 osf_core_make_empty_symbol PARAMS ((bfd *)); 37 static const bfd_target * 38 osf_core_core_file_p PARAMS ((bfd *)); 39 static char * 40 osf_core_core_file_failing_command PARAMS ((bfd *)); 41 static int 42 osf_core_core_file_failing_signal PARAMS ((bfd *)); 43 static boolean 44 osf_core_core_file_matches_executable_p PARAMS ((bfd *, bfd *)); 45 static void 46 swap_abort PARAMS ((void)); 33 static asection *make_bfd_asection 34 PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr)); 35 static const bfd_target *osf_core_core_file_p 36 PARAMS ((bfd *)); 37 static char *osf_core_core_file_failing_command 38 PARAMS ((bfd *)); 39 static int osf_core_core_file_failing_signal 40 PARAMS ((bfd *)); 41 static bfd_boolean osf_core_core_file_matches_executable_p 42 PARAMS ((bfd *, bfd *)); 43 static void swap_abort 44 PARAMS ((void)); 47 45 48 46 /* These are stored in the bfd's tdata */ 49 47 50 struct osf_core_struct 48 struct osf_core_struct 51 49 { 52 50 int sig; … … 61 59 make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos) 62 60 bfd *abfd; 63 CONSTchar *name;61 char *name; 64 62 flagword flags; 65 63 bfd_size_type _raw_size; … … 82 80 } 83 81 84 static asymbol *85 osf_core_make_empty_symbol (abfd)86 bfd *abfd;87 {88 asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));89 if (new)90 new->the_bfd = abfd;91 return new;92 }93 94 82 static const bfd_target * 95 83 osf_core_core_file_p (abfd) … … 100 88 char *secname; 101 89 struct core_filehdr core_header; 102 103 val = bfd_read ((PTR)&core_header, 1, sizeof core_header, abfd); 90 bfd_size_type amt; 91 92 amt = sizeof core_header; 93 val = bfd_bread ((PTR) &core_header, amt, abfd); 104 94 if (val != sizeof core_header) 105 95 return NULL; … … 109 99 110 100 core_hdr (abfd) = (struct osf_core_struct *) 111 bfd_zalloc (abfd, sizeof (struct osf_core_struct));101 bfd_zalloc (abfd, sizeof (struct osf_core_struct)); 112 102 if (!core_hdr (abfd)) 113 103 return NULL; … … 121 111 flagword flags; 122 112 123 val = bfd_read ((PTR)&core_scnhdr, 1, sizeof core_scnhdr, abfd); 113 amt = sizeof core_scnhdr; 114 val = bfd_bread ((PTR) &core_scnhdr, amt, abfd); 124 115 if (val != sizeof core_scnhdr) 125 116 break; … … 153 144 (bfd_vma) core_scnhdr.vaddr, 154 145 (file_ptr) core_scnhdr.scnptr)) 155 return NULL;146 ; 156 147 } 157 148 … … 159 150 160 151 return abfd->xvec; 152 153 154 155 156 157 161 158 } 162 159 … … 177 174 178 175 /* ARGSUSED */ 179 static b oolean176 static boolean 180 177 osf_core_core_file_matches_executable_p (core_bfd, exec_bfd) 181 bfd *core_bfd, *exec_bfd; 182 { 183 return true; /* FIXME, We have no way of telling at this point */ 184 } 185 186 187 #define osf_core_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound 188 #define osf_core_get_symtab _bfd_nosymbols_get_symtab 189 #define osf_core_print_symbol _bfd_nosymbols_print_symbol 190 #define osf_core_get_symbol_info _bfd_nosymbols_get_symbol_info 191 #define osf_core_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name 192 #define osf_core_get_lineno _bfd_nosymbols_get_lineno 193 #define osf_core_find_nearest_line _bfd_nosymbols_find_nearest_line 194 #define osf_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol 195 #define osf_core_read_minisymbols _bfd_nosymbols_read_minisymbols 196 #define osf_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol 178 bfd *core_bfd ATTRIBUTE_UNUSED; 179 bfd *exec_bfd ATTRIBUTE_UNUSED; 180 { 181 return TRUE; /* FIXME, We have no way of telling at this point */ 182 } 183 197 184 198 185 /* If somebody calls any byte-swapping routines, shoot them. */ … … 211 198 "osf-core", 212 199 bfd_target_unknown_flavour, 213 BFD_ENDIAN_ BIG, /* target byte order */214 BFD_ENDIAN_ BIG, /* target headers byte order */200 BFD_ENDIAN_, /* target byte order */ 201 BFD_ENDIAN_, /* target headers byte order */ 215 202 (HAS_RELOC | EXEC_P | /* object flags */ 216 203 HAS_LINENO | HAS_DEBUG | … … 241 228 bfd_false, bfd_false 242 229 }, 243 244 BFD_JUMP_TABLE_GENERIC (_bfd_generic),245 BFD_JUMP_TABLE_COPY (_bfd_generic),246 BFD_JUMP_TABLE_CORE (osf_core),247 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),248 BFD_JUMP_TABLE_SYMBOLS (osf_core),249 BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),250 BFD_JUMP_TABLE_WRITE (_bfd_generic),251 BFD_JUMP_TABLE_LINK (_bfd_nolink),252 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),230 231 BFD_JUMP_TABLE_GENERIC (_bfd_generic), 232 BFD_JUMP_TABLE_COPY (_bfd_generic), 233 BFD_JUMP_TABLE_CORE (osf_core), 234 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), 235 ), 236 BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), 237 BFD_JUMP_TABLE_WRITE (_bfd_generic), 238 BFD_JUMP_TABLE_LINK (_bfd_nolink), 239 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), 253 240 254 241 NULL, 255 242 256 243 (PTR) 0 /* backend_data */ 257 244 }; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
