Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

ld(1)

a.out(4)

ar(4)

size(1)                                                             size(1)

NAME
     size - print size of an object file

SYNOPSIS
     size [-F -f -n -o -V -x] file...

DESCRIPTION
     size outputs the size of an object file, i.e. an object module or an
     executable program, in bytes.

     The number of bytes occupied by the text, data and bss segments is
     output on the standard output.

     size processes ELF and COFF object files entered on the command line.
     If an archive file is input to the size command, the information for
     each object file in the archive is displayed.

     When calculating segment information, the size command prints out the
     file size for the writable and non-writable segments and the memory
     size of the writable segments minus their file size.

     If it cannot calculate segment information, size recalculates the sec-
     tion information. When calculating section information, it prints out
     the size of sections that are allocatable, non-writable, and not
     NOBITS, the size of the sections that are allocatable, writable, and
     not NOBITS, and the size of the writable sections of type NOBITS.
     (NOBITS sections do not actually take up space in the file.)

     If size cannot recalculate either segment or section information, it
     prints an error message and stops processing the file.

OPTIONS
     -F   Prints out the size and permission flags of each loadable segment
          and the sum of the loadable segment sizes. If there is no segment
          data, size prints an error message and stops processing the file.

     -f   Prints out the size of each allocatable section, the name of the
          section, and the total of the section sizes. If there is no sec-
          tion data, size prints out an error message and stops processing
          the file.

     -n   Prints out non-loadable segment or non-allocatable section sizes.
          If segment data exists, size prints out the memory size of each
          loadable segment or file size of each non-loadable segment, the
          permission flags, and the total size of the segments. If there is
          no segment data, size prints out, for each allocatable and non-
          allocatable section, the memory size, the section name, and the
          total size of the sections. If there is no segment or section
          data, size prints an error message and stops processing.

     -o   Prints numbers in octal, not decimal.




Page 1                       Reliant UNIX 5.44                Printed 11/98

size(1)                                                             size(1)

     -V   Prints the version information for the size command on the stan-
          dard error output.

     -x   Prints numbers in hexadecimal; not decimal.

EXAMPLES
     The examples below are typical size output.

          size file           2724 + 88 + 0 = 2812
          size -f file        26(.txt) + 5(.init) + 5(.fini)  = 36
          size -F file        2724(r-x) + 88(rwx) = 2812

NOTES
     Since the size of bss sections is not known until link-edit time, the
     size command will not give the true total size of pre-linked objects.

LOCALE
     The language of the message texts is governed by the environment vari-
     able LCALL, LCMESSAGES or LANG.

     When the default is set, the system behaves as if it were not interna-
     tionalized, i.e. the message texts are in English. You must change one
     of these variables in order to change the language of the message
     texts.

     Detailed information on the dependencies of the environment variables
     and on internationalization in general can be found in the manual
     "Reliant UNIX Programmer's Guide: Internationalization - Localiza-
     tion". Refer also to environ(5) for information on setting the user
     environment.

SEE ALSO
     cc(1), ld(1), a.out(4), ar(4).





















Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026