size

NAME

size - list section sizes and total size

SYNOPSIS

size [-A|-B] [-d|-o|-x] [-V] objfile ...

DESCRIPTION

The size(1) utility lists the section sizes and the total size for each specified objfile. By default, one line of output is generated for each object file or each module in an archive.

The size(1) utility accepts the following options:

-A
Display output in System V format.
-B
Display output in Berkeley Software Distribution (BSD) format (the default).
-d
Display numbers in decimal format. The total size is given in both decimal and hexadecimal.
-o
Display numbers in octal format. The total size is given in both octal and hexadecimal.
-V
Display version number information on size(1) itself.
-x
Display numbers in hexadecimal format. The total size is given in both decimal and hexadecimal.

The calculation of text, data, and bss deserves discussion. In BSD-style systems, the text size is the sum of all of the text and read-only sections and .rdata), the data size is the sum of the non-readonly .data sections, and the bss size is the sum of all of the .bss sections that are left.

For the Interix size(1) utility, text size is the sum of all sections that are read-only or which contain code (the .rdata and .text sections). The data size is the sum of all non-bss read/write sections (the .data and .idata sections). The bss size is the remainder all uninitialized data.

DIAGNOSTICS

The size(1) utility exits with a status of 0 for success, and >0 for failure.

SEE ALSO

ar(1)