xref: /freebsd/contrib/file/magic/Magdir/mach (revision 4436b51dff5736e74da464946049ea6899a88938)
1
2#------------------------------------------------------------
3# $File: mach,v 1.20 2015/05/21 18:28:41 christos Exp $
4# Mach has two magic numbers, 0xcafebabe and 0xfeedface.
5# Unfortunately the first, cafebabe, is shared with
6# Java ByteCode, so they are both handled in the file "cafebabe".
7# The "feedface" ones are handled herein.
8#------------------------------------------------------------
9# if set, it's for the 64-bit version of the architecture
10# yes, this is separate from the low-order magic number bit
11# it's also separate from the "64-bit libraries" bit in the
12# upper 8 bits of the CPU subtype
13
140	name	mach-o-cpu
15>0	belong&0x01000000	0
16#
17# 32-bit ABIs.
18#
19#				1	vax
20>>0	belong&0x00ffffff	1
21>>>4		belong&0x00ffffff	0	vax
22>>>4		belong&0x00ffffff	1	vax11/780
23>>>4		belong&0x00ffffff	2	vax11/785
24>>>4		belong&0x00ffffff	3	vax11/750
25>>>4		belong&0x00ffffff	4	vax11/730
26>>>4		belong&0x00ffffff	5	uvaxI
27>>>4		belong&0x00ffffff	6	uvaxII
28>>>4		belong&0x00ffffff	7	vax8200
29>>>4		belong&0x00ffffff	8	vax8500
30>>>4		belong&0x00ffffff	9	vax8600
31>>>4		belong&0x00ffffff	10	vax8650
32>>>4		belong&0x00ffffff	11	vax8800
33>>>4		belong&0x00ffffff	12	uvaxIII
34>>>4		belong&0x00ffffff	>12	vax subarchitecture=%d
35>>0	belong&0x00ffffff	2	romp
36>>0	belong&0x00ffffff	3	architecture=3
37>>0	belong&0x00ffffff	4	ns32032
38>>0	belong&0x00ffffff	5	ns32332
39>>0	belong&0x00ffffff	6	m68k
40#				7	x86
41>>0	belong&0x00ffffff	7
42>>>4	belong&0x0000000f	3		i386
43>>>4	belong&0x0000000f	4		i486
44>>>>4	belong&0x00fffff0	0
45>>>>4	belong&0x00fffff0	0x80		\bsx
46>>>4	belong&0x0000000f	5		i586
47>>>4	belong&0x0000000f	6
48>>>>4	belong&0x00fffff0	0		p6
49>>>>4	belong&0x00fffff0	0x10		pentium_pro
50>>>>4	belong&0x00fffff0	0x20		pentium_2_m0x20
51>>>>4	belong&0x00fffff0	0x30		pentium_2_m3
52>>>>4	belong&0x00fffff0	0x40		pentium_2_m0x40
53>>>>4	belong&0x00fffff0	0x50		pentium_2_m5
54>>>>4	belong&0x00fffff0	>0x50		pentium_2_m0x%x
55>>>4	belong&0x0000000f	7		celeron
56>>>>4	belong&0x00fffff0	0x00		\b_m0x%x
57>>>>4	belong&0x00fffff0	0x10		\b_m0x%x
58>>>>4	belong&0x00fffff0	0x20		\b_m0x%x
59>>>>4	belong&0x00fffff0	0x30		\b_m0x%x
60>>>>4	belong&0x00fffff0	0x40		\b_m0x%x
61>>>>4	belong&0x00fffff0	0x50		\b_m0x%x
62>>>>4	belong&0x00fffff0	0x60
63>>>>4	belong&0x00fffff0	0x70		\b_mobile
64>>>>4	belong&0x00fffff0	>0x70		\b_m0x%x
65>>>4	belong&0x0000000f	8		pentium_3
66>>>>4	belong&0x00fffff0	0x00
67>>>>4	belong&0x00fffff0	0x10		\b_m
68>>>>4	belong&0x00fffff0	0x20		\b_xeon
69>>>>4	belong&0x00fffff0	>0x20		\b_m0x%x
70>>>4	belong&0x0000000f	9		pentiumM
71>>>>4	belong&0x00fffff0	0x00
72>>>>4	belong&0x00fffff0	>0x00		\b_m0x%x
73>>>4	belong&0x0000000f	10		pentium_4
74>>>>4	belong&0x00fffff0	0x00
75>>>>4	belong&0x00fffff0	0x10		\b_m
76>>>>4	belong&0x00fffff0	>0x10		\b_m0x%x
77>>>4	belong&0x0000000f	11		itanium
78>>>>4	belong&0x00fffff0	0x00
79>>>>4	belong&0x00fffff0	0x10		\b_2
80>>>>4	belong&0x00fffff0	>0x10		\b_m0x%x
81>>>4	belong&0x0000000f	12		xeon
82>>>>4	belong&0x00fffff0	0x00
83>>>>4	belong&0x00fffff0	0x10		\b_mp
84>>>>4	belong&0x00fffff0	>0x10		\b_m0x%x
85>>>4	belong&0x0000000f	>12		ia32 family=%d
86>>>>4	belong&0x00fffff0	0x00
87>>>>4	belong&0x00fffff0	>0x00		model=%x
88>>0	belong&0x00ffffff	8	mips
89>>>4		belong&0x00ffffff	1	R2300
90>>>4		belong&0x00ffffff	2	R2600
91>>>4		belong&0x00ffffff	3	R2800
92>>>4		belong&0x00ffffff	4	R2000a
93>>>4		belong&0x00ffffff	5	R2000
94>>>4		belong&0x00ffffff	6	R3000a
95>>>4		belong&0x00ffffff	7	R3000
96>>>4		belong&0x00ffffff	>7	subarchitecture=%d
97>>0	belong&0x00ffffff	9	ns32532
98>>0	belong&0x00ffffff	10	mc98000
99>>0	belong&0x00ffffff	11	hppa
100>>>4		belong&0x00ffffff	0	7100
101>>>4		belong&0x00ffffff	1	7100LC
102>>>4		belong&0x00ffffff	>1	subarchitecture=%d
103>>0	belong&0x00ffffff	12	arm
104>>>4		belong&0x00ffffff	0
105>>>4		belong&0x00ffffff	1	subarchitecture=%d
106>>>4		belong&0x00ffffff	2	subarchitecture=%d
107>>>4		belong&0x00ffffff	3	subarchitecture=%d
108>>>4		belong&0x00ffffff	4	subarchitecture=%d
109>>>4		belong&0x00ffffff	5	\b_v4t
110>>>4		belong&0x00ffffff	6	\b_v6
111>>>4		belong&0x00ffffff	7	\b_v5tej
112>>>4		belong&0x00ffffff	8	\b_xscale
113>>>4		belong&0x00ffffff	9	\b_v7
114>>>4		belong&0x00ffffff	10	\b_v7f
115>>>4		belong&0x00ffffff	11	subarchitecture=%d
116>>>4		belong&0x00ffffff	12	\b_v7k
117>>>4		belong&0x00ffffff	>12	subarchitecture=%d
118#				13	m88k
119>>0	belong&0x00ffffff	13
120>>>4		belong&0x00ffffff	0	mc88000
121>>>4		belong&0x00ffffff	1	mc88100
122>>>4		belong&0x00ffffff	2	mc88110
123>>>4		belong&0x00ffffff	>2	mc88000 subarchitecture=%d
124>>0	belong&0x00ffffff	14	SPARC
125>>0	belong&0x00ffffff	15	i860g
126>>0	belong&0x00ffffff	16	alpha
127>>0	belong&0x00ffffff	17	rs6000
128>>0	belong&0x00ffffff	18	ppc
129>>>4		belong&0x00ffffff	0
130>>>4		belong&0x00ffffff	1	\b_601
131>>>4		belong&0x00ffffff	2	\b_602
132>>>4		belong&0x00ffffff	3	\b_603
133>>>4		belong&0x00ffffff	4	\b_603e
134>>>4		belong&0x00ffffff	5	\b_603ev
135>>>4		belong&0x00ffffff	6	\b_604
136>>>4		belong&0x00ffffff	7	\b_604e
137>>>4		belong&0x00ffffff	8	\b_620
138>>>4		belong&0x00ffffff	9	\b_650
139>>>4		belong&0x00ffffff	10	\b_7400
140>>>4		belong&0x00ffffff	11	\b_7450
141>>>4		belong&0x00ffffff	100	\b_970
142>>>4		belong&0x00ffffff	>100	subarchitecture=%d
143>>0	belong&0x00ffffff	>18	architecture=%d
144>0	belong&0x01000000	0x01000000
145#
146# 64-bit ABIs.
147#
148>>0	belong&0x00ffffff	0	64-bit architecture=%d
149>>0	belong&0x00ffffff	1	64-bit architecture=%d
150>>0	belong&0x00ffffff	2	64-bit architecture=%d
151>>0	belong&0x00ffffff	3	64-bit architecture=%d
152>>0	belong&0x00ffffff	4	64-bit architecture=%d
153>>0	belong&0x00ffffff	5	64-bit architecture=%d
154>>0	belong&0x00ffffff	6	64-bit architecture=%d
155>>0	belong&0x00ffffff	7	x86_64
156>>>4		belong&0x00ffffff	0	subarchitecture=%d
157>>>4		belong&0x00ffffff	1	subarchitecture=%d
158>>>4		belong&0x00ffffff	2	subarchitecture=%d
159>>>4		belong&0x00ffffff	3
160>>>4		belong&0x00ffffff	4	\b_arch1
161>>>4		belong&0x00ffffff	>4	subarchitecture=%d
162>>0	belong&0x00ffffff	8	64-bit architecture=%d
163>>0	belong&0x00ffffff	9	64-bit architecture=%d
164>>0	belong&0x00ffffff	10	64-bit architecture=%d
165>>0	belong&0x00ffffff	11	64-bit architecture=%d
166>>0	belong&0x00ffffff	12	64-bit architecture=%d
167>>0	belong&0x00ffffff	13	64-bit architecture=%d
168>>0	belong&0x00ffffff	14	64-bit architecture=%d
169>>0	belong&0x00ffffff	15	64-bit architecture=%d
170>>0	belong&0x00ffffff	16	64-bit architecture=%d
171>>0	belong&0x00ffffff	17	64-bit architecture=%d
172>>0	belong&0x00ffffff	18	ppc64
173>>>4		belong&0x00ffffff	0
174>>>4		belong&0x00ffffff	1		\b_601
175>>>4		belong&0x00ffffff	2		\b_602
176>>>4		belong&0x00ffffff	3		\b_603
177>>>4		belong&0x00ffffff	4		\b_603e
178>>>4		belong&0x00ffffff	5		\b_603ev
179>>>4		belong&0x00ffffff	6		\b_604
180>>>4		belong&0x00ffffff	7		\b_604e
181>>>4		belong&0x00ffffff	8		\b_620
182>>>4		belong&0x00ffffff	9		\b_650
183>>>4		belong&0x00ffffff	10		\b_7400
184>>>4		belong&0x00ffffff	11		\b_7450
185>>>4		belong&0x00ffffff	100		\b_970
186>>>4		belong&0x00ffffff	>100		subarchitecture=%d
187>>0	belong&0x00ffffff	>18	64-bit architecture=%d
188
189
1900	name		mach-o-be
191>0	byte		0xcf		64-bit
192>4	use		mach-o-cpu
193>12	belong		1		object
194>12	belong		2		executable
195>12	belong		3		fixed virtual memory shared library
196>12	belong		4		core
197>12	belong		5		preload executable
198>12	belong		6		dynamically linked shared library
199>12	belong		7		dynamic linker
200>12	belong		8		bundle
201>12	belong		9		dynamically linked shared library stub
202>12	belong		10		dSYM companion file
203>12	belong		11		kext bundle
204>12	belong		>11
205>>12	belong		x		filetype=%d
206
207#
2080	lelong&0xfffffffe	0xfeedface	Mach-O
209!:strength +1
210!:mime application/x-mach-binary
211>0	use	\^mach-o-be
212
2130	belong&0xfffffffe	0xfeedface	Mach-O
214!:strength +1
215!:mime application/x-mach-binary
216>0	use	mach-o-be
217