Displays the section sizes of the Extended Common Object File Format (XCOFF) object files.
The size command writes to standard output the number of bytes required by all sections, along with their sum for each XCOFF file. If the -f flag is specified, the section name follows the section size.
The output is in decimal notation unless you change the output with the following flags:
Item | Description |
---|---|
-d | Writes in decimal notation. |
-f | Writes the section name in parenthesis following the section size. |
-o | Writes in octal notation. |
-x | Writes in hexadecimal notation. |
-X mode | Specifies the type of object file size should examine.
The mode must be one of the following:
The default is to process 32-bit object files (ignore 64-bit objects). The mode can also be set with the OBJECT_MODE environment variable. For example, OBJECT_MODE=64 causes size to process any 64-bit objects and ignore 32-bit objects. The -X flag overrides the OBJECT_MODE variable. |
-V | Prints the version number of the size command. |
size
This
displays the size in bytes of the executable a.out file. The
size of each section of the object file is given, followed by the
total: 3720 + 1752 + 4152 = 9624
size -o driver.o
This
displays the size of the driver.o object file in octal.size -x *.o
This
displays in hexadecimal the size of each file ending with .o in
the current directory.