I\'m interested in verifying if a given iPhone static library has been built for ARM or Intel.
It\'s more curiosity than anything. Is there some kind of Mac OS X o
As mentioned earlier, file does not always work. otool -hv -arch all is probably the closest thing that is guaranteed to work - it gives architecture information for every single object file in the library.
Example:
% otool -hv /sw/lib/libfftw3.a
Archive : /sw/lib/libfftw3.a
/sw/lib/libfftw3.a(align.o):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 OBJECT 3 336 SUBSECTIONS_VIA_SYMBOLS
/sw/lib/libfftw3.a(alloc.o):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 OBJECT 3 416 SUBSECTIONS_VIA_SYMBOLS
...