- List global (extern) functions in a file (prefixed with T):nm -g [file.o]- Demangle C++ symbols (make them readable):nm --demangle [file.o]- List only undefined symbols in a file:nm -u [file.o]- List all symbols, even debugging symbols:nm -a [file.o]
nm [-A|-o|--print-file-name] [-a|--debug-syms] [-B|--format=bsd] [-C|--demangle[=style]] [-D|--dynamic] [-fformat|--format=format] [-g|--extern-only] [-h|--help] [-l|--line-numbers] [-n|-v|--numeric-sort] [-P|--portability] [-p|--no-sort] [-r|--reverse-sort] [-S|--print-size] [-s|--print-armap] [-t radix|--radix=radix] [-u|--undefined-only] [-V|--version] [-X 32_64] [--defined-only] [--no-demangle] [--plugin name] [--size-sort] [--special-syms] [--synthetic] [--with-symbol-versions] [--target=bfdname] [objfile...]
GNU nm lists the symbols from object files objfile.... If no object files are listed as arguments, nm assumes the file a.out.
For each symbol, nm shows:
The long and short forms of options, shown here as alternatives, are equivalent.
Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.
ar(1), objdump(1), ranlib(1), and the Info entries for binutils.
Copyright (c) 1991-2017 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''.