Conor Ginnell Conor Ginnell - 6 months ago 39
Linux Question

Getting the number of symbols in a symbol table

I'm trying to find the number of symbols an executable defines. Let's say our executable is called "node"

I'm running

nm node

on my terminal, and it's outputting a large number of symbols.
I've looked at the man page for nm, along with , but I haven't been able to find something that will simply return a count of the symbols in the symbol table.


Try the following

nm -an foo | wc -l