X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=object.c;h=4614c38d66ed373eed028d7f0ed9a849f1282017;hp=82fc76aa550e59a596461c8c83ba25c1da91de8d;hb=66be644c3e5fbd7446d86c79e9e51b75c0442b49;hpb=0e4dead2b7d779a6b1612554afa62f3a198dcdfb diff --git a/object.c b/object.c index 82fc76a..4614c38 100644 --- a/object.c +++ b/object.c @@ -228,13 +228,16 @@ int WriteObject(int fd) } // Write requested object file... - switch (obj_format) - { - case BSD: + if ((obj_format == BSD) || ((obj_format == ALCYON) && (prg_flag == 0))) + { + // Force BSD format from here onwards + obj_format = BSD; + if (verb_flag) { printf("Total : %d bytes\n", sect[TEXT].sloc + sect[DATA].sloc + sect[BSS].sloc); } + ssize = ((LONG)sy_assign(NULL, NULL)); // Assign index numbers to the symbols tds = sect[TEXT].sloc + sect[DATA].sloc; // Get size of TEXT and DATA segment buf = malloc(0x600000); // Allocate 6mb object file image memory @@ -312,9 +315,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 +403,6 @@ int WriteObject(int fd) */ tds = markimg(buf, tds, sect[TEXT].sloc, 1); write(fd, buf, tds); - break; } return 0;