scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

scc-size.1 (2477B)


      1 .TH SIZE 1 scc\-VERSION
      2 .SH NAME
      3 scc-size \- list section sizes of object files
      4 .SH SYNOPSIS
      5 .B scc-size
      6 .RB [ \-t ]
      7 .RI [ file ...]
      8 .SH DESCRIPTION
      9 .B scc-size
     10 lists the sizes of the text, data, and BSS sections of each object
     11 .I file
     12 specified, along with the total size in decimal and hexadecimal.
     13 If no
     14 .I file
     15 arguments are given,
     16 .B scc-size
     17 reads from
     18 .B a.out
     19 by default.
     20 .PP
     21 For each
     22 .IR file ,
     23 .B scc-size
     24 writes a line to standard output containing the following tab-separated fields:
     25 .PP
     26 .RS
     27 .I text data bss dec hex filename
     28 .RE
     29 .PP
     30 where
     31 .I text
     32 is the combined size of the text (code) and read-only data sections,
     33 .I data
     34 is the size of the initialised data sections,
     35 .I bss
     36 is the size of the uninitialised data sections,
     37 .I dec
     38 is the total size in decimal,
     39 .I hex
     40 is the total size in hexadecimal,
     41 and
     42 .I filename
     43 is the name of the file.
     44 .PP
     45 A header line is always printed before the first entry:
     46 .PP
     47 .RS
     48 .EX
     49 text	data	bss	dec	hex	filename
     50 .EE
     51 .RE
     52 .PP
     53 When processing an archive library,
     54 .B scc-size
     55 reports sizes for each object file member contained within the archive.
     56 Members that are not recognised object files are silently skipped.
     57 .PP
     58 Sections are classified as follows:
     59 .PP
     60 .RS
     61 .PD 0
     62 .TP
     63 .B T R
     64 Text and read-only data sections contribute to the
     65 .I text
     66 total.
     67 .TP
     68 .B D
     69 Initialised data sections contribute to the
     70 .I data
     71 total.
     72 .TP
     73 .B B
     74 Uninitialised (BSS) data sections contribute to the
     75 .I bss
     76 total.
     77 .PD
     78 .RE
     79 .PP
     80 Sections of any other type are not counted.
     81 .SH OPTIONS
     82 .TP
     83 .B \-t
     84 Print a totals row after all file entries.
     85 The totals row accumulates the text, data, and BSS sizes across all
     86 processed files (including archive members) and is labelled
     87 .BR (TOTALS) .
     88 .SH OPERANDS
     89 .TP
     90 .I file
     91 A pathname of an object file or archive library whose section sizes are
     92 to be listed.
     93 If no operands are given,
     94 .B scc-size
     95 reads from
     96 .BR a.out .
     97 .SH EXIT STATUS
     98 .TP
     99 .B 0
    100 Successful completion.
    101 .TP
    102 .B >0
    103 An error occurred.
    104 .SH EXAMPLES
    105 Display the section sizes of an object file:
    106 .IP
    107 .EX
    108 scc-size foo.o
    109 .EE
    110 .PP
    111 Display section sizes for all object files in an archive:
    112 .IP
    113 .EX
    114 scc-size libfoo.a
    115 .EE
    116 .PP
    117 Display section sizes for multiple files with a totals row:
    118 .IP
    119 .EX
    120 scc-size \-t foo.o bar.o baz.o
    121 .EE
    122 .SH STANDARDS
    123 The
    124 .B scc-size
    125 utility is designed to conform to IEEE Std 1003.1-2008 (POSIX.1).
    126 .SH LICENSE
    127 See the LICENSE file for the terms of redistribution.
    128 .SH SEE ALSO
    129 .BR scc-ar (1),
    130 .BR scc-nm (1),
    131 .BR scc-strip (1),
    132 .BR scc-objdump (1)