When selecting ST .o output (-fa), don't write a .prg but an object file instead.
authorggn <ggn.dbug@gmail.com>
Wed, 27 Apr 2016 19:58:42 +0000 (22:58 +0300)
committerShamus Hammons <jlhamm@acm.org>
Sun, 8 May 2016 13:56:30 +0000 (08:56 -0500)
object.c

index 82fc76aa550e59a596461c8c83ba25c1da91de8d..590f2631fe6fabb71b1fd132b834fa2f91e588aa 100644 (file)
--- a/object.c
+++ b/object.c
@@ -228,9 +228,8 @@ int WriteObject(int fd)
        }
 
        // Write requested object file...
-       switch (obj_format)
-       {
-       case BSD:
+       if (obj_format==BSD || (obj_format==ALCYON && prg_flag==0))
+    {
                if (verb_flag)
                {
                        printf("Total       : %d bytes\n", sect[TEXT].sloc + sect[DATA].sloc + sect[BSS].sloc);
@@ -312,9 +311,9 @@ int WriteObject(int fd)
                if (buf)
                        free(buf);                                      // Free allocated memory
 
-               break;
-
-       case ALCYON:
+    }
+    else if (obj_format==ALCYON)
+    {
                if (verb_flag)
                {
                        if (prg_flag)
@@ -400,7 +399,6 @@ int WriteObject(int fd)
                 */
                tds = markimg(buf, tds, sect[TEXT].sloc, 1);
                write(fd, buf, tds);
-               break;
        }
 
        return 0;