I use the below command to generate an object file, but the corresponding "cpusubtype" is incompatible with the current system, what I suppose to have is "0x3", but the actual what I have is "0x80000003", how do I resolve this problem?
gobjcopy -I binary -O mach-o-x86-64 -B i386:x86-64 test test.o
What I suppose to have:
cpusubtype: 0x3 (X86_ALL)
Actually what I get:
cpusubtype: 0x80000003 (LIB64) (X86_ALL)
BTW. What I found that the extra 0x80000000 seems is a kind of capability bit.
I still do not have any idea on how to fix this.
/*
* Capability bits used in the definition of cpu_subtype.
*/
#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */
#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */
User contributions licensed under CC BY-SA 3.0