Changeset 609 for branches/GNU/src/binutils/bfd/sparclynx.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/bfd/sparclynx.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* BFD support for Sparc binaries under LynxOS. 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000 3 Free Software Foundation, Inc.2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 3 2001, 2002, 2003 Free Software Foundation, Inc. 4 4 5 5 This file is part of BFD, the Binary File Descriptor library. … … 20 20 21 21 #if 0 22 #define BYTES_IN_WORD 423 22 #define N_SHARED_LIB(x) 0 24 23 … … 30 29 #endif 31 30 32 #define MY(OP) CAT(sparclynx_aout_,OP) 31 /* Do not "beautify" the CONCAT* macro args. Traditional C will not 32 remove whitespace added here, and thus will fail to concatenate 33 the tokens. */ 34 #define MY(OP) CONCAT2 (sparclynx_aout_,OP) 33 35 #define TARGETNAME "a.out-sparc-lynx" 34 36 … … 43 45 #include "aout/stab_gnu.h" 44 46 #include "aout/ar.h" 47 48 void NAME (lynx,set_arch_mach) PARAMS ((bfd *, unsigned long)); 49 static void choose_reloc_size PARAMS ((bfd *)); 50 static bfd_boolean NAME (aout,sparclynx_write_object_contents) PARAMS ((bfd *)); 45 51 46 52 /* This is needed to reject a NewsOS file, e.g. in … … 53 59 || (mtype) == M_SPARC) 54 60 55 /* 56 The file @code{aoutf1.h} contains the code for BFD's 57 a.out back end. Control over the generated back end is given by these 58 two preprocessor names: 59 @table @code 60 @item ARCH_SIZE 61 This value should be either 32 or 64, depending upon the size of an 62 int in the target format. It changes the sizes of the structs which 63 perform the memory/disk mapping of structures. 64 65 The 64 bit backend may only be used if the host compiler supports 64 66 ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}. 67 With this name defined, @emph{all} bfd operations are performed with 64bit 68 arithmetic, not just those to a 64bit target. 69 70 @item TARGETNAME 71 The name put into the target vector. 72 @item 73 @end table 74 75 */ 76 77 /*SUPPRESS558*/ 78 /*SUPPRESS529*/ 61 /* The file @code{aoutf1.h} contains the code for BFD's 62 a.out back end. Control over the generated back end is given by these 63 two preprocessor names: 64 @table @code 65 @item ARCH_SIZE 66 This value should be either 32 or 64, depending upon the size of an 67 int in the target format. It changes the sizes of the structs which 68 perform the memory/disk mapping of structures. 69 70 The 64 bit backend may only be used if the host compiler supports 64 71 ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}. 72 With this name defined, @emph{all} bfd operations are performed with 64bit 73 arithmetic, not just those to a 64bit target. 74 75 @item TARGETNAME 76 The name put into the target vector. 77 @item 78 @end table */ 79 79 80 80 void 81 81 NAME(lynx,set_arch_mach) (abfd, machtype) 82 82 bfd *abfd; 83 intmachtype;83 unsigned long machtype; 84 84 { 85 85 /* Determine the architecture and machine type of the object file. */ 86 86 enum bfd_architecture arch; 87 long machine; 87 unsigned long machine; 88 88 89 switch (machtype) 89 90 { 90 91 91 case M_UNKNOWN: 92 92 /* Some Sun3s make magic numbers without cpu types in them, so … … 141 141 choose_reloc_size(ABFD); 142 142 143 /* Determine the size of a relocation entry, based on the architecture */ 143 /* Determine the size of a relocation entry, based on the architecture. */ 144 144 145 static void 145 146 choose_reloc_size (abfd) … … 162 163 file header, symbols, and relocation. */ 163 164 164 static b oolean165 static bfd_boolean 165 166 NAME(aout,sparclynx_write_object_contents) (abfd) 166 167 bfd *abfd; … … 203 204 WRITE_HEADERS (abfd, execp); 204 205 205 return true;206 return TRUE; 206 207 } 207 208 208 209 #define MY_set_sizes sparclynx_set_sizes 209 static boolean 210 static bfd_boolean sparclynx_set_sizes PARAMS ((bfd *)); 211 212 static bfd_boolean 210 213 sparclynx_set_sizes (abfd) 211 214 bfd *abfd; … … 214 217 { 215 218 default: 216 return false;219 return FALSE; 217 220 case bfd_arch_sparc: 218 221 adata (abfd).page_size = 0x2000; 219 222 adata (abfd).segment_size = 0x2000; 220 223 adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; 221 return true;224 return TRUE; 222 225 case bfd_arch_m68k: 223 226 adata (abfd).page_size = 0x2000; 224 227 adata (abfd).segment_size = 0x20000; 225 228 adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; 226 return true;227 } 228 } 229 230 static CONSTstruct aout_backend_data sparclynx_aout_backend =231 {232 0, 1, 0, 1, 0, sparclynx_set_sizes, 0,233 0, /* add_dynamic_symbols */234 0, /* add_one_symbol */235 0, /* link_dynamic_object */236 0, /* write_dynamic_symbol */237 0, /* check_dynamic_reloc */238 0 /* finish_dynamic_link */239 };229 return TRUE; 230 } 231 } 232 233 static const struct aout_backend_data sparclynx_aout_backend = 234 { 235 0, 1, 0, 1, 0, sparclynx_set_sizes, 0, 236 0, /* add_dynamic_symbols */ 237 0, /* add_one_symbol */ 238 0, /* link_dynamic_object */ 239 0, /* write_dynamic_symbol */ 240 0, /* check_dynamic_reloc */ 241 0 /* finish_dynamic_link */ 242 }; 240 243 241 244 … … 253 256 #ifdef LYNX_CORE 254 257 255 char * lynx_core_file_failing_command ();258 char * lynx_core_file_failing_command (); 256 259 int lynx_core_file_failing_signal (); 257 b oolean lynx_core_file_matches_executable_p ();258 const bfd_target * lynx_core_file_p ();260 bfd_boolean lynx_core_file_matches_executable_p (); 261 const bfd_target * lynx_core_file_p (); 259 262 260 263 #define MY_core_file_failing_command lynx_core_file_failing_command -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.