Changeset 113 for trunk/src/binutils
- Timestamp:
- May 9, 2003, 11:15:46 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/binutils/binutils/objcopy.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r112 r113 550 550 char * buffer; 551 551 unsigned int line_count; 552 552 553 553 if (stat (filename, & st) < 0) 554 554 fatal (_("cannot stat: %s: %s"), filename, strerror (errno)); … … 569 569 570 570 line_count = 1; 571 571 572 572 for (line = buffer; * line != '\0'; line ++) 573 573 { … … 588 588 finished = true; 589 589 break; 590 590 591 591 case '\r': 592 592 * eol = '\0'; … … 596 596 finished = true; 597 597 break; 598 598 599 599 case 0: 600 600 finished = true; 601 601 break; 602 602 603 603 case '#': 604 604 /* Line comment, Terminate the line here, in case a … … 607 607 * eol = '\0'; 608 608 break; 609 609 610 610 default: 611 611 break; … … 638 638 line_count, filename); 639 639 } 640 640 641 641 * name_end = '\0'; 642 642 … … 1346 1346 bfd *ibfd; 1347 1347 char **matching; 1348 #ifdef __EMX__ 1349 /* Check if they're both zero so we know when to use emxbind or not. */ 1350 int bothtargetsnull = (input_target == NULL && output_target == NULL); 1351 #endif 1352 1348 1353 1349 1354 /* To allow us to do "strip *" without dying on the first … … 1389 1394 if (!bfd_close (ibfd)) 1390 1395 RETURN_NONFATAL (input_filename); 1396 1397 #ifdef __EMX__ 1398 /* 1399 * On OS/2 executables are normally pushed thru emxbind. 1400 * So, if input and target format was both NULL and this was 1401 * an emxbind'ed executable, then redo the emxbinding. We're 1402 * a bit careful not to break anything therefore the NULL target 1403 * precautions. 1404 * 1405 * THIS IS A HACK! It's motivation is to skip some trouble 1406 * during GCC building. 1407 * 1408 * We really don't get everything right now, just get the 1409 * "strip xgcc.exe" working good enough. 1410 */ 1411 if (bothtargetsnull && status == 0 && !getenv("NO_STRIP_EMXBIND")) 1412 { 1413 FILE *child; 1414 char szCmd[1024]; 1415 char *psz; 1416 sprintf (szCmd, "emxbind.exe -i \"%s\" 2> nul", input_filename); 1417 for (psz = szCmd; *psz; psz++) 1418 if (*psz == '\\') *psz = '/'; 1419 if ((child = popen (szCmd, "r")) != NULL) 1420 { 1421 if (!pclose (child)) 1422 { 1423 char *tmpname; 1424 char tmpnameexe[260]; 1425 1426 tmpname = make_tempname (output_filename); 1427 if (!tmpname) 1428 RETURN_NONFATAL (input_filename); 1429 strcat(strcpy(tmpnameexe, tmpname), ".exe"); 1430 free(tmpname); 1431 1432 sprintf(szCmd, "emxbind.exe -bq -o \"%s\" \"%s\"", tmpnameexe, output_filename); 1433 for (psz = szCmd; *psz; psz++) 1434 if (*psz == '\\') *psz = '/'; 1435 if (!system (szCmd)) 1436 smart_rename (tmpnameexe, output_filename, preserve_dates); 1437 unlink (tmpnameexe); 1438 } 1439 } 1440 } 1441 #endif 1391 1442 } 1392 1443 else -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.