How to get the length of a function in bytes?

There is a way to determine the size of a function. The command is:

 nm -S <object_file_name>

This will return the sizes of each function inside the object file. Consult the manual pages in the GNU using ‘man nm’ to gather more information on this.

Leave a Comment