🖥️nm
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the nm command with important options and switches using examples.
2 minute read
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ███╗ ██╗███╗ ███╗
# ████╗ ██║████╗ ████║
# ██╔██╗ ██║██╔████╔██║
# ██║╚██╗██║██║╚██╔╝██║
# ██║ ╚████║██║ ╚═╝ ██║
# ╚═╝ ╚═══╝╚═╝ ╚═╝
# List symbol names in object files
# The nm command is used to display symbols from object files.
# Demangle C++ symbols (make them readable):
nm --demangle file.o
# Display object files that refer to a symbol
nm -A ./*.o | grep func
# Display all undefined symbols in a file
nm -u executable
# List all symbols, even debugging symbols:
nm -a executable
# Display all symbols in executable
# (sorted in order of their addresses)
nm -n executable
# Search for a symbols and display its size
nm -S 1 | grep abc
# Display dynamic symbols in executable
nm -D executable
# Change the format of the nm output
# (display the output of nm command in posix style)
nm -u -f posix executable
# Display only the external symbols of executable
nm -g executable
# Sort the nm output by the symbol size
nm -g --size-sort executable
# Specify nm options in a file
nm @nm_file
nm test
0804a020 B __bss_start
0804841d T compare
0804a020 b completed.6591
0804a018 D __data_start
0804a018 W data_start
08048360 t deregister_tm_clones
080483d0 t __do_global_dtors_aux
08049f0c t __do_global_dtors_aux_fini_array_entry
0804a01c D __dso_handle
08049f14 d _DYNAMIC
0804a020 D _edata
0804a024 B _end
080484e4 T _fini
080484f8 R _fp_hw
080483f0 t frame_dummy
...
...
...
#==============================##==============================#
# CMD NM #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command nm in a clear format. This allows users to quickly access the needed information for nm without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for nm are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.