Mac OS X下查看可执行文件是32-bit还是64-bit的方法

[c toolbar=”false”]
$ otool -h /bin/sh
[/c]
/bin/sh:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedfacf 16777223 3 0x80 2 15 2040 0x00200085

如上命令的输出,如果magic值为0xfeedfacf,则为64位,如果是0xfeedface,则为32位。

By Lu Jun

80后男,就职于软件行业。习于F*** GFW。人生48%时间陪同电子设备和互联网,美剧迷,高清视频狂热者,游戏菜鸟,长期谷粉,临时果粉,略知摄影。

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.