xref: /dflybsd-src/contrib/file/magic/Magdir/netbsd (revision 82c5fa3ed529d94b87e8a4447aaa75bcff807696)
1327e51cbSPeter Avalos
2327e51cbSPeter Avalos#------------------------------------------------------------------------------
3*82c5fa3eSPeter Avalos# $File: netbsd,v 1.22 2014/12/08 20:53:52 christos Exp $
4327e51cbSPeter Avalos# netbsd:  file(1) magic for NetBSD objects
5327e51cbSPeter Avalos#
6327e51cbSPeter Avalos# All new-style magic numbers are in network byte order.
7e8af9738SPeter Avalos# The old-style magic numbers are indistinguishable from the same magic
8e8af9738SPeter Avalos# numbers used in other systems, and are handled, for all those systems,
9e8af9738SPeter Avalos# in aout.
10327e51cbSPeter Avalos#
11327e51cbSPeter Avalos
12327e51cbSPeter Avalos0	belong&0377777777	041400413	a.out NetBSD/i386 demand paged
13327e51cbSPeter Avalos>0	byte			&0x80
14327e51cbSPeter Avalos>>20	lelong			<4096		shared library
15327e51cbSPeter Avalos>>20	lelong			=4096		dynamically linked executable
16327e51cbSPeter Avalos>>20	lelong			>4096		dynamically linked executable
17327e51cbSPeter Avalos>0	byte			^0x80		executable
18327e51cbSPeter Avalos>16	lelong			>0		not stripped
19327e51cbSPeter Avalos0	belong&0377777777	041400410	a.out NetBSD/i386 pure
20327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
21327e51cbSPeter Avalos>0	byte			^0x80		executable
22327e51cbSPeter Avalos>16	lelong			>0		not stripped
23327e51cbSPeter Avalos0	belong&0377777777	041400407	a.out NetBSD/i386
24327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
25327e51cbSPeter Avalos>0	byte			^0x80
26327e51cbSPeter Avalos>>0	byte			&0x40		position independent
27327e51cbSPeter Avalos>>20	lelong			!0		executable
28327e51cbSPeter Avalos>>20	lelong			=0		object file
29327e51cbSPeter Avalos>16	lelong			>0		not stripped
30327e51cbSPeter Avalos0	belong&0377777777	041400507	a.out NetBSD/i386 core
31327e51cbSPeter Avalos>12	string			>\0		from '%s'
32327e51cbSPeter Avalos>32	lelong			!0		(signal %d)
33327e51cbSPeter Avalos
34327e51cbSPeter Avalos0	belong&0377777777	041600413	a.out NetBSD/m68k demand paged
35327e51cbSPeter Avalos>0	byte			&0x80
36327e51cbSPeter Avalos>>20	belong			<8192		shared library
37327e51cbSPeter Avalos>>20	belong			=8192		dynamically linked executable
38327e51cbSPeter Avalos>>20	belong			>8192		dynamically linked executable
39327e51cbSPeter Avalos>0	byte			^0x80		executable
40327e51cbSPeter Avalos>16	belong			>0		not stripped
41327e51cbSPeter Avalos0	belong&0377777777	041600410	a.out NetBSD/m68k pure
42327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
43327e51cbSPeter Avalos>0	byte			^0x80		executable
44327e51cbSPeter Avalos>16	belong			>0		not stripped
45327e51cbSPeter Avalos0	belong&0377777777	041600407	a.out NetBSD/m68k
46327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
47327e51cbSPeter Avalos>0	byte			^0x80
48327e51cbSPeter Avalos>>0	byte			&0x40		position independent
49327e51cbSPeter Avalos>>20	belong			!0		executable
50327e51cbSPeter Avalos>>20	belong			=0		object file
51327e51cbSPeter Avalos>16	belong			>0		not stripped
52327e51cbSPeter Avalos0	belong&0377777777	041600507	a.out NetBSD/m68k core
53327e51cbSPeter Avalos>12	string			>\0		from '%s'
54327e51cbSPeter Avalos>32	belong			!0		(signal %d)
55327e51cbSPeter Avalos
56327e51cbSPeter Avalos0	belong&0377777777	042000413	a.out NetBSD/m68k4k demand paged
57327e51cbSPeter Avalos>0	byte			&0x80
58327e51cbSPeter Avalos>>20	belong			<4096		shared library
59327e51cbSPeter Avalos>>20	belong			=4096		dynamically linked executable
60327e51cbSPeter Avalos>>20	belong			>4096		dynamically linked executable
61327e51cbSPeter Avalos>0	byte			^0x80		executable
62327e51cbSPeter Avalos>16	belong			>0		not stripped
63327e51cbSPeter Avalos0	belong&0377777777	042000410	a.out NetBSD/m68k4k pure
64327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
65327e51cbSPeter Avalos>0	byte			^0x80		executable
66327e51cbSPeter Avalos>16	belong			>0		not stripped
67327e51cbSPeter Avalos0	belong&0377777777	042000407	a.out NetBSD/m68k4k
68327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
69327e51cbSPeter Avalos>0	byte			^0x80
70327e51cbSPeter Avalos>>0	byte			&0x40		position independent
71327e51cbSPeter Avalos>>20	belong			!0		executable
72327e51cbSPeter Avalos>>20	belong			=0		object file
73327e51cbSPeter Avalos>16	belong			>0		not stripped
74327e51cbSPeter Avalos0	belong&0377777777	042000507	a.out NetBSD/m68k4k core
75327e51cbSPeter Avalos>12	string			>\0		from '%s'
76327e51cbSPeter Avalos>32	belong			!0		(signal %d)
77327e51cbSPeter Avalos
78327e51cbSPeter Avalos0	belong&0377777777	042200413	a.out NetBSD/ns32532 demand paged
79327e51cbSPeter Avalos>0	byte			&0x80
80327e51cbSPeter Avalos>>20	lelong			<4096		shared library
81327e51cbSPeter Avalos>>20	lelong			=4096		dynamically linked executable
82327e51cbSPeter Avalos>>20	lelong			>4096		dynamically linked executable
83327e51cbSPeter Avalos>0	byte			^0x80		executable
84327e51cbSPeter Avalos>16	lelong			>0		not stripped
85327e51cbSPeter Avalos0	belong&0377777777	042200410	a.out NetBSD/ns32532 pure
86327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
87327e51cbSPeter Avalos>0	byte			^0x80		executable
88327e51cbSPeter Avalos>16	lelong			>0		not stripped
89327e51cbSPeter Avalos0	belong&0377777777	042200407	a.out NetBSD/ns32532
90327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
91327e51cbSPeter Avalos>0	byte			^0x80
92327e51cbSPeter Avalos>>0	byte			&0x40		position independent
93327e51cbSPeter Avalos>>20	lelong			!0		executable
94327e51cbSPeter Avalos>>20	lelong			=0		object file
95327e51cbSPeter Avalos>16	lelong			>0		not stripped
96327e51cbSPeter Avalos0	belong&0377777777	042200507	a.out NetBSD/ns32532 core
97327e51cbSPeter Avalos>12	string			>\0		from '%s'
98327e51cbSPeter Avalos>32	lelong			!0		(signal %d)
99327e51cbSPeter Avalos
100327e51cbSPeter Avalos0	belong&0377777777	045200507	a.out NetBSD/powerpc core
101327e51cbSPeter Avalos>12	string			>\0		from '%s'
102327e51cbSPeter Avalos
103*82c5fa3eSPeter Avalos0	belong&0377777777	042400413	a.out NetBSD/SPARC demand paged
104327e51cbSPeter Avalos>0	byte			&0x80
105327e51cbSPeter Avalos>>20	belong			<8192		shared library
106327e51cbSPeter Avalos>>20	belong			=8192		dynamically linked executable
107327e51cbSPeter Avalos>>20	belong			>8192		dynamically linked executable
108327e51cbSPeter Avalos>0	byte			^0x80		executable
109327e51cbSPeter Avalos>16	belong			>0		not stripped
110*82c5fa3eSPeter Avalos0	belong&0377777777	042400410	a.out NetBSD/SPARC pure
111327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
112327e51cbSPeter Avalos>0	byte			^0x80		executable
113327e51cbSPeter Avalos>16	belong			>0		not stripped
114*82c5fa3eSPeter Avalos0	belong&0377777777	042400407	a.out NetBSD/SPARC
115327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
116327e51cbSPeter Avalos>0	byte			^0x80
117327e51cbSPeter Avalos>>0	byte			&0x40		position independent
118327e51cbSPeter Avalos>>20	belong			!0		executable
119327e51cbSPeter Avalos>>20	belong			=0		object file
120327e51cbSPeter Avalos>16	belong			>0		not stripped
121*82c5fa3eSPeter Avalos0	belong&0377777777	042400507	a.out NetBSD/SPARC core
122327e51cbSPeter Avalos>12	string			>\0		from '%s'
123327e51cbSPeter Avalos>32	belong			!0		(signal %d)
124327e51cbSPeter Avalos
125327e51cbSPeter Avalos0	belong&0377777777	042600413	a.out NetBSD/pmax demand paged
126327e51cbSPeter Avalos>0	byte			&0x80
127327e51cbSPeter Avalos>>20	lelong			<4096		shared library
128327e51cbSPeter Avalos>>20	lelong			=4096		dynamically linked executable
129327e51cbSPeter Avalos>>20	lelong			>4096		dynamically linked executable
130327e51cbSPeter Avalos>0	byte			^0x80		executable
131327e51cbSPeter Avalos>16	lelong			>0		not stripped
132327e51cbSPeter Avalos0	belong&0377777777	042600410	a.out NetBSD/pmax pure
133327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
134327e51cbSPeter Avalos>0	byte			^0x80		executable
135327e51cbSPeter Avalos>16	lelong			>0		not stripped
136327e51cbSPeter Avalos0	belong&0377777777	042600407	a.out NetBSD/pmax
137327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
138327e51cbSPeter Avalos>0	byte			^0x80
139327e51cbSPeter Avalos>>0	byte			&0x40		position independent
140327e51cbSPeter Avalos>>20	lelong			!0		executable
141327e51cbSPeter Avalos>>20	lelong			=0		object file
142327e51cbSPeter Avalos>16	lelong			>0		not stripped
143327e51cbSPeter Avalos0	belong&0377777777	042600507	a.out NetBSD/pmax core
144327e51cbSPeter Avalos>12	string			>\0		from '%s'
145327e51cbSPeter Avalos>32	lelong			!0		(signal %d)
146327e51cbSPeter Avalos
147327e51cbSPeter Avalos0	belong&0377777777	043000413	a.out NetBSD/vax 1k demand paged
148327e51cbSPeter Avalos>0	byte			&0x80
149327e51cbSPeter Avalos>>20	lelong			<4096		shared library
150327e51cbSPeter Avalos>>20	lelong			=4096		dynamically linked executable
151327e51cbSPeter Avalos>>20	lelong			>4096		dynamically linked executable
152327e51cbSPeter Avalos>0	byte			^0x80		executable
153327e51cbSPeter Avalos>16	lelong			>0		not stripped
154327e51cbSPeter Avalos0	belong&0377777777	043000410	a.out NetBSD/vax 1k pure
155327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
156327e51cbSPeter Avalos>0	byte			^0x80		executable
157327e51cbSPeter Avalos>16	lelong			>0		not stripped
158327e51cbSPeter Avalos0	belong&0377777777	043000407	a.out NetBSD/vax 1k
159327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
160327e51cbSPeter Avalos>0	byte			^0x80
161327e51cbSPeter Avalos>>0	byte			&0x40		position independent
162327e51cbSPeter Avalos>>20	lelong			!0		executable
163327e51cbSPeter Avalos>>20	lelong			=0		object file
164327e51cbSPeter Avalos>16	lelong			>0		not stripped
165327e51cbSPeter Avalos0	belong&0377777777	043000507	a.out NetBSD/vax 1k core
166327e51cbSPeter Avalos>12	string			>\0		from '%s'
167327e51cbSPeter Avalos>32	lelong			!0		(signal %d)
168327e51cbSPeter Avalos
169327e51cbSPeter Avalos0	belong&0377777777	045400413	a.out NetBSD/vax 4k demand paged
170327e51cbSPeter Avalos>0	byte			&0x80
171327e51cbSPeter Avalos>>20	lelong			<4096		shared library
172327e51cbSPeter Avalos>>20	lelong			=4096		dynamically linked executable
173327e51cbSPeter Avalos>>20	lelong			>4096		dynamically linked executable
174327e51cbSPeter Avalos>0	byte			^0x80		executable
175327e51cbSPeter Avalos>16	lelong			>0		not stripped
176327e51cbSPeter Avalos0	belong&0377777777	045400410	a.out NetBSD/vax 4k pure
177327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
178327e51cbSPeter Avalos>0	byte			^0x80		executable
179327e51cbSPeter Avalos>16	lelong			>0		not stripped
180327e51cbSPeter Avalos0	belong&0377777777	045400407	a.out NetBSD/vax 4k
181327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
182327e51cbSPeter Avalos>0	byte			^0x80
183327e51cbSPeter Avalos>>0	byte			&0x40		position independent
184327e51cbSPeter Avalos>>20	lelong			!0		executable
185327e51cbSPeter Avalos>>20	lelong			=0		object file
186327e51cbSPeter Avalos>16	lelong			>0		not stripped
187327e51cbSPeter Avalos0	belong&0377777777	045400507	a.out NetBSD/vax 4k core
188327e51cbSPeter Avalos>12	string			>\0		from '%s'
189327e51cbSPeter Avalos>32	lelong			!0		(signal %d)
190327e51cbSPeter Avalos
191327e51cbSPeter Avalos# NetBSD/alpha does not support (and has never supported) a.out objects,
192327e51cbSPeter Avalos# so no rules are provided for them.  NetBSD/alpha ELF objects are
193327e51cbSPeter Avalos# dealt with in "elf".
194327e51cbSPeter Avalos0	lelong		0x00070185		ECOFF NetBSD/alpha binary
195327e51cbSPeter Avalos>10	leshort		0x0001			not stripped
196327e51cbSPeter Avalos>10	leshort		0x0000			stripped
197327e51cbSPeter Avalos0	belong&0377777777	043200507	a.out NetBSD/alpha core
198327e51cbSPeter Avalos>12	string			>\0		from '%s'
199327e51cbSPeter Avalos>32	lelong			!0		(signal %d)
200327e51cbSPeter Avalos
201327e51cbSPeter Avalos0	belong&0377777777	043400413	a.out NetBSD/mips demand paged
202327e51cbSPeter Avalos>0	byte			&0x80
203327e51cbSPeter Avalos>>20	belong			<8192		shared library
204327e51cbSPeter Avalos>>20	belong			=8192		dynamically linked executable
205327e51cbSPeter Avalos>>20	belong			>8192		dynamically linked executable
206327e51cbSPeter Avalos>0	byte			^0x80		executable
207327e51cbSPeter Avalos>16	belong			>0		not stripped
208327e51cbSPeter Avalos0	belong&0377777777	043400410	a.out NetBSD/mips pure
209327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
210327e51cbSPeter Avalos>0	byte			^0x80		executable
211327e51cbSPeter Avalos>16	belong			>0		not stripped
212327e51cbSPeter Avalos0	belong&0377777777	043400407	a.out NetBSD/mips
213327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
214327e51cbSPeter Avalos>0	byte			^0x80
215327e51cbSPeter Avalos>>0	byte			&0x40		position independent
216327e51cbSPeter Avalos>>20	belong			!0		executable
217327e51cbSPeter Avalos>>20	belong			=0		object file
218327e51cbSPeter Avalos>16	belong			>0		not stripped
219327e51cbSPeter Avalos0	belong&0377777777	043400507	a.out NetBSD/mips core
220327e51cbSPeter Avalos>12	string			>\0		from '%s'
221327e51cbSPeter Avalos>32	belong			!0		(signal %d)
222327e51cbSPeter Avalos
223327e51cbSPeter Avalos0	belong&0377777777	043600413	a.out NetBSD/arm32 demand paged
224327e51cbSPeter Avalos>0	byte			&0x80
225327e51cbSPeter Avalos>>20	lelong			<4096		shared library
226327e51cbSPeter Avalos>>20	lelong			=4096		dynamically linked executable
227327e51cbSPeter Avalos>>20	lelong			>4096		dynamically linked executable
228327e51cbSPeter Avalos>0	byte			^0x80		executable
229327e51cbSPeter Avalos>16	lelong			>0		not stripped
230327e51cbSPeter Avalos0	belong&0377777777	043600410	a.out NetBSD/arm32 pure
231327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
232327e51cbSPeter Avalos>0	byte			^0x80		executable
233327e51cbSPeter Avalos>16	lelong			>0		not stripped
234327e51cbSPeter Avalos0	belong&0377777777	043600407	a.out NetBSD/arm32
235327e51cbSPeter Avalos>0	byte			&0x80		dynamically linked executable
236327e51cbSPeter Avalos>0	byte			^0x80
237327e51cbSPeter Avalos>>0	byte			&0x40		position independent
238327e51cbSPeter Avalos>>20	lelong			!0		executable
239327e51cbSPeter Avalos>>20	lelong			=0		object file
240327e51cbSPeter Avalos>16	lelong			>0		not stripped
241327e51cbSPeter Avalos# NetBSD/arm26 has always used ELF objects, but it shares a core file
242327e51cbSPeter Avalos# format with NetBSD/arm32.
243327e51cbSPeter Avalos0	belong&0377777777	043600507	a.out NetBSD/arm core
244327e51cbSPeter Avalos>12	string			>\0		from '%s'
245327e51cbSPeter Avalos>32	lelong			!0		(signal %d)
2469f86ab30SPeter Avalos
2479f86ab30SPeter Avalos# Kernel core dump format
2489f86ab30SPeter Avalos0	belong&0x0000ffff 0x00008fca	NetBSD kernel core file
2499f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00000000	\b, Unknown
250*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00010000	\b, sun 68010/68020
2519f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00020000	\b, sun 68020
2529f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00640000	\b, 386 PC
2539f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00860000	\b, i386 BSD
2549f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00870000	\b, m68k BSD (8K pages)
2559f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00880000	\b, m68k BSD (4K pages)
2569f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00890000	\b, ns32532 BSD
257*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x008a0000	\b, SPARC/32 BSD
2589f86ab30SPeter Avalos>0	belong&0x03ff0000 0x008b0000	\b, pmax BSD
2599f86ab30SPeter Avalos>0	belong&0x03ff0000 0x008c0000	\b, vax BSD (1K pages)
2609f86ab30SPeter Avalos>0	belong&0x03ff0000 0x008d0000	\b, alpha BSD
2619f86ab30SPeter Avalos>0	belong&0x03ff0000 0x008e0000	\b, mips BSD (Big Endian)
2629f86ab30SPeter Avalos>0	belong&0x03ff0000 0x008f0000	\b, arm6 BSD
2639f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00900000	\b, m68k BSD (2K pages)
2649f86ab30SPeter Avalos>0	belong&0x03ff0000 0x00910000	\b, sh3 BSD
265*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00950000	\b, ppc BSD (Big Endian)
266*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00960000	\b, vax BSD (4K pages)
267*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00970000	\b, mips1 BSD
268*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00980000	\b, mips2 BSD
269*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00990000	\b, m88k BSD
270*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00920000	\b, parisc BSD
271*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x009b0000	\b, sh5/64 BSD
272*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x009c0000	\b, SPARC/64 BSD
273*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x009d0000	\b, amd64 BSD
274*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x009e0000	\b, sh5/32 BSD
275*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x009f0000	\b, ia64 BSD
276*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00b70000	\b, aarch64 BSD
277*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00b80000	\b, or1k BSD
278*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00b90000	\b, Risk-V BSD
279*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x00c80000	\b, hp200 BSD
280*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x012c0000	\b, hp300 BSD
281*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x020b0000	\b, hp800 HP-UX
282*82c5fa3eSPeter Avalos>0	belong&0x03ff0000 0x020c0000	\b, hp200/hp300 HP-UX
2839f86ab30SPeter Avalos>0	belong&0xfc000000 0x04000000	\b, CPU
2849f86ab30SPeter Avalos>0	belong&0xfc000000 0x08000000	\b, DATA
2859f86ab30SPeter Avalos>0	belong&0xfc000000 0x10000000	\b, STACK
2869f86ab30SPeter Avalos>4	leshort	x			\b, (headersize = %d
2879f86ab30SPeter Avalos>6	leshort	x			\b, segmentsize = %d
2889f86ab30SPeter Avalos>6	lelong	x			\b, segments = %d)
289