How to tell when app will run in 64-bit mode?
Jon Gotow
gotow at stclairsoft.com
Wed Feb 6 09:25:25 PST 2008
At 12:12 PM -0500 2/6/08, Ben Allison wrote:
>You can use the cpusubtype member of the fat_arch struct in the
>Mach-O header to determine the CPU type for a particular section.
>man arch enumerates the CPU types; in particular, you would look for
>CPU_SUBTYPE_POWERPC64_ALL and CPU_SUBTYPE_X86_64_ALL.
Heh - I was busy answering your last post. NXGetLocalArchInfo()
gives me a cputype of CPU_TYPE_X86 and a cputsubtype of
CPU_SUBTYPE_486 on both my Core Duo and Core 2 Duo machines, so that
doesn't appear to be any help.
How does the loader determine which binary to run? It doesn't appear
to be using NXFindBestFatArch() with the results of
NXGetLocalArchInfo(), because when I do that, it always gives me the
32-bit section.
- Jon
--
________________________________________________________________________
Jon Gotow gotow at stclairsoft.com
St. Clair Software http://www.stclairsoft.com/
Fax (540)552-5898 ftp://ftp.stclairsoft.com/
More information about the MacOSX-dev
mailing list