First, causes
In the previous article, I tried compiling a lean cloud library that was built directly for Cocos2d-x C + + development on a Mac terminal. Then, make a basic example to use the functionality in this library. Out of curiosity like Windows VC development, I'd like to start by looking at (using the tools under my Mac) what the. a file contains/outputs. So, search on the web to find a few basic tools.
Ii. Analytical Tools
The tools I currently use are the Mac Terminal Command line tool (provided by the system itself, but need to install Xcode, my version 7.2):
There are also professional more powerful Mac anti-compilation tools Hopper Disassembler. This is not used for the time being, I am currently specialized in cracking analysis, temporarily do not need to install this tool. However, a few of the small http://www.cnblogs.com/ziyouchutuwenwu/archive/2013/03/16/2963824.html have amply demonstrated the power of this tool. A few things like Windows .... I think, if you want to study the development of assembly language under the Mac, this tool must be one of the necessary tools.
Third, analyze my library file libavoscloud.a
1. Ar-t *.a
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/15/wKiom1cS0caAyFA0AABXBJdAnFQ938.png "title=" screen shot 2016-04-17 a.m. 7.58.00.png "alt=" Wkiom1cs0caayfa0aabxbjdanfq938.png "/>
The use command is:ar-t libavoscloud.a
2. nm LIBAVOSCLOUD.A
The output is very complex, with some of the following:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7F/15/wKiom1cS0nqxtJdCAALXKIYACOQ456.png "title=" screen shot 2016-04-17 a.m. 8.01.37.png "alt=" Wkiom1cs0nqxtjdcaalxkiyacoq456.png "/>
This information is very informative and must be one of the features of the previous Hopper Disassembler tool.
3.Otool libavoscloud.a-l
Output as shown in the results:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/12/wKioL1cS1GPyYGBHAACSq8Tv_PI211.png "title=" screen shot 2016-04-17 a.m. 8.06.26.png "alt=" Wkiol1cs1gpyygbhaacsq8tv_pi211.png "/>
is basically consistent with the ar-t above. However, this otool also has a more detailed and rich function, here do not repeat, there are interesting friends can refer to the literature after reference.
4.Lipo-detailed_info libavoscloud.a
Output as shown in the results:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/12/wKioL1cS1WDCrBF_AAApZvLIjUY886.png "title=" screen shot 2016-04-17 a.m. 8.10.55.png "alt=" Wkiol1cs1wdcrbf_aaapzvlijuy886.png "/>
Iv. references
Http://blog.sina.com.cn/s/blog_408252050101g6lz.html
http://blog.csdn.net/kepoon/article/details/21516977
http://blog.csdn.net/x32sky/article/details/45099979
Http://www.myexception.cn/operating-system/1273793.html
Http://www.cnblogs.com/ziyouchutuwenwu/archive/2013/03/16/2963824.html
This article is from the "Green Peak" blog, please make sure to keep this source http://zhuxianzhong.blog.51cto.com/157061/1764666
Analyze MAC*.A library file information