目录


1 Accustoming yourself to Ojective-C

1.1:otool

otool:Otool可以提取并显示ios下目标文件的相关信息,包括头部,加载命令,各个段,共享库,动态库等等。它拥有大量的命令选项,是一个功能强大的分析工具,当然还可以做反汇编的工具使用。下面是1个利用otool查看someProject.app里someProject的unix executable的所依赖的系统库路径检测的例子。

1
2
3
4
5
6
7
8
9
10
cd /Users/LAL/Library/Developer/CoreSimulator/Devices/FFDDEC82-DD4D-4BFD-9040-416F25DF276A/data/Containers/Bundle/Application/1EF40B7F-B56C-4AE1-BCBF-9304DA548534/runtimeTest.app

otool -L runtimeTest   //Unix executable
//输出
runtimeTest:
    /System/Library/Frameworks/Foundation.framework/Foundation
    /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 
    /System/Library/Frameworks/UIKit.framework/UIKit
    /usr/lib/libobjc.A.dylib   //objc和runtime
    /usr/lib/libSystem.dylib

2 Reference


Share Post

Twitter Google+

Shunmian

The only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one.