2025-03-14 21:59:59 -06:00
|
|
|
# nm
|
|
|
|
|
|
|
|
|
|
> List symbol names in object files.
|
|
|
|
|
> More information: <https://manned.org/nm>.
|
|
|
|
|
|
|
|
|
|
- List global (extern) functions in a file (prefixed with T):
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`nm {{[-g|--extern-only]}} {{path/to/file.o}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List only undefined symbols in a file:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`nm {{[-u|--undefined-only]}} {{path/to/file.o}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List all symbols, even debugging symbols:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`nm {{[-a|--debug-syms]}} {{path/to/file.o}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Demangle C++ symbols (make them readable):
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`nm {{[-C|--demangle]}} {{path/to/file.o}}`
|