LLVM-NM(1)
๐ LLVM-NM(1) โ the llvm-nm manual, but make it make sense
okay bestie so this is the llvm-nm page from the LLVM manual, and I'm gonna walk you through it like we're texting at 2am ๐ซถ
โจ NAME โจ
llvm-nm โ literally just lists the symbol table of LLVM bitcode files and object files. that's the whole job. icon behavior tbh ๐
๐ธ SYNOPSIS ๐ธ
llvm-nm [options] [filenames...]
๐ฆ DESCRIPTION ๐ฆ
so the llvm-nm utility lists the names of symbols from LLVM bitcode files, object files, and archives. every symbol gets listed along with some simple info about where it came from โ like a little provenance receipt, we love to see it โจ
if you don't specify a filename, a.out is used as the input (yes, default behavior, she's confident). and if you use - as a filename, llvm-nm will read a file from its standard input stream. cute ๐
llvm-nm's default output format is the traditional BSD nm output format. each such output record is made of an (optional) 8-digit hexadecimal address, then a type code character, then a name, for each symbol. one record per line, fields separated by spaces. and when the address is omitted? it gets replaced by 8 spaces. not 7, not 9. 8. periodt ๐
๐ the type code characters (iykyk) ๐
these are the supported type code characters. where both lower and upper-case characters are listed for the same meaning: a lower-case character represents a local symbol, whilst an upper-case character represents a global (external) symbol. lowercase = local, uppercase = global, write it down bestie ๐
a,Aโ Absolute symbol.b,Bโ Uninitialized data (bss) object.Cโ Common symbol. Multiple definitions link together into one definition.d,Dโ Writable data object.i,Iโ COFF:.idatasymbol or symbol in a section withIMAGE_SCN_LNK_INFOset.nโ ELF: local symbol from non-alloc section. COFF: debug symbol.Nโ ELF: debug section symbol, or global symbol from non-alloc section.s,Sโ COFF: section symbol. Mach-O: absolute symbol or symbol from a section other than__TEXT_EXEC __text,__TEXT __text,__DATA __data, or__DATA __bss.r,Rโ Read-only data object.t,Tโ Code (text) object.uโ ELF: GNU unique symbol.Uโ Named object is undefined in this file.vโ ELF: Undefined weak object. It is not a link failure if the object is not defined.Vโ ELF: Defined weak object symbol. This definition will only be used if no regular definitions exist in a link. If multiple weak definitions and no regular definitions exist, one of the weak definitions will be used.wโ Undefined weak symbol other than an ELF object symbol. It is not a link failure if the symbol is not defined.Wโ Defined weak symbol other than an ELF object symbol. This definition will only be used if no regular definitions exist in a link. If multiple weak definitions and no regular definitions exist, one of the weak definitions will be used.-โ Mach-O:N_STABsymbol.?โ Something unrecognizable.
๐ง the bitcode address thing (important!!) ๐ง
because LLVM bitcode files typically contain objects that are not considered to have addresses until they are linked into an executable image or dynamically compiled "just-in-time", llvm-nm does not print an address for any symbol in an LLVM bitcode file โ even symbols which are defined in the bitcode file. no address for you, bitcode. it's giving "no thoughts, head empty" but for addresses ๐
๐ฅ OPTIONS ๐ฅ
-Bโ Use BSD output format. Alias for--format=bsd.-Xโ Specify the type of XCOFF object file, ELF object file, or IR object file input from command line or from archive files thatllvm-nmshould examine. The mode must be one of the following:32โ Process only 32-bit object files.64โ Process only 64-bit object files.32_64โ Process both 32-bit and 64-bit object files.anyโ Process all the supported object files.
On AIX OS, the default is to process 32-bit object files only and to ignore 64-bit objects. The can be changed by setting the OBJECT_MODE environment variable. For example, OBJECT_MODE=64 causes llvm-nm to process 64-bit objects and ignore 32-bit objects. The -X flag overrides the OBJECT_MODE variable.
On other operating systems, the default is to process all object files: the OBJECT_MODE environment variable is not supported.
--debug-syms,-aโ Show all symbols, even those usually suppressed.--defined-only,-Uโ Print only symbols defined in this file.--demangle,-Cโ Demangle symbol names.--dynamic,-Dโ Display dynamic symbols instead of normal symbols.--export-symbolsโ Print sorted symbols with their visibility (if applicable), with duplicates removed.--extern-only,-gโ Print only symbols whose definitions are external; that is, accessible from other files.--format=<format>,-fโ Select an output format;formatmay besysv,posix,darwin,bsdorjust-symbols. The default isbsd.--help,-hโ Print a summary of command-line options and their meanings.-jโ Print just the symbol names. Alias for--format=just-symbols.--line-numbers,-lโ Use debugging information to print the filenames and line numbers where symbols are defined. Undefined symbols have the location of their first relocation printed instead.-mโ Use Darwin format. Alias for--format=darwin.--no-demangleโ Don't demangle symbol names. This is the default.--no-llvm-bcโ Disable the LLVM bitcode reader.--no-sort,-pโ Show symbols in the order encountered.--no-weak,-Wโ Don't print weak symbols.--numeric-sort,-n,-vโ Sort symbols by address.--portability,-Pโ Use POSIX.2 output format. Alias for--format=posix.--print-armapโ Print the archive symbol table, in addition to the symbols.--print-file-name,-A,-oโ Precede each symbol with the file it came from.--print-size,-Sโ Show symbol size as well as address (not applicable for Mach-O).--quietโ Suppress'no symbols'diagnostic.--radix=<RADIX>,-tโ Specify the radix of the symbol address(es). Values accepted ared(decimal),x(hexadecimal) ando(octal).--reverse-sort,-rโ Sort symbols in reverse order.--size-sortโ Sort symbols by size.--special-symsโ Do not filter special symbols from the output.--undefined-only,-uโ Print only undefined symbols.--version,-Vโ Display the version of thellvm-nmexecutable, then exit. Does not stack with other commands.@<FILE>โ Read command-line options from response file <FILE>.
๐ MACH-O SPECIFIC OPTIONS ๐
apple girlies this section is for you ๐
--add-dyldinfoโ Add symbols from the dyldinfo, if they are not already in the symbol table. This is the default.--add-inlinedinfoโ Add symbols from the inlined libraries, TBD file inputs only.--arch=<arch1[,arch2,...]>โ Dump the symbols from the specified architecture(s).--dyldinfo-onlyโ Dump only symbols from the dyldinfo.--no-dyldinfoโ Do not add any symbols from the dyldinfo.-s <segment> <section>โ Dump only symbols from this segment and section name.-xโ Print symbol entry in hex.
๐ XCOFF SPECIFIC OPTIONS ๐
--no-rsrcโ Exclude resource file symbols (__rsrc) from export symbol list.
๐ BUGS ๐
llvm-nmdoes not support the full set of arguments that GNUnmdoes.
like she's doing her best, okay ๐ญ not a full GNU clone, just living her truth
โญ EXIT STATUS โญ
llvm-nm exits with an exit code of zero.
no cap. zero. every time. iconic, honestly ๐
๐ SEE ALSO ๐
llvm-ar(1)<llvm-ar.html>llvm-objdump(1)<llvm-objdump.html>llvm-readelf(1)<llvm-readelf.html>llvm-readobj(1)<llvm-readobj.html>
go read your other tools bestie, they're all slaying in their own lanes ๐ซถ
๐ Author ๐
Maintained by the LLVM Team (https://llvm.org/).
๐ Copyright ๐
2003-2026, LLVM Project
okay that's the whole page!! and for the cute sign-off: this edition is version 23, dated 2026-10-20, brought to you by the LLVM project โ mwah, go compile something beautiful ๐ โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: llvm 23.1.4-1 ยท Apache-2.0 WITH LLVM-exception
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms