SIZE(1) | MidnightBSD General Commands Manual | SIZE(1) |
size
— display
section sizes and total size of ELF objects
size |
[--format= format]
[--help ]
[--radix= radix]
[--totals ] [--version ]
[-ABVdhotx ] [file ...] |
The size
utility lists the sizes of ELF
sections, and optionally the total size, for each input
file specified on the command line. The
size
utility can operate on ELF objects, on
ar(1) archives containing ELF
objects, and on core dumps. If no file name is specified on the
command-line, a.out is assumed.
The size
utility recognized the following
options:
--format=
format--help
--radix=
radix--totals
--version
-A
--format=
sysv.-B
--format=
berkeley.-V
--version
.-d
--radix=
10.-h
--help
.-o
--radix=
8.-t
--totals
.-x
--radix=
16.If ‘berkeley’ style output is in effect, an initial header line naming fields will be output, followed by one line of output for each ELF object specified on the command line or found in an archive.
Each line will contain the following whitespace separated fields in order:
If option --totals
was specified, an
additional line in the same format as above will be output at the end
containing the sum of the respective fields. The file name field for the
line will contain the string ‘(TOTALS)’.
If System V style output is selected, size
will output the following information for each object:
The size
utility exits 0 on
success, and >0 if an error occurs.
To display the section sizes for /bin/ls use:
$ size /bin/ls text data bss dec hex filename 20975 540 392 21907 5593 /bin/ls
To display sizes and total for /bin/ls and /bin/dd in hexadecimal, use:
$ size -tx /bin/ls /bin/dd text data bss dec hex filename 0x51ef 0x21c 0x188 21907 5593 /bin/ls 0x3df5 0x170 0x200 16741 4165 /bin/dd 0x8fe4 0x38c 0x388 38648 96f8 (TOTALS)
To display section sizes for /bin/ls in System V format use:
$ size -A /bin/ls /bin/ls : section size addr .interp 21 4194704 .note.ABI-tag 24 4194728 .hash 624 4194752 .dynsym 2088 4195376 .dynstr 810 4197464 .rela.dyn 120 4198280 .rela.plt 1656 4198400 .init 19 4200056 .plt 1120 4200076 .text 15224 4201200 .fini 14 4216424 .rodata 1472 4216448 .data 80 5267456 .eh_frame 1624 5267536 .dynamic 384 5269160 .ctors 16 5269544 .dtors 16 5269560 .jcr 8 5269576 .got 576 5269584 .bss 528 5270176 .comment 686 0 Total 27110
ar(1), nm(1), objdump(1), readelf(1), strings(1), elf(3), gelf(3)
AT&T Unix Systems Labs, System V Application Binary Interface, http://www.sco.com/developers/gabi/.
The size
utility first appeared in
Version 6 AT&T UNIX.
The size
utility was re-written by
S. Sam Arun Raj
<samarunraj@gmail.com>
This manual page was written by S. Sam Arun Raj
<samarunraj@gmail.com>
August 25, 2011 | midnightbsd-3.1 |