[docs][llvm-nm] Add missing options to documentation

There were several options missing from the documentation. This patch
adds them as well as improving some wording and separating the Mach-O
only options into a separate section.

Fixes https://bugs.llvm.org/show_bug.cgi?id=42234.

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D63655

llvm-svn: 364176
This commit is contained in:
James Henderson 2019-06-24 10:50:49 +00:00
parent 4c33942c6e
commit fc7e193281

View File

@ -122,23 +122,21 @@ OPTIONS
.. program:: llvm-nm .. program:: llvm-nm
.. option:: -B (default) .. option:: -B
Use BSD output format. Alias for `--format=bsd`. Use BSD output format. Alias for ``--format=bsd``.
.. option:: -P
Use POSIX.2 output format. Alias for `--format=posix`.
.. option:: --debug-syms, -a .. option:: --debug-syms, -a
Show all symbols, even debugger only. Show all symbols, even debugger only.
.. option:: --defined-only .. option:: --defined-only, -U
Print only symbols defined in this file (as opposed to Print only symbols defined in this file.
symbols which may be referenced by objects in this file, but not
defined in this file.) .. option:: --demangle, -C
Demangle symbol names.
.. option:: --dynamic, -D .. option:: --dynamic, -D
@ -146,14 +144,10 @@ OPTIONS
.. option:: --extern-only, -g .. option:: --extern-only, -g
Print only symbols whose definitions are external; that is, accessible Print only symbols whose definitions are external; that is, accessible from
from other files. other files.
.. option:: --no-weak, -W .. option:: --format=<format>, -f
Don't print any weak symbols in the output.
.. option:: --format=format, -f format
Select an output format; *format* may be *sysv*, *posix*, *darwin*, or *bsd*. Select an output format; *format* may be *sysv*, *posix*, *darwin*, or *bsd*.
The default is *bsd*. The default is *bsd*.
@ -162,14 +156,46 @@ OPTIONS
Print a summary of command-line options and their meanings. Print a summary of command-line options and their meanings.
.. option:: --help-list
Print an uncategorized summary of command-line options and their meanings.
.. option:: --just-symbol-name, -j
Print just the symbol names.
.. option:: -m
Use Darwin format. Alias for ``--format=darwin``.
.. option:: --no-demangle
Don't demangle symbol names. This is the default.
.. option:: --no-llvm-bc
Disable the LLVM bitcode reader.
.. option:: --no-sort, -p .. option:: --no-sort, -p
Shows symbols in order encountered. Shows symbols in order encountered.
.. option:: --no-weak, -W
Don't print weak symbols.
.. option:: --numeric-sort, -n, -v .. option:: --numeric-sort, -n, -v
Sort symbols by address. Sort symbols by address.
.. option:: --portability, -P
Use POSIX.2 output format. Alias for ``--format=posix``.
.. option:: --print-armap, -M
Print the archive symbol table, in addition to the symbols.
.. option:: --print-file-name, -A, -o .. option:: --print-file-name, -A, -o
Precede each symbol with the file it came from. Precede each symbol with the file it came from.
@ -178,23 +204,67 @@ OPTIONS
Show symbol size as well as address (not applicable for Mach-O). Show symbol size as well as address (not applicable for Mach-O).
.. option:: --radix=<RADIX>, -t
Specify the radix of the symbol address(es). Values accepted are *d* (decimal),
*x* (hexadecimal) and *o* (octal).
.. option:: --reverse-sort, -r
Sort symbols in reverse order.
.. option:: --size-sort .. option:: --size-sort
Sort symbols by size. Sort symbols by size.
.. option:: --special-syms
Ignored. For GNU compatibility only.
.. option:: --undefined-only, -u .. option:: --undefined-only, -u
Print only symbols referenced but not defined in this file. Print only undefined symbols.
.. option:: --radix=RADIX, -t .. option:: --version
Specify the radix of the symbol address(es). Values accepted d(decimal), Display the version of this program. Does not stack with other commands.
x(hexadecimal) and o(octal).
.. option:: --without-aliases
Exclude aliases from the output.
.. option:: @<FILE> .. option:: @<FILE>
Read command-line options from response file `<FILE>`. Read command-line options from response file `<FILE>`.
MACH-O SPECIFIC OPTIONS
-----------------------
.. option:: --add-dyldinfo
Add symbols from the dyldinfo, if they are not already in the symbol table.
This is the default.
.. option:: --arch=<arch1[,arch2,...]>
Dump the symbols from the specified architecture(s).
.. option:: --dyldinfo-only
Dump only symbols from the dyldinfo.
.. option:: --no-dyldinfo
Do not add any symbols from the dyldinfo.
.. option:: -s=<segment section>
Dump only symbols from this segment and section name.
.. option:: -x
Print symbol entry in hex.
BUGS BUGS
---- ----