LinuxCommandLibrary

llvm-nm

lists symbols from object files, archives, and executables

TLDR

List symbols in object file

$ llvm-nm [file.o]
copy
Show only external symbols
$ llvm-nm --extern-only [file.o]
copy
Show only undefined symbols
$ llvm-nm --undefined-only [file.o]
copy
Show symbol sizes
$ llvm-nm --print-size [file.o]
copy
Demangle C++ symbols
$ llvm-nm --demangle [file.o]
copy

SYNOPSIS

llvm-nm [options] [file...]

DESCRIPTION

llvm-nm lists symbols from object files, archives, and executables. Drop-in replacement for GNU nm. Shows symbol names, types, and addresses. Useful for debugging linking issues and understanding binary contents.

PARAMETERS

--extern-only

Show only external symbols.
--undefined-only
Show only undefined symbols.
--defined-only
Show only defined symbols.
--demangle
Demangle C++ symbol names.
--print-size
Show symbol sizes.
--no-sort
Don't sort output.
--numeric-sort
Sort by address.

SEE ALSO

nm(1), llvm-objdump(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community