You can find out if an executable is a UB or not.
Look at the following example:
file ~/bin/unison
/Users/mtsouk/bin/unison: Mach-O executable ppc
Yep, and just to be a completist, there's also
lipo via the Terminal app:
<pre class="command">lipo -info /Applications/EarthTime.app/Contents/MacOS/EarthTime </pre>Gives:
<pre class="command">Non-fat file: /Applications/EarthTime.app/Contents/MacOS/EarthTime is architecture: ppc</pre>On a PPC only file. If it's Universal, it gives:
<pre class="command">Architectures in the fat file: /Applications/EarthTime.app/Contents/MacOS/EarthTime are: ppc i386</pre>For more detailed info, use the
-detailed_info flag:
<pre class="command">lipo -detailed_info /Applications/EarthTime.app/Contents/MacOS/EarthTime</pre>Gives you this:
<pre class="command">Fat header in: /Applications/EarthTime.app/Contents/MacOS/EarthTime
fat_magic 0xcafebabe
nfat_arch 2
architecture ppc
cputype CPU
TYPEPOWERPC
cpusubtype CPU
SUBTYPE_POWERPCALL
offset 4096
size 34844
align 2^12 (4096)
architecture i386
cputype CPU
TYPEI386
cpusubtype CPU
SUBTYPE_I386ALL
offset 40960
size 37836
align 2^12 (4096)</pre>Note how you have to give the full path to the actual executable inside the package. See
man lipo for more details, including how it can be used to create or thin universal binaries.
charlie