xref: /freebsd/contrib/file/magic/Magdir/sun (revision 48c779cd)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*48c779cdSXin LI# $File: sun,v 1.28 2019/04/19 00:42:27 christos Exp $
4b6cee71dSXin LI# sun:  file(1) magic for Sun machines
5b6cee71dSXin LI#
6b6cee71dSXin LI# Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
7b6cee71dSXin LI# releases.  (5.x uses ELF.)  Entries for executables without an
8b6cee71dSXin LI# architecture type, used before the 68020-based Sun-3's came out,
9b6cee71dSXin LI# are in aout, as they're indistinguishable from other big-endian
10b6cee71dSXin LI# 32-bit a.out files.
11b6cee71dSXin LI#
12b6cee71dSXin LI0	belong&077777777	0600413		a.out SunOS SPARC demand paged
13b6cee71dSXin LI>0	byte		&0x80
14b6cee71dSXin LI>>20	belong		<4096		shared library
15b6cee71dSXin LI>>20	belong		=4096		dynamically linked executable
16b6cee71dSXin LI>>20	belong		>4096		dynamically linked executable
17b6cee71dSXin LI>0	byte		^0x80		executable
18b6cee71dSXin LI>16	belong		>0		not stripped
19b6cee71dSXin LI
20b6cee71dSXin LI0	belong&077777777	0600410		a.out SunOS SPARC pure
21b6cee71dSXin LI>0	byte		&0x80		dynamically linked executable
22b6cee71dSXin LI>0	byte		^0x80		executable
23b6cee71dSXin LI>16	belong		>0		not stripped
24b6cee71dSXin LI
25b6cee71dSXin LI0	belong&077777777	0600407		a.out SunOS SPARC
26b6cee71dSXin LI>0	byte		&0x80		dynamically linked executable
27b6cee71dSXin LI>0	byte		^0x80		executable
28b6cee71dSXin LI>16	belong		>0		not stripped
29b6cee71dSXin LI
30b6cee71dSXin LI0	belong&077777777	0400413		a.out SunOS mc68020 demand paged
31b6cee71dSXin LI>0	byte		&0x80
32b6cee71dSXin LI>>20	belong		<4096		shared library
33b6cee71dSXin LI>>20	belong		=4096		dynamically linked executable
34b6cee71dSXin LI>>20	belong		>4096		dynamically linked executable
35b6cee71dSXin LI>0	byte		^0x80		executable
36b6cee71dSXin LI>16	belong		>0		not stripped
37b6cee71dSXin LI
38b6cee71dSXin LI0	belong&077777777	0400410		a.out SunOS mc68020 pure
39b6cee71dSXin LI>0	byte		&0x80		dynamically linked executable
40b6cee71dSXin LI>0	byte		^0x80		executable
41b6cee71dSXin LI>16	belong		>0		not stripped
42b6cee71dSXin LI
43b6cee71dSXin LI0	belong&077777777	0400407		a.out SunOS mc68020
44b6cee71dSXin LI>0	byte		&0x80		dynamically linked executable
45b6cee71dSXin LI>0	byte		^0x80		executable
46b6cee71dSXin LI>16	belong		>0		not stripped
47b6cee71dSXin LI
48b6cee71dSXin LI0	belong&077777777	0200413		a.out SunOS mc68010 demand paged
49b6cee71dSXin LI>0	byte		&0x80
50b6cee71dSXin LI>>20	belong		<4096		shared library
51b6cee71dSXin LI>>20	belong		=4096		dynamically linked executable
52b6cee71dSXin LI>>20	belong		>4096		dynamically linked executable
53b6cee71dSXin LI>0	byte		^0x80		executable
54b6cee71dSXin LI>16	belong		>0		not stripped
55b6cee71dSXin LI
56b6cee71dSXin LI0	belong&077777777	0200410		a.out SunOS mc68010 pure
57b6cee71dSXin LI>0	byte		&0x80		dynamically linked executable
58b6cee71dSXin LI>0	byte		^0x80		executable
59b6cee71dSXin LI>16	belong		>0		not stripped
60b6cee71dSXin LI
61b6cee71dSXin LI0	belong&077777777	0200407		a.out SunOS mc68010
62b6cee71dSXin LI>0	byte		&0x80		dynamically linked executable
63b6cee71dSXin LI>0	byte		^0x80		executable
64b6cee71dSXin LI>16	belong		>0		not stripped
65b6cee71dSXin LI
66b6cee71dSXin LI#
67b6cee71dSXin LI# Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
68b6cee71dSXin LI# binary executed in compatibility mode under SunOS 5.x".
69b6cee71dSXin LI#
70b6cee71dSXin LI0	belong		0x080456	SunOS core file
71b6cee71dSXin LI>4	belong		432		(SPARC)
72b6cee71dSXin LI>>132	string		>\0		from '%s'
73b6cee71dSXin LI>>116	belong		=3		(quit)
74b6cee71dSXin LI>>116	belong		=4		(illegal instruction)
75b6cee71dSXin LI>>116	belong		=5		(trace trap)
76b6cee71dSXin LI>>116	belong		=6		(abort)
77b6cee71dSXin LI>>116	belong		=7		(emulator trap)
78b6cee71dSXin LI>>116	belong		=8		(arithmetic exception)
79b6cee71dSXin LI>>116	belong		=9		(kill)
80b6cee71dSXin LI>>116	belong		=10		(bus error)
81b6cee71dSXin LI>>116	belong		=11		(segmentation violation)
82b6cee71dSXin LI>>116	belong		=12		(bad argument to system call)
83b6cee71dSXin LI>>116	belong		=29		(resource lost)
84b6cee71dSXin LI>>120	belong		x		(T=%dK,
85b6cee71dSXin LI>>124	belong		x		D=%dK,
86b6cee71dSXin LI>>128	belong		x		S=%dK)
87b6cee71dSXin LI>4	belong		826		(68K)
88b6cee71dSXin LI>>128	string		>\0		from '%s'
89b6cee71dSXin LI>4	belong		456		(SPARC 4.x BCP)
90b6cee71dSXin LI>>152	string		>\0		from '%s'
91b6cee71dSXin LI# Sun SunPC
92b6cee71dSXin LI0	long		0xfa33c08e	SunPC 4.0 Hard Disk
93b6cee71dSXin LI0	string		#SUNPC_CONFIG	SunPC 4.0 Properties Values
94b6cee71dSXin LI# Sun snoop (see RFC 1761, which describes the capture file format,
95b6cee71dSXin LI# RFC 3827, which describes some additional datalink types, and
96*48c779cdSXin LI# https://www.iana.org/assignments/snoop-datalink-types/snoop-datalink-types.xml,
97b6cee71dSXin LI# which is the IANA registry of Snoop datalink types)
98b6cee71dSXin LI#
99b6cee71dSXin LI0	string		snoop		Snoop capture file
100b6cee71dSXin LI>8	belong		>0		- version %d
101b6cee71dSXin LI>12	belong		0		(IEEE 802.3)
102b6cee71dSXin LI>12	belong		1		(IEEE 802.4)
103b6cee71dSXin LI>12	belong		2		(IEEE 802.5)
104b6cee71dSXin LI>12	belong		3		(IEEE 802.6)
105b6cee71dSXin LI>12	belong		4		(Ethernet)
106b6cee71dSXin LI>12	belong		5		(HDLC)
107b6cee71dSXin LI>12	belong		6		(Character synchronous)
108b6cee71dSXin LI>12	belong		7		(IBM channel-to-channel adapter)
109b6cee71dSXin LI>12	belong		8		(FDDI)
110b6cee71dSXin LI>12	belong		9		(Other)
111b6cee71dSXin LI>12	belong		10		(type %d)
112b6cee71dSXin LI>12	belong		11		(type %d)
113b6cee71dSXin LI>12	belong		12		(type %d)
114b6cee71dSXin LI>12	belong		13		(type %d)
115b6cee71dSXin LI>12	belong		14		(type %d)
116b6cee71dSXin LI>12	belong		15		(type %d)
117b6cee71dSXin LI>12	belong		16		(Fibre Channel)
118b6cee71dSXin LI>12	belong		17		(ATM)
119b6cee71dSXin LI>12	belong		18		(ATM Classical IP)
120b6cee71dSXin LI>12	belong		19		(type %d)
121b6cee71dSXin LI>12	belong		20		(type %d)
122b6cee71dSXin LI>12	belong		21		(type %d)
123b6cee71dSXin LI>12	belong		22		(type %d)
124b6cee71dSXin LI>12	belong		23		(type %d)
125b6cee71dSXin LI>12	belong		24		(type %d)
126b6cee71dSXin LI>12	belong		25		(type %d)
127b6cee71dSXin LI>12	belong		26		(IP over Infiniband)
128b6cee71dSXin LI>12	belong		>26		(type %d)
129b6cee71dSXin LI
130b6cee71dSXin LI#---------------------------------------------------------------------------
131b6cee71dSXin LI# The following entries have been tested by Duncan Laurie <duncan@sun.com> (a
132b6cee71dSXin LI# lead Sun/Cobalt developer) who agrees that they are good and worthy of
133b6cee71dSXin LI# inclusion.
134b6cee71dSXin LI
135b6cee71dSXin LI# Boot ROM images for Sun/Cobalt Linux server appliances
136b6cee71dSXin LI0       string  Cobalt\ Networks\ Inc.\nFirmware\ v     Paged COBALT boot rom
137b6cee71dSXin LI>38     string x        V%.4s
138b6cee71dSXin LI
139b6cee71dSXin LI# New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
140b6cee71dSXin LI# at the very end where file(1) can't get it.
141b6cee71dSXin LI0       string CRfs     COBALT boot rom data (Flat boot rom or file system)
142