I have gcc creating a dylib on osx for me. I'm interested in what exactly takes up how much space in that file, and am looking for a tool/method that would let me see that information.
+1
A:
Use nm -n
on the binary. That will dump a listing of symbols in the library, sorted by memory address. By looking at the difference between a symbol's address and the next one in the list, you can tell the size of the function's text or of the variable's data.
jonas echterhoff
2010-10-15 12:16:16
+1
A:
You could also take a look at it using otool. Otool can be used to extract various information about mach-o object files.
Keli Hlodversson
2010-10-15 14:52:33