size(1) DG/UX 4.30 size(1)
NAME
size - print section sizes of common object files
SYNOPSIS
size [-a] [-n] [-f] [-o] [-x] [-V] file ...
DESCRIPTION
The size command produces section size information in bytes
(decimal) for each loaded section in the specified common
object files. The sizes of the text, data, and bss
(uninitialized data) sections are printed as well as the sum
of the sizes of these sections.
For an archive file, size displays this information for each
member of the archive.
Numbers are printed in decimal by default.
Options are:
-a Print a variety of information about components of the
file, including sizes of the file header, optional
header, section headers, debug symbols, compiler-
generated symbols, local symbols, global symbols,
string table, and padding.
-n Include sections not loaded when calculating the sizes.
-f Produce full output; print the size of every loaded
section, followed by the section name in parentheses.
-o Print numbers in octal.
-x Print numbers in hexadecimal.
-V Print, on standard error, the version information about
the size command being executed.
EXAMPLES
$ size filename
1347 + 10240 + 0 = 11587
This command shows the size (in decimal) required by the
text, data, and bss sections.
$ size -f object.o
252 .data + 1076 (.text) = 1328
This command shows the name and size (in decimal) of each
Licensed material--property of copyright holder(s) Page 1
size(1) DG/UX 4.30 size(1)
section in an object file.
$ size -a /dgux
/dgux:
Contributor Bytes Count
File header...........................20*
Optional (a.out) Header...............28*
Section headers......................132*.............3
.text...........................804752
.data...........................204464
(.bss.............................4048)
Total sections...................1009216*.............2
Relocation entries.....................0*.............0
Line number entries....................0*.............0
Symbol table......................188920*..........9446
undefined globals....................0..............0
defined globals..................80300...........4015
locals.............................460.............23
statics..........................36560...........1828
debug symbols....................23200...........1160
compiler generated...............22080...........1104
special..........................71600...........3580
String table.......................90576*
Extraneous.............................4*
File size........................1288896
This command shows all the components of an object that
contribute to its size.
SEE ALSO
as(1), cc(1), ld(1), a.out(4), ar(4).
CAVEAT
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.
DIAGNOSTICS
size: name: cannot open
if name cannot be read.
size: name: bad magic
if name is not an appropriate common object file.
Licensed material--property of copyright holder(s) Page 2