summaryrefslogtreecommitdiff
path: root/as/as.c
diff options
context:
space:
mode:
Diffstat (limited to 'as/as.c')
-rw-r--r--as/as.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/as/as.c b/as/as.c
index d592b0b..c5fee7e 100644
--- a/as/as.c
+++ b/as/as.c
@@ -28,6 +28,7 @@ PRIVATE struct sym_s *hid_spt[SPTSIZ]; /* hash table */
PRIVATE char * binfilename = 0;
PRIVATE char * objfilename = 0;
+PRIVATE int keep_bad_output = 0;
FORWARD void initp1 P((void));
FORWARD int my_creat P((char *name, char *message));
@@ -85,7 +86,7 @@ PUBLIC void finishup()
/* If an output binary is in error remove it */
close(binfil); binfil=0;
close(objfil); objfil=0;
- if (toterr != 0)
+ if (toterr != 0 && !keep_bad_output)
{
if(binfilename) unlink(binfilename);
if(objfilename) unlink(objfilename);
@@ -280,6 +281,9 @@ char **argv;
if( flag_state ) as_warn.semaphore = -1;
else as_warn.semaphore = 0;
break;
+ case 'k':
+ keep_bad_output = 1;
+ break;
default:
usage(); /* bad option */
}