head	1.3;
access;
symbols
	RELENG_8_4:1.3.0.2
	RELENG_9_1_0_RELEASE:1.2.10.1
	RELENG_9_1:1.2.10.1.0.2
	RELENG_9_1_BP:1.2.10.1
	RELENG_8_3_0_RELEASE:1.2
	RELENG_8_3:1.2.0.14
	RELENG_8_3_BP:1.2
	RELENG_9_0_0_RELEASE:1.2
	RELENG_9_0:1.2.0.12
	RELENG_9_0_BP:1.2
	RELENG_9:1.2.0.10
	RELENG_9_BP:1.2
	RELENG_7_4_0_RELEASE:1.1.1.4
	RELENG_8_2_0_RELEASE:1.2
	RELENG_7_4:1.1.1.4.0.12
	RELENG_7_4_BP:1.1.1.4
	RELENG_8_2:1.2.0.8
	RELENG_8_2_BP:1.2
	RELENG_8_1_0_RELEASE:1.2
	RELENG_8_1:1.2.0.6
	RELENG_8_1_BP:1.2
	RELENG_7_3_0_RELEASE:1.1.1.4
	RELENG_7_3:1.1.1.4.0.10
	RELENG_7_3_BP:1.1.1.4
	RELENG_8_0_0_RELEASE:1.2
	RELENG_8_0:1.2.0.4
	RELENG_8_0_BP:1.2
	RELENG_8:1.2.0.2
	RELENG_8_BP:1.2
	RELENG_7_2_0_RELEASE:1.1.1.4
	RELENG_7_2:1.1.1.4.0.8
	RELENG_7_2_BP:1.1.1.4
	RELENG_7_1_0_RELEASE:1.1.1.4
	RELENG_6_4_0_RELEASE:1.1.1.2.8.1
	RELENG_7_1:1.1.1.4.0.6
	RELENG_7_1_BP:1.1.1.4
	RELENG_6_4:1.1.1.2.8.1.0.2
	RELENG_6_4_BP:1.1.1.2.8.1
	RELENG_7_0_0_RELEASE:1.1.1.4
	file_4_23__r1_46:1.1.1.4
	RELENG_6_3_0_RELEASE:1.1.1.2
	file_4_23:1.1.1.4
	RELENG_7_0:1.1.1.4.0.4
	RELENG_7_0_BP:1.1.1.4
	RELENG_6_3:1.1.1.2.0.18
	RELENG_6_3_BP:1.1.1.2
	RELENG_7:1.1.1.4.0.2
	RELENG_7_BP:1.1.1.4
	file_4_21:1.1.1.4
	file_4_19:1.1.1.4
	RELENG_6_2_0_RELEASE:1.1.1.2
	RELENG_6_2:1.1.1.2.0.16
	RELENG_6_2_BP:1.1.1.2
	file_4_17_A:1.1
	file_4_17:1.1.1.3
	RELENG_5_5_0_RELEASE:1.1.1.2
	RELENG_5_5:1.1.1.2.0.14
	RELENG_5_5_BP:1.1.1.2
	RELENG_6_1_0_RELEASE:1.1.1.2
	RELENG_6_1:1.1.1.2.0.12
	RELENG_6_1_BP:1.1.1.2
	RELENG_6_0_0_RELEASE:1.1.1.2
	RELENG_6_0:1.1.1.2.0.10
	RELENG_6_0_BP:1.1.1.2
	RELENG_6:1.1.1.2.0.8
	RELENG_6_BP:1.1.1.2
	RELENG_5_4_0_RELEASE:1.1.1.2
	RELENG_5_4:1.1.1.2.0.6
	RELENG_5_4_BP:1.1.1.2
	RELENG_4_11_0_RELEASE:1.1.1.1.2.1
	file_4_12:1.1.1.2
	RELENG_4_11:1.1.1.1.2.1.0.18
	RELENG_4_11_BP:1.1.1.1.2.1
	RELENG_5_3_0_RELEASE:1.1.1.2
	RELENG_5_3:1.1.1.2.0.4
	RELENG_5_3_BP:1.1.1.2
	RELENG_5:1.1.1.2.0.2
	RELENG_5_BP:1.1.1.2
	file_4_10:1.1.1.2
	RELENG_4_10_0_RELEASE:1.1.1.1.2.1
	RELENG_4_10:1.1.1.1.2.1.0.16
	RELENG_4_10_BP:1.1.1.1.2.1
	RELENG_5_2_1_RELEASE:1.1.1.1
	RELENG_5_2_0_RELEASE:1.1.1.1
	RELENG_5_2:1.1.1.1.0.8
	RELENG_5_2_BP:1.1.1.1
	RELENG_4_9_0_RELEASE:1.1.1.1.2.1
	RELENG_4_9:1.1.1.1.2.1.0.14
	RELENG_4_9_BP:1.1.1.1.2.1
	RELENG_5_1_0_RELEASE:1.1.1.1
	RELENG_5_1:1.1.1.1.0.6
	RELENG_5_1_BP:1.1.1.1
	RELENG_4_8_0_RELEASE:1.1.1.1.2.1
	RELENG_4_8:1.1.1.1.2.1.0.12
	RELENG_4_8_BP:1.1.1.1.2.1
	file_3_41:1.1.1.1
	file_3_40:1.1.1.1
	RELENG_5_0_0_RELEASE:1.1.1.1
	RELENG_5_0:1.1.1.1.0.4
	RELENG_5_0_BP:1.1.1.1
	RELENG_4_7_0_RELEASE:1.1.1.1.2.1
	RELENG_4_7:1.1.1.1.2.1.0.10
	RELENG_4_7_BP:1.1.1.1.2.1
	file_3_39:1.1.1.1
	RELENG_4_6_2_RELEASE:1.1.1.1.2.1
	RELENG_4_6_1_RELEASE:1.1.1.1.2.1
	RELENG_4_6_0_RELEASE:1.1.1.1.2.1
	RELENG_4_6:1.1.1.1.2.1.0.8
	RELENG_4_6_BP:1.1.1.1.2.1
	RELENG_4_5_0_RELEASE:1.1.1.1.2.1
	RELENG_4_5:1.1.1.1.2.1.0.6
	RELENG_4_5_BP:1.1.1.1.2.1
	file_3_37:1.1.1.1
	RELENG_4_4_0_RELEASE:1.1.1.1.2.1
	RELENG_4_4:1.1.1.1.2.1.0.4
	RELENG_4_4_BP:1.1.1.1.2.1
	file_3_36:1.1.1.1
	file_3_35:1.1.1.1
	RELENG_4_3_0_RELEASE:1.1.1.1.2.1
	RELENG_4_3:1.1.1.1.2.1.0.2
	RELENG_4_3_BP:1.1.1.1.2.1
	file_3_34:1.1.1.1
	RELENG_4:1.1.1.1.0.2
	file_3_33:1.1.1.1
	file_3_32:1.1.1.1
	ZOULAS:1.1.1;
locks; strict;
comment	@# @;


1.3
date	2012.04.19.03.20.13;	author obrien;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2009.05.04.00.37.44;	author obrien;	state Exp;
branches
	1.2.10.1;
next	1.1;

1.1
date	2000.11.05.08.33.54;	author obrien;	state Exp;
branches
	1.1.1.1;
next	;

1.3.2.1
date	2012.04.19.03.20.13;	author svnexp;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2013.03.28.13.00.45;	author svnexp;	state Exp;
branches;
next	;

1.2.10.1
date	2012.07.02.08.48.58;	author obrien;	state Exp;
branches;
next	;

1.1.1.1
date	2000.11.05.08.33.54;	author obrien;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;

1.1.1.2
date	2004.08.09.08.45.41;	author obrien;	state Exp;
branches
	1.1.1.2.8.1;
next	1.1.1.3;

1.1.1.3
date	2006.06.19.07.52.15;	author obrien;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2007.05.24.16.12.23;	author obrien;	state Exp;
branches;
next	;

1.1.1.1.2.1
date	2000.11.26.21.37.24;	author obrien;	state Exp;
branches;
next	;

1.1.1.2.8.1
date	2008.01.24.15.47.31;	author rafan;	state Exp;
branches;
next	;


desc
@@


1.3
log
@SVN rev 234449 on 2012-04-19 03:20:13Z by obrien

Update file(1) to version 5.11.
@
text
@
#------------------------------------------------------------
# $File: mach,v 1.9 2009/09/19 16:28:10 christos Exp $
# Mach has two magic numbers, 0xcafebabe and 0xfeedface.
# Unfortunately the first, cafebabe, is shared with
# Java ByteCode, so they are both handled in the file "cafebabe".
# The "feedface" ones are handled herein.
#------------------------------------------------------------
0	lelong&0xfffffffe	0xfeedface	Mach-O
>0	byte		0xcf		64-bit
>12	lelong		1		object
>12	lelong		2		executable
>12	lelong		3		fixed virtual memory shared library
>12	lelong		4		core
>12	lelong		5		preload executable
>12	lelong		6		dynamically linked shared library
>12	lelong		7		dynamic linker
>12	lelong		8		bundle
>12	lelong		9		dynamically linked shared library stub
>12	lelong		>9
>>12	lelong		x		filetype=%ld
>4	lelong		<0
>>4	lelong		x		architecture=%ld
>4	lelong		1		vax
>4	lelong		2		romp
>4	lelong		3		architecture=3
>4	lelong		4		ns32032
>4	lelong		5		ns32332
>4	lelong		6		m68k
>4	lelong		7		i386
>4	lelong		8		mips
>4	lelong		9		ns32532
>4	lelong		10		architecture=10
>4	lelong		11		hppa
>4	lelong		12		acorn
>4	lelong		13		m88k
>4	lelong		14		sparc
>4	lelong		15		i860-big
>4	lelong		16		i860
>4	lelong		17		rs6000
>4	lelong		18		ppc
>4	lelong		16777234	ppc64
>4	lelong		>16777234
>>4	lelong		x		architecture=%ld
#
0	belong&0xfffffffe	0xfeedface	Mach-O
>3	byte		0xcf		64-bit
>12	belong		1		object
>12	belong		2		executable
>12	belong		3		fixed virtual memory shared library
>12	belong		4		core
>12	belong		5		preload executable
>12	belong		6               dynamically linked shared library
>12	belong		7               dynamic linker
>12	belong		8		bundle
>12	belong		9		dynamically linked shared library stub
>12	belong		>9
>>12	belong		x		filetype=%ld
>4	belong		<0
>>4	belong		x		architecture=%ld
>4	belong		1		vax
>4	belong		2		romp
>4	belong		3		architecture=3
>4	belong		4		ns32032
>4	belong		5		ns32332
>4	belong		6		for m68k architecture
# from NeXTstep 3.0 <mach/machine.h>
# i.e. mc680x0_all, ignore
# >>8	belong		1		(mc68030)
>>8	belong		2		(mc68040)
>>8	belong		3		(mc68030 only)
>4	belong		7		i386
>4	belong		8		mips
>4	belong		9		ns32532
>4	belong		10		architecture=10
>4	belong		11		hppa
>4	belong		12		acorn
>4	belong		13		m88k
>4	belong		14		sparc
>4	belong		15		i860-big
>4	belong		16		i860
>4	belong		17		rs6000
>4	belong		18		ppc
>4	belong		16777234	ppc64
>4	belong		>16777234
>>4	belong		x		architecture=%ld
@


1.3.2.1
log
@file mach was added on branch RELENG_8_4 on 2013-03-28 13:00:45 +0000
@
text
@d1 86
@


1.3.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 84
#------------------------------------------------------------
# Mach has two magic numbers, 0xcafebabe and 0xfeedface.
# Unfortunately the first, cafebabe, is shared with
# Java ByteCode, so they are both handled in the file "cafebabe".
# The "feedface" ones are handled herein.
#------------------------------------------------------------
0	lelong&0xfffffffe	0xfeedface	Mach-O
>0	byte		0xcf		64-bit
>12	lelong		1		object
>12	lelong		2		executable
>12	lelong		3		fixed virtual memory shared library
>12	lelong		4		core
>12	lelong		5		preload executable
>12	lelong		6		dynamically linked shared library
>12	lelong		7		dynamic linker
>12	lelong		8		bundle
>12	lelong		9		dynamically linked shared library stub
>12	lelong		>9
>>12	lelong		x		filetype=%ld
>4	lelong		<0
>>4	lelong		x		architecture=%ld
>4	lelong		1		vax
>4	lelong		2		romp
>4	lelong		3		architecture=3
>4	lelong		4		ns32032
>4	lelong		5		ns32332
>4	lelong		6		m68k
>4	lelong		7		i386
>4	lelong		8		mips
>4	lelong		9		ns32532
>4	lelong		10		architecture=10
>4	lelong		11		hppa
>4	lelong		12		acorn
>4	lelong		13		m88k
>4	lelong		14		sparc
>4	lelong		15		i860-big
>4	lelong		16		i860
>4	lelong		17		rs6000
>4	lelong		18		ppc
>4	lelong		16777234	ppc64
>4	lelong		>16777234
>>4	lelong		x		architecture=%ld
#
0	belong&0xfffffffe	0xfeedface	Mach-O
>3	byte		0xcf		64-bit
>12	belong		1		object
>12	belong		2		executable
>12	belong		3		fixed virtual memory shared library
>12	belong		4		core
>12	belong		5		preload executable
>12	belong		6               dynamically linked shared library
>12	belong		7               dynamic linker
>12	belong		8		bundle
>12	belong		9		dynamically linked shared library stub
>12	belong		>9
>>12	belong		x		filetype=%ld
>4	belong		<0
>>4	belong		x		architecture=%ld
>4	belong		1		vax
>4	belong		2		romp
>4	belong		3		architecture=3
>4	belong		4		ns32032
>4	belong		5		ns32332
>4	belong		6		for m68k architecture
# from NeXTstep 3.0 <mach/machine.h>
# i.e. mc680x0_all, ignore
# >>8	belong		1		(mc68030)
>>8	belong		2		(mc68040)
>>8	belong		3		(mc68030 only)
>4	belong		7		i386
>4	belong		8		mips
>4	belong		9		ns32532
>4	belong		10		architecture=10
>4	belong		11		hppa
>4	belong		12		acorn
>4	belong		13		m88k
>4	belong		14		sparc
>4	belong		15		i860-big
>4	belong		16		i860
>4	belong		17		rs6000
>4	belong		18		ppc
>4	belong		16777234	ppc64
>4	belong		>16777234
>>4	belong		x		architecture=%ld
@


1.2
log
@SVN rev 191771 on 2009-05-04 00:37:44Z by obrien

Merge vendor/file/dist@@191739, bringing FILE 5.00 to 8-CURRENT.
@
text
@d1 1
d3 1
@


1.2.10.1
log
@SVN rev 237983 on 2012-07-02 08:48:58Z by obrien

MFC: r234449: update file(1) to version 5.11.
@
text
@a0 1

a1 1
# $File: mach,v 1.9 2009/09/19 16:28:10 christos Exp $
@


1.1
log
@Initial revision
@
text
@d1 42
a42 2
#------------------------------------------------------------------------------
# mach file description
d44 2
a45 6
0	belong		0xcafebabe	Mach-O fat file
>4	belong		1		with 1 architecture
>4	belong		>1
>>4	belong		x		with %ld architectures		
#
0	belong		0xfeedface	Mach-O
d48 1
a48 1
>12	belong		3		shared library
d51 5
a55 1
>12	belong		>5
d74 1
a74 1
>4	belong		11		hp pa-risc
d81 3
a83 2
>4	belong		18		powerPC
>4	belong		>18
@


1.1.1.1
log
@Virgin import of FILE 3.32
@
text
@@


1.1.1.2
log
@Virgin import of Christos Zoulas's FILE 4.10.
*- file is now broken into a library containing and processing the magic
   and a consumer binary.
@
text
@d15 1
a15 4
>12	belong		6               dynamically linked shared library
>12	belong		7               dynamic linker
>12	belong		8		bundle
>12	belong		>8
d41 1
a41 1
>4	belong		18		ppc
@


1.1.1.2.8.1
log
@MFC file 4.21
@
text
@d1 2
a2 42
#------------------------------------------------------------
# Mach has two magic numbers, 0xcafebabe and 0xfeedface.
# Unfortunately the first, cafebabe, is shared with
# Java ByteCode, so they are both handled in the file "cafebabe".
# The "feedface" ones are handled herein.
#------------------------------------------------------------
0	lelong&0xfeffffff	0xfeedface	Mach-O
>0	byte		0xcf		64-bit
>12	lelong		1		object
>12	lelong		2		executable
>12	lelong		3		fixed virtual memory shared library
>12	lelong		4		core
>12	lelong		5		preload executable
>12	lelong		6		dynamically linked shared library
>12	lelong		7		dynamic linker
>12	lelong		8		bundle
>12	lelong		9		dynamically linked shared library stub
>12	lelong		>9
>>12	lelong		x		filetype=%ld
>4	lelong		<0
>>4	lelong		x		architecture=%ld
>4	lelong		1		vax
>4	lelong		2		romp
>4	lelong		3		architecture=3
>4	lelong		4		ns32032
>4	lelong		5		ns32332
>4	lelong		6		m68k
>4	lelong		7		i386
>4	lelong		8		mips
>4	lelong		9		ns32532
>4	lelong		10		architecture=10
>4	lelong		11		hppa
>4	lelong		12		acorn
>4	lelong		13		m88k
>4	lelong		14		sparc
>4	lelong		15		i860-big
>4	lelong		16		i860
>4	lelong		17		rs6000
>4	lelong		18		ppc
>4	lelong		16777234	ppc64
>4	lelong		>16777234
>>4	lelong		x		architecture=%ld
d4 6
a9 2
0	belong&0xfffffffe	0xfeedface	Mach-O
>3	byte		0xcf		64-bit
d12 1
a12 1
>12	belong		3		fixed virtual memory shared library
d18 1
a18 2
>12	belong		9		dynamically linked shared library stub
>12	belong		>9
d37 1
a37 1
>4	belong		11		hppa
d45 1
a45 2
>4	belong		16777234	ppc64
>4	belong		>16777234
@


1.1.1.3
log
@Virgin import of Christos Zoulas's FILE 4.17.
@
text
@d4 2
a5 15
# Since Java bytecode and Mach-O fat-files have the same magic number the test
# must be preformed in the same "magic" sequence to get both right.  The long
# at offset 4 in a fat file tells the number of architectures.  The short at
# offset 4 in a Java bytecode file is the compiler minor version and the
# short at offset 6 is the compiler major version.  Since there are only 
# only 18 labeled Mach-O architectures at current, and the first released 
# Java class format was version 43.0, we can safely choose any number
# between 18 and 39 to test the number of architectures against
# (and use as a hack).
#
0	belong		0xcafebabe
>4	belong		>19		compiled Java class data,
>>6     beshort		x	        version %d.
>>4     beshort		x       	\b%d
>4	belong		1		Mach-O fat file with 1 architecture
d7 1
a7 40
# The following is necessary to support java class files.
>>4	belong		<20		Mach-O fat file with %ld architectures
#>>4	belong		<0xffff		Mach-O fat file with %ld architectures
#
0	lelong&0xfeffffff	0xfeedface	Mach-O
>0	byte		0xcf		64-bit
>12	lelong		1		object
>12	lelong		2		executable
>12	lelong		3		fixed virtual memory shared library
>12	lelong		4		core
>12	lelong		5		preload executable
>12	lelong		6		dynamically linked shared library
>12	lelong		7		dynamic linker
>12	lelong		8		bundle
>12	lelong		9		dynamically linked shared library stub
>12	lelong		>9
>>12	lelong		x		filetype=%ld
>4	lelong		<0
>>4	lelong		x		architecture=%ld
>4	lelong		1		vax
>4	lelong		2		romp
>4	lelong		3		architecture=3
>4	lelong		4		ns32032
>4	lelong		5		ns32332
>4	lelong		6		m68k
>4	lelong		7		i386
>4	lelong		8		mips
>4	lelong		9		ns32532
>4	lelong		10		architecture=10
>4	lelong		11		hppa
>4	lelong		12		acorn
>4	lelong		13		m88k
>4	lelong		14		sparc
>4	lelong		15		i860-big
>4	lelong		16		i860
>4	lelong		17		rs6000
>4	lelong		18		ppc
>4	lelong		16777234	ppc64
>4	lelong		>16777234
>>4	lelong		x		architecture=%ld
d9 1
a9 2
0	belong&0xfffffffe	0xfeedface	Mach-O
>3	byte		0xcf		64-bit
d12 1
a12 1
>12	belong		3		fixed virtual memory shared library
d18 1
a18 2
>12	belong		9		dynamically linked shared library stub
>12	belong		>9
d37 1
a37 1
>4	belong		11		hppa
d45 1
a45 2
>4	belong		16777234	ppc64
>4	belong		>16777234
@


1.1.1.4
log
@Virgin import of Christos Zoulas's FILE 4.19.
@
text
@d1 23
a23 6
#------------------------------------------------------------
# Mach has two magic numbers, 0xcafebabe and 0xfeedface.
# Unfortunately the first, cafebabe, is shared with
# Java ByteCode, so they are both handled in the file "cafebabe".
# The "feedface" ones are handled herein.
#------------------------------------------------------------
@


1.1.1.1.2.1
log
@MFC:  Christos Zoulas's FILE 3.33
@
text
@@

