Changeset 625
- Timestamp:
- Aug 17, 2003, 3:45:55 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/binutils/ld/emultempl/i386aoutemx.em
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r624 r625 36 36 #include "ld.h" 37 37 #include "ldmain.h" 38 #include "ldfile.h" 38 39 #include "ldemul.h" 39 #include "ldfile.h"40 40 #include "ldmisc.h" 41 41 #include "ldexp.h" … … 44 44 #include "ldgram.h" 45 45 46 #ifdef ANSI_PROTOTYPES 47 #include <stdarg.h> 48 #else 49 #include <varargs.h> 50 #endif 51 46 52 static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); 47 53 static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile)); 54 static int gld${EMULATION_NAME}_parse_args PARAMS ((int argc, char **argv)); 55 static bfd_boolean gld${EMULATION_NAME}_unrecognized_file PARAMS ((lang_input_statement_type *entry)); 56 57 58 static int parse PARAMS ((char *arg, char *format, char *error)); 59 48 60 49 61 static void 50 gld${EMULATION_NAME}_before_parse( )62 gld${EMULATION_NAME}_before_parse(void) 51 63 { 52 64 ldfile_set_output_arch ("`echo ${ARCH}`"); … … 71 83 # *isfile = 0; 72 84 # 73 # if (link_info.relocateable == true && config.build_constructors == true)85 # if (link_info.relocateable == TRUE && config.build_constructors == TRUE) 74 86 # return 75 87 #EOF 76 88 #sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c 77 #echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c89 #echo ' ; else if (link_info.relocateable == TRUE) return' >> e${EMULATION_NAME}.c 78 90 #sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c 79 91 #echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c … … 105 117 *isfile = 1; 106 118 107 if (link_info.relocateable == true && config.build_constructors == true)119 if (link_info.relocateable == TRUE && config.build_constructors == TRUE) 108 120 return "ldscripts/${EMULATION_NAME}.xu"; 109 else if (link_info.relocateable == true)121 else if (link_info.relocateable == TRUE) 110 122 return "ldscripts/${EMULATION_NAME}.xr"; 111 123 else if (!config.text_read_only) … … 125 137 126 138 /* Report a fatal error. 127 STRING is a printf format string and ARG is one arg for it. */ 128 129 void 130 fatal (string, arg1, arg2) 131 char *string, *arg1, *arg2; 132 { 139 FMT is a printf format string and ARG is one arg for it. */ 140 141 static void fatal VPARAMS ((char *fmt, ...)) 142 { 143 VA_OPEN (arg, fmt); 144 VA_FIXEDARG (arg, char *, fmt); 145 133 146 fprintf (stderr, "%s: ", program_name); 134 fprintf (stderr, string, arg1, arg2); 147 vfprintf (stderr, fmt, arg); 148 VA_CLOSE (arg); 135 149 fprintf (stderr, "\n"); 136 150 xexit (1); … … 141 155 generating the error message using format string ERROR and ARG as arg. */ 142 156 143 int157 static int 144 158 parse (arg, format, error) 145 char *arg, *format; 146 int error; 159 char *arg, *format, *error; 147 160 { 148 161 int x; … … 204 217 } rsxnt_linked = EMX_DEFAULT; 205 218 206 int gld_${EMULATION_NAME}_parse_args (argc, argv)219 static int gld${EMULATION_NAME}_parse_args (argc, argv) 207 220 int argc; 208 221 char **argv; … … 256 269 * output_filename is not effective). 257 270 */ 258 void gld${EMULATION_NAME}_set_symbols ()271 static void gld${EMULATION_NAME}_set_symbols (void) 259 272 { 260 273 char *ext, *tmp_dir, *tmp; … … 275 288 276 289 /* Always generate relocatable output since ld is just the first stage ... */ 277 link_info.relocateable = true;290 link_info.relocateable = TRUE; 278 291 279 292 if (exe_flag) … … 296 309 if (stricmp (ext, ".dll") == 0) 297 310 { 298 link_info.relocateable = true;311 link_info.relocateable = TRUE; 299 312 dll_flag = 1; 300 313 } … … 327 340 } 328 341 329 boolean gld_${EMULATION_NAME}_unrecognized_file (entry)342 static bfd_boolean gld${EMULATION_NAME}_unrecognized_file (entry) 330 343 lang_input_statement_type *entry; 331 344 { … … 338 351 { 339 352 def_filename = entry->filename; 340 entry->loaded = true;341 return true;353 entry->loaded = TRUE; 354 return TRUE; 342 355 } 343 356 else if (stricmp (ext, ".res") == 0) 344 357 { 345 358 res_filename = entry->filename; 346 entry->loaded = true;347 return true;348 } 349 } 350 351 return false;352 } 353 354 extern u_int DosCopy (char *pszSource, char *pszTarget, u_int ulOption);359 entry->loaded = TRUE; 360 return TRUE; 361 } 362 } 363 364 return FALSE; 365 } 366 367 extern u_int _System DosCopy (char *pszSource, char *pszTarget, u_int ulOption); 355 368 356 369 /* Perform final action(s) on output file */ 357 void gld_${EMULATION_NAME}_finish_link (char *filename)370 static void gld${EMULATION_NAME}_finish_link (char *filename) 358 371 { 359 372 struct stat statbuf; … … 497 510 498 511 /* Create any output sections needed by the target. */ 499 void gld${EMULATION_NAME}_create_output_section_statements (void)512 static void gld${EMULATION_NAME}_create_output_section_statements (void) 500 513 { 501 514 /* Since we enabled relocations LD marked output file as non-pageable */ 502 /* However, this is not truefor emx: always generate paged output */515 /* However, this is not TRUE for emx: always generate paged output */ 503 516 output_bfd->flags |= D_PAGED; 504 517 } … … 523 536 NULL, /* place orphan */ 524 537 gld${EMULATION_NAME}_set_symbols, /* set symbols */ 525 gld_${EMULATION_NAME}_parse_args, 526 gld_${EMULATION_NAME}_unrecognized_file, 538 gld${EMULATION_NAME}_parse_args, 539 NULL, /* add_options */ 540 NULL, /* handle_option */ 541 gld${EMULATION_NAME}_unrecognized_file, 527 542 NULL, /* list_options */ 528 543 NULL, /* recognized_file */ 529 544 NULL, /* find_potential_libraries */ 530 NULL /* new_vers_pattern. */531 gld _${EMULATION_NAME}_finish_link545 NULL, /* new_vers_pattern. */ 546 gld${EMULATION_NAME}_finish_link 532 547 }; 533 548 EOF -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.