简体   繁体   中英

How can I inspect DYLIB contents in terms of size?

After moving from a manually created Xcode project to a CMake-generated Xcode C++ project, my compiled binary DYLIB size has grown significantly: from about 35 MB to about 53 MB.

All the compilation and linking settings I could compare in Xcode projects look pretty much the same (including vs. not including debug symbols, optimization levels, etc.). I wonder if there are any tools to inspect DYLIB contents - what occupies size in the first place.

I would personally go with nm tool. You can inspect any DYLIB file iteratively, section-by-section or just print everything:

nm -a /path/to/my/lib.dylib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM