ar命令解压.a时候,报错 is a fat file (use libtool(1) or lipo(1) and ar(1) on it)

来源:互联网 发布:流体力学仿真软件 编辑:程序博客网 时间:2024/06/06 02:25

      在解压.a文件时,报了一个类似 xxx.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)的错误,经过查找资料,原来是因为该.a文件包含了多个cpu架构,比如armv7,armv7s等,此时可以用如下命令:

lipo xx. a -thin armv7 -output xx_armv7.a
lipo lxx. a -thin armv7s -output xx_armv7s.a

可以参考:ar : is a fat file (use libtool(1) or lipo(1) and ar(1) on it)

然后再使用,ar -x xx_armv7.a,就可以成功的解压出各个.o了。

如果还想查看.o的反编译代码,在Mac上可以用otool这个命令来反编译.o文件,比如otool -tv xx.o

可以参考: Mac的反编译工具一:otool (objdump工具的OSX对应工具)。


0 0
原创粉丝点击