168349Sobrien
268349Sobrien#------------------------------------------------------------------------------
3267843Sdelphij# $File: sun,v 1.27 2014/04/30 21:41:02 christos Exp $
468349Sobrien# sun:  file(1) magic for Sun machines
568349Sobrien#
668349Sobrien# Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
7267843Sdelphij# releases.  (5.x uses ELF.)  Entries for executables without an
8267843Sdelphij# architecture type, used before the 68020-based Sun-3's came out,
9267843Sdelphij# are in aout, as they're indistinguishable from other big-endian
10267843Sdelphij# 32-bit a.out files.
1168349Sobrien#
12267843Sdelphij0	belong&077777777	0600413		a.out SunOS SPARC demand paged
1368349Sobrien>0	byte		&0x80
1468349Sobrien>>20	belong		<4096		shared library
1568349Sobrien>>20	belong		=4096		dynamically linked executable
1668349Sobrien>>20	belong		>4096		dynamically linked executable
1768349Sobrien>0	byte		^0x80		executable
1868349Sobrien>16	belong		>0		not stripped
19169942Sobrien
20267843Sdelphij0	belong&077777777	0600410		a.out SunOS SPARC pure
2168349Sobrien>0	byte		&0x80		dynamically linked executable
2268349Sobrien>0	byte		^0x80		executable
2368349Sobrien>16	belong		>0		not stripped
24169942Sobrien
25267843Sdelphij0	belong&077777777	0600407		a.out SunOS SPARC
2668349Sobrien>0	byte		&0x80		dynamically linked executable
2768349Sobrien>0	byte		^0x80		executable
2868349Sobrien>16	belong		>0		not stripped
2968349Sobrien
30267843Sdelphij0	belong&077777777	0400413		a.out SunOS mc68020 demand paged
3168349Sobrien>0	byte		&0x80
3268349Sobrien>>20	belong		<4096		shared library
3368349Sobrien>>20	belong		=4096		dynamically linked executable
3468349Sobrien>>20	belong		>4096		dynamically linked executable
35169942Sobrien>0	byte		^0x80		executable
3668349Sobrien>16	belong		>0		not stripped
37169942Sobrien
38267843Sdelphij0	belong&077777777	0400410		a.out SunOS mc68020 pure
3968349Sobrien>0	byte		&0x80		dynamically linked executable
4068349Sobrien>0	byte		^0x80		executable
4168349Sobrien>16	belong		>0		not stripped
42169942Sobrien
43267843Sdelphij0	belong&077777777	0400407		a.out SunOS mc68020
4468349Sobrien>0	byte		&0x80		dynamically linked executable
4568349Sobrien>0	byte		^0x80		executable
4668349Sobrien>16	belong		>0		not stripped
4768349Sobrien
48267843Sdelphij0	belong&077777777	0200413		a.out SunOS mc68010 demand paged
4968349Sobrien>0	byte		&0x80
5068349Sobrien>>20	belong		<4096		shared library
5168349Sobrien>>20	belong		=4096		dynamically linked executable
5268349Sobrien>>20	belong		>4096		dynamically linked executable
53169942Sobrien>0	byte		^0x80		executable
5468349Sobrien>16	belong		>0		not stripped
55169942Sobrien
56267843Sdelphij0	belong&077777777	0200410		a.out SunOS mc68010 pure
5768349Sobrien>0	byte		&0x80		dynamically linked executable
5868349Sobrien>0	byte		^0x80		executable
5968349Sobrien>16	belong		>0		not stripped
60169942Sobrien
61267843Sdelphij0	belong&077777777	0200407		a.out SunOS mc68010
6268349Sobrien>0	byte		&0x80		dynamically linked executable
6368349Sobrien>0	byte		^0x80		executable
6468349Sobrien>16	belong		>0		not stripped
6568349Sobrien
6668349Sobrien#
6768349Sobrien# Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
6868349Sobrien# binary executed in compatibility mode under SunOS 5.x".
6968349Sobrien#
7068349Sobrien0	belong		0x080456	SunOS core file
7168349Sobrien>4	belong		432		(SPARC)
7268349Sobrien>>132	string		>\0		from '%s'
7368349Sobrien>>116	belong		=3		(quit)
7468349Sobrien>>116	belong		=4		(illegal instruction)
7568349Sobrien>>116	belong		=5		(trace trap)
7668349Sobrien>>116	belong		=6		(abort)
7768349Sobrien>>116	belong		=7		(emulator trap)
7868349Sobrien>>116	belong		=8		(arithmetic exception)
7968349Sobrien>>116	belong		=9		(kill)
8068349Sobrien>>116	belong		=10		(bus error)
8168349Sobrien>>116	belong		=11		(segmentation violation)
8268349Sobrien>>116	belong		=12		(bad argument to system call)
8368349Sobrien>>116	belong		=29		(resource lost)
8468349Sobrien>>120	belong		x		(T=%dK,
8568349Sobrien>>124	belong		x		D=%dK,
8668349Sobrien>>128	belong		x		S=%dK)
8768349Sobrien>4	belong		826		(68K)
8868349Sobrien>>128	string		>\0		from '%s'
8968349Sobrien>4	belong		456		(SPARC 4.x BCP)
9068349Sobrien>>152	string		>\0		from '%s'
9168349Sobrien# Sun SunPC
9268349Sobrien0	long		0xfa33c08e	SunPC 4.0 Hard Disk
9368349Sobrien0	string		#SUNPC_CONFIG	SunPC 4.0 Properties Values
94267843Sdelphij# Sun snoop (see RFC 1761, which describes the capture file format,
95267843Sdelphij# RFC 3827, which describes some additional datalink types, and
96267843Sdelphij# http://www.iana.org/assignments/snoop-datalink-types/snoop-datalink-types.xml,
97267843Sdelphij# which is the IANA registry of Snoop datalink types)
9868349Sobrien#
9968349Sobrien0	string		snoop		Snoop capture file
100267843Sdelphij>8	belong		>0		- version %d
10168349Sobrien>12	belong		0		(IEEE 802.3)
10268349Sobrien>12	belong		1		(IEEE 802.4)
10368349Sobrien>12	belong		2		(IEEE 802.5)
10468349Sobrien>12	belong		3		(IEEE 802.6)
10568349Sobrien>12	belong		4		(Ethernet)
10668349Sobrien>12	belong		5		(HDLC)
10768349Sobrien>12	belong		6		(Character synchronous)
10868349Sobrien>12	belong		7		(IBM channel-to-channel adapter)
10968349Sobrien>12	belong		8		(FDDI)
110267843Sdelphij>12	belong		9		(Other)
111267843Sdelphij>12	belong		10		(type %d)
112267843Sdelphij>12	belong		11		(type %d)
113267843Sdelphij>12	belong		12		(type %d)
114267843Sdelphij>12	belong		13		(type %d)
115267843Sdelphij>12	belong		14		(type %d)
116267843Sdelphij>12	belong		15		(type %d)
117267843Sdelphij>12	belong		16		(Fibre Channel)
118267843Sdelphij>12	belong		17		(ATM)
119267843Sdelphij>12	belong		18		(ATM Classical IP)
120267843Sdelphij>12	belong		19		(type %d)
121267843Sdelphij>12	belong		20		(type %d)
122267843Sdelphij>12	belong		21		(type %d)
123267843Sdelphij>12	belong		22		(type %d)
124267843Sdelphij>12	belong		23		(type %d)
125267843Sdelphij>12	belong		24		(type %d)
126267843Sdelphij>12	belong		25		(type %d)
127267843Sdelphij>12	belong		26		(IP over Infiniband)
128267843Sdelphij>12	belong		>26		(type %d)
129133359Sobrien
130133359Sobrien#---------------------------------------------------------------------------
131133359Sobrien# The following entries have been tested by Duncan Laurie <duncan@sun.com> (a
132133359Sobrien# lead Sun/Cobalt developer) who agrees that they are good and worthy of
133133359Sobrien# inclusion.
13468349Sobrien
135133359Sobrien# Boot ROM images for Sun/Cobalt Linux server appliances
136133359Sobrien0       string  Cobalt\ Networks\ Inc.\nFirmware\ v     Paged COBALT boot rom
137133359Sobrien>38     string x        V%.4s
138133359Sobrien
139133359Sobrien# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
140133359Sobrien# at the very end where file(1) can't get it.
141133359Sobrien0       string CRfs     COBALT boot rom data (Flat boot rom or file system)
142