I’m trying to reduce the size of an executable (using MINGW/GCC) by finding all large statically declared arrays. Is there a way to dump the list of data symbols along with their aggregate sizes?? I’ve looked at man pages for nm and objdump but dont see anything useful so far.
Thx.
Use the
nmutility from GNU binutils with the--print-sizeoption (abbreviated-S). For example, to find the 20 largest symbols in an object file, do this: