tldr/pages/common/nm.md

21 lines
404 B
Markdown
Raw Normal View History

2015-12-31 21:21:42 +00:00
# nm
2016-01-13 14:54:31 +00:00
> List symbol names in object files.
2022-02-14 11:43:27 +00:00
> More information: <https://manned.org/nm>.
2015-12-31 21:21:42 +00:00
- List global (extern) functions in a file (prefixed with T):
2015-12-31 21:21:42 +00:00
2022-02-14 11:43:27 +00:00
`nm -g {{path/to/file.o}}`
2015-12-31 21:21:42 +00:00
- List only undefined symbols in a file:
2015-12-31 21:21:42 +00:00
2022-02-14 11:43:27 +00:00
`nm -u {{path/to/file.o}}`
2015-12-31 21:21:42 +00:00
- List all symbols, even debugging symbols:
2015-12-31 21:21:42 +00:00
2022-02-14 11:43:27 +00:00
`nm -a {{path/to/file.o}}`
2019-09-20 15:02:39 +01:00
- Demangle C++ symbols (make them readable):
2022-02-14 11:43:27 +00:00
`nm --demangle {{path/to/file.o}}`