2 .\" Man page generated from reStructuredText.
4 .TH "LLVM-SIZE" "1" "2020-06-26" "10" "LLVM"
6 llvm-size \- print size information
8 .nr rst2man-indent-level 0
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
20 .\" .rstReportMargin pre:
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
36 \fBllvm\-size\fP [\fIoptions\fP] [\fIinput...\fP]
39 \fBllvm\-size\fP is a tool that prints size information for binary files.
40 It is intended to be a drop\-in replacement for GNU\(aqs \fBsize\fP\&.
42 The tool prints size information for each \fBinput\fP specified. If no input is
43 specified, the program prints size information for \fBa.out\fP\&. If "\fB\-\fP" is
44 specified as an input file, \fBllvm\-size\fP reads a file from the standard
45 input stream. If an input is an archive, size information will be displayed for
51 Equivalent to \fI\%\-\-format\fP with a value of \fBsysv\fP\&.
56 Architecture(s) from Mach\-O universal binaries to display information for.
61 Equivalent to \fI\%\-\-format\fP with a value of \fBberkeley\fP\&.
66 Include ELF common symbol sizes in bss size for \fBberkeley\fP output format, or
67 as a separate section entry for \fBsysv\fP output. If not specified, these
73 Equivalent to \fI\%\-\-radix\fP with a value of \fB10\fP\&.
78 Display verbose address and offset information for segments and sections in
79 Mach\-O files in \fBdarwin\fP format.
83 .B \-\-format=<format>
84 Set the output format to the \fB<format>\fP specified. Available \fB<format>\fP
85 options are \fBberkeley\fP (the default), \fBsysv\fP and \fBdarwin\fP\&.
87 Berkeley output summarises text, data and bss sizes in each file, as shown
88 below for a typical pair of ELF files:
94 $ llvm\-size \-\-format=berkeley test.o test2.o
95 text data bss dec hex filename
96 182 16 5 203 cb test.elf
103 For Mach\-O files, the output format is slightly different:
109 $ llvm\-size \-\-format=berkeley macho.obj macho2.obj
110 __TEXT __DATA __OBJC others dec hex
111 4 8 0 0 12 c macho.obj
112 16 32 0 0 48 30 macho2.obj
118 Sysv output displays size and address information for most sections, with each
119 file being listed separately:
125 $ llvm\-size \-\-format=sysv test.elf test2.o
150 \fBdarwin\fP format only affects Mach\-O input files. If an input of a different
151 file format is specified, \fBllvm\-size\fP falls back to \fBberkeley\fP
152 format. When producing \fBdarwin\fP format, the tool displays information about
153 segments and sections:
159 $ llvm\-size \-\-format=darwin macho.obj macho2.obj
162 Section (__TEXT, __text): 4
163 Section (__DATA, __data): 8
168 Section (__TEXT, __text): 16
169 Section (__DATA, __data): 32
180 Display a summary of command line options.
185 Display an uncategorized summary of command line options.
190 Equivalent to \fI\%\-\-format\fP with a value of \fBdarwin\fP\&.
195 Equivalent to \fI\%\-\-radix\fP with a value of \fB8\fP\&.
200 Display size information in the specified radix. Permitted values are \fB8\fP,
201 \fB10\fP (the default) and \fB16\fP for octal, decimal and hexadecimal output
210 $ llvm\-size \-\-radix=8 test.o
211 text data bss oct hex filename
212 0152 04 04 162 72 test.o
214 $ llvm\-size \-\-radix=10 test.o
215 text data bss dec hex filename
216 106 4 4 114 72 test.o
218 $ llvm\-size \-\-radix=16 test.o
219 text data bss dec hex filename
220 0x6a 0x4 0x4 114 72 test.o
229 Applies only to \fBberkeley\fP output format. Display the totals for all listed
230 fields, in addition to the individual file listings.
238 $ llvm\-size \-\-totals test.elf test2.o
239 text data bss dec hex filename
240 182 16 5 203 cb test.elf
242 264 24 6 294 126 (TOTALS)
251 Display the version of the \fBllvm\-size\fP executable.
256 Equivalent to \fI\%\-\-radix\fP with a value of \fB16\fP\&.
261 Read command\-line options from response file \fB<FILE>\fP\&.
265 \fBllvm\-size\fP exits with a non\-zero exit code if there is an error.
266 Otherwise, it exits with code 0.
269 To report bugs, please visit <\fI\%http://llvm.org/bugs/\fP>.
271 Maintained by the LLVM Team (https://llvm.org/).
273 2003-2020, LLVM Project
274 .\" Generated by docutils manpage writer.