[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

size Command

Purpose

Displays the section sizes of the Extended Common Object File Format (XCOFF) object files.

Syntax

size -d -o -x ] [ -f ] [ -V ] [ -X  {32|64|32_64}] File File ... ]

Description

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.

Flags

The output is in decimal notation unless you change the output with the following flags:

-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:
32 Processes only 32-bit object files
64 Processes only 64-bit object files
32_64 Processes both 32-bit and 64-bit object files

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.

Examples

  1. To display the size of the a.out file in decimal, enter:
    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
  2. To display the size of an object file in octal, enter:
    size -o driver.o
    This displays the size of the driver.o object file in octal.
  3. To display the size of several object files in hexadecimal, enter:
    size -x *.o
    This displays in hexadecimal the size of each file ending with .o in the current directory.

Related Information

The ar command, as command, dump command, ld command, nm command, strip command.


[ Previous | Next | Contents | Glossary | Home | Search ]