[PATCH] D67555: [docs][llvm-size] Write llvm-size documentation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 20:17:59 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/docs/CommandGuide/llvm-size.rst:14
 
 :program:`llvm-size` is a tool that prints size information for object files.
+It is intended to be a drop-in replacement for GNU's :program:`size`.
----------------
> for object files

Is there a concise term that refers to object files/executables/shared objects/archives collectively? I don't have particular suggestion here.

As a reference, FreeBSD size says:

> 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 ob- jects, and on core dumps. If no file name is specified on the command-line, a.out is assumed.

We support Mach-O and PE/COFF so "ELF objects" is not accurate...


================
Comment at: llvm/docs/CommandGuide/llvm-size.rst:163
+
+ Applies only to ``berkeley`` output format. Display the total size for all
+ listed object files, in addition to the individual file listings.
----------------
> the total size

The Berkeley format prints more than 1 field, so GNU size refers to them as "totals".

GNU size:

> Show totals of all objects listed

FreeBSD size:

> Shows cumulative totals of section sizes from all objects.


================
Comment at: llvm/docs/CommandGuide/llvm-size.rst:178
+
+ Display the version of the :program:`llvm-size` executable.
+
----------------
Or simply `Display the version of this program.` as used by other utilities.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67555/new/

https://reviews.llvm.org/D67555





More information about the llvm-commits mailing list