¡@

Home 

2014/10/15 ¤U¤È 10:09:59

iphone Programming Glossary: header_ptr

How to determine binary image architecture at runtime?

http://stackoverflow.com/questions/5567215/how-to-determine-binary-image-architecture-at-runtime

mach o loader.h #import mach o dyld.h #import mach o arch.h void printImage const struct mach_header header uint8_t header_ptr uint8_t header typedef struct load_command load_command const NXArchInfo info NXGetArchInfoFromCpuType header cputype header.. info NXGetArchInfoFromCpuType header cputype header cpusubtype Print the architecture ex. armv7 printf s info name header_ptr sizeof struct mach_header load_command command load_command header_ptr for int i 0 i header ncmds 0 i if command cmd LC_UUID.. the architecture ex. armv7 printf s info name header_ptr sizeof struct mach_header load_command command load_command header_ptr for int i 0 i header ncmds 0 i if command cmd LC_UUID struct uuid_command ucmd struct uuid_command header_ptr CFUUIDRef..