]> Shamusworld >> Repos - rmac/commitdiff
TEXT/DATA/BSS sizes printed at the end of assembly only when -v is invoked.
authorggn <ggn.dbug@gmail.com>
Mon, 16 Nov 2015 11:54:03 +0000 (13:54 +0200)
committerShamus Hammons <jlhamm@acm.org>
Tue, 17 Nov 2015 13:38:20 +0000 (07:38 -0600)
object.c

index baed1bdb3c0a519edade750d094742d3f1a2b54d..cef73eea72babb0f8cf001c82008527addbea5f0 100644 (file)
--- a/object.c
+++ b/object.c
@@ -220,6 +220,13 @@ int WriteObject(int fd)
        LONG trsize, drsize;    // Size of relocations
        long unused;                    // For supressing 'write' warnings
 
+       if (verb_flag)
+       {
+               printf("TEXT segment: %d bytes\n", sect[TEXT].sloc);
+               printf("DATA segment: %d bytes\n", sect[DATA].sloc);
+               printf("BSS  segment: %d bytes\n", sect[BSS].sloc);
+       }
+
        // Write requested object file...
        switch (obj_format)
        {