xref: /netbsd-src/external/bsd/file/dist/magic/magdir/netbsd (revision d0c65b7b4876999db151148ad73648e542d52f29)
11b108b8bSchristos
21b108b8bSchristos#------------------------------------------------------------------------------
3*d0c65b7bSchristos# $File: netbsd,v 1.26 2019/01/01 03:11:23 christos Exp $
41b108b8bSchristos# netbsd:  file(1) magic for NetBSD objects
51b108b8bSchristos#
61b108b8bSchristos# All new-style magic numbers are in network byte order.
752df37c7Schristos# The old-style magic numbers are indistinguishable from the same magic
852df37c7Schristos# numbers used in other systems, and are handled, for all those systems,
952df37c7Schristos# in aout.
101b108b8bSchristos#
111b108b8bSchristos
12bbdfe8aeSchristos0	name	netbsd-detail
13bbdfe8aeSchristos>20	lelong	x		@%#x
14bbdfe8aeSchristos>4	lelong	>0		\b+T=%d
15bbdfe8aeSchristos>8	lelong	>0		\b+D=%d
16bbdfe8aeSchristos>12	lelong	>0		\b+B=%d
17bbdfe8aeSchristos>16	lelong	>0		\b+S=%d
18bbdfe8aeSchristos>24	lelong	>0		\b+TR=%d
19bbdfe8aeSchristos>28	lelong	>0		\b+TD=%d
20bbdfe8aeSchristos
21bbdfe8aeSchristos0	name			netbsd-4096
221b108b8bSchristos>0	byte			&0x80
231b108b8bSchristos>>20	lelong			<4096		shared library
241b108b8bSchristos>>20	lelong			=4096		dynamically linked executable
251b108b8bSchristos>>20	lelong			>4096		dynamically linked executable
261b108b8bSchristos>0	byte			^0x80		executable
271b108b8bSchristos>16	lelong			>0		not stripped
28bbdfe8aeSchristos
29bbdfe8aeSchristos0	name			netbsd-8192
30bbdfe8aeSchristos>0	byte			&0x80
31bbdfe8aeSchristos>>20	lelong			<8192		shared library
32bbdfe8aeSchristos>>20	lelong			=8192		dynamically linked executable
33bbdfe8aeSchristos>>20	lelong			>8192		dynamically linked executable
341b108b8bSchristos>0	byte			^0x80		executable
351b108b8bSchristos>16	lelong			>0		not stripped
36bbdfe8aeSchristos>0	use			netbsd-detail
37bbdfe8aeSchristos
38bbdfe8aeSchristos0	name			netbsd-normal
391b108b8bSchristos>0	byte			&0x80		dynamically linked executable
401b108b8bSchristos>0	byte			^0x80
411b108b8bSchristos>>0	byte			&0x40		position independent
421b108b8bSchristos>>20	lelong			!0		executable
431b108b8bSchristos>>20	lelong			=0		object file
441b108b8bSchristos>16	lelong			>0		not stripped
45bbdfe8aeSchristos>0	use			netbsd-detail
46bbdfe8aeSchristos
47bbdfe8aeSchristos0	name			netbsd-pure
48bbdfe8aeSchristos>0	byte			&0x80		dynamically linked executable
49bbdfe8aeSchristos>0	byte			^0x80		executable
50bbdfe8aeSchristos>16	lelong			>0		not stripped
51bbdfe8aeSchristos>0	use			netbsd-detail
52bbdfe8aeSchristos
53bbdfe8aeSchristos0	name			netbsd-core
541b108b8bSchristos>12	string			>\0		from '%s'
551b108b8bSchristos>32	lelong			!0		(signal %d)
561b108b8bSchristos
57bbdfe8aeSchristos0	belong&0377777777	041400413	a.out NetBSD/i386 demand paged
58bbdfe8aeSchristos>0	use			netbsd-4096
59bbdfe8aeSchristos
60bbdfe8aeSchristos0	belong&0377777777	041400410	a.out NetBSD/i386 pure
61bbdfe8aeSchristos>0	use			netbsd-pure
62bbdfe8aeSchristos
63bbdfe8aeSchristos0	belong&0377777777	041400407	a.out NetBSD/i386
64bbdfe8aeSchristos>0	use			netbsd-normal
65bbdfe8aeSchristos
66bbdfe8aeSchristos0	belong&0377777777	041400507	a.out NetBSD/i386 core
67bbdfe8aeSchristos>0	use			netbsd-core
68bbdfe8aeSchristos
691b108b8bSchristos0	belong&0377777777	041600413	a.out NetBSD/m68k demand paged
70bbdfe8aeSchristos>0	use			\^netbsd-8192
71bbdfe8aeSchristos
721b108b8bSchristos0	belong&0377777777	041600410	a.out NetBSD/m68k pure
73bbdfe8aeSchristos>0	use			\^netbsd-pure
74bbdfe8aeSchristos
751b108b8bSchristos0	belong&0377777777	041600407	a.out NetBSD/m68k
76bbdfe8aeSchristos>0	use			\^netbsd-normal
77bbdfe8aeSchristos
781b108b8bSchristos0	belong&0377777777	041600507	a.out NetBSD/m68k core
79bbdfe8aeSchristos>0	use			\^netbsd-core
801b108b8bSchristos
811b108b8bSchristos0	belong&0377777777	042000413	a.out NetBSD/m68k4k demand paged
82bbdfe8aeSchristos>0	use			\^netbsd-4096
83bbdfe8aeSchristos
841b108b8bSchristos0	belong&0377777777	042000410	a.out NetBSD/m68k4k pure
85bbdfe8aeSchristos>0	use			\^netbsd-pure
86bbdfe8aeSchristos
871b108b8bSchristos0	belong&0377777777	042000407	a.out NetBSD/m68k4k
88bbdfe8aeSchristos>0	use			\^netbsd-normal
89bbdfe8aeSchristos
901b108b8bSchristos0	belong&0377777777	042000507	a.out NetBSD/m68k4k core
91bbdfe8aeSchristos>0	use			\^netbsd-core
921b108b8bSchristos
931b108b8bSchristos0	belong&0377777777	042200413	a.out NetBSD/ns32532 demand paged
94bbdfe8aeSchristos>0	use			netbsd-4096
95bbdfe8aeSchristos
961b108b8bSchristos0	belong&0377777777	042200410	a.out NetBSD/ns32532 pure
97bbdfe8aeSchristos>0	use			netbsd-pure
98bbdfe8aeSchristos
991b108b8bSchristos0	belong&0377777777	042200407	a.out NetBSD/ns32532
100bbdfe8aeSchristos>0	use			netbsd-normal
101bbdfe8aeSchristos
1021b108b8bSchristos0	belong&0377777777	042200507	a.out NetBSD/ns32532 core
103bbdfe8aeSchristos>0	use			netbsd-core
1041b108b8bSchristos
1051b108b8bSchristos0	belong&0377777777	045200507	a.out NetBSD/powerpc core
106bbdfe8aeSchristos>0	use			netbsd-core
1071b108b8bSchristos
108012fd133Schristos0	belong&0377777777	042400413	a.out NetBSD/SPARC demand paged
109bbdfe8aeSchristos>0	use			\^netbsd-8192
110bbdfe8aeSchristos
111012fd133Schristos0	belong&0377777777	042400410	a.out NetBSD/SPARC pure
112bbdfe8aeSchristos>0	use			\^netbsd-pure
113bbdfe8aeSchristos
114012fd133Schristos0	belong&0377777777	042400407	a.out NetBSD/SPARC
115bbdfe8aeSchristos>0	use			\^netbsd-normal
116bbdfe8aeSchristos
117012fd133Schristos0	belong&0377777777	042400507	a.out NetBSD/SPARC core
118bbdfe8aeSchristos>0	use			\^netbsd-core
1191b108b8bSchristos
1201b108b8bSchristos0	belong&0377777777	042600413	a.out NetBSD/pmax demand paged
121bbdfe8aeSchristos>0	use			netbsd-4096
122bbdfe8aeSchristos
1231b108b8bSchristos0	belong&0377777777	042600410	a.out NetBSD/pmax pure
124bbdfe8aeSchristos>0	use			\^netbsd-pure
125bbdfe8aeSchristos
1261b108b8bSchristos0	belong&0377777777	042600407	a.out NetBSD/pmax
127bbdfe8aeSchristos>0	use			netbsd-normal
128bbdfe8aeSchristos
1291b108b8bSchristos0	belong&0377777777	042600507	a.out NetBSD/pmax core
130bbdfe8aeSchristos>0	use			netbsd-core
1311b108b8bSchristos
1321b108b8bSchristos0	belong&0377777777	043000413	a.out NetBSD/vax 1k demand paged
133bbdfe8aeSchristos>0	use			netbsd-4096
134bbdfe8aeSchristos
1351b108b8bSchristos0	belong&0377777777	043000410	a.out NetBSD/vax 1k pure
136bbdfe8aeSchristos>0	use			netbsd-pure
137bbdfe8aeSchristos
1381b108b8bSchristos0	belong&0377777777	043000407	a.out NetBSD/vax 1k
139bbdfe8aeSchristos>0	use			netbsd-normal
140bbdfe8aeSchristos
1411b108b8bSchristos0	belong&0377777777	043000507	a.out NetBSD/vax 1k core
142bbdfe8aeSchristos>0	use			netbsd-core
1431b108b8bSchristos
1441b108b8bSchristos0	belong&0377777777	045400413	a.out NetBSD/vax 4k demand paged
145bbdfe8aeSchristos>0	use			netbsd-4096
146bbdfe8aeSchristos
1471b108b8bSchristos0	belong&0377777777	045400410	a.out NetBSD/vax 4k pure
148bbdfe8aeSchristos>0	use			netbsd-pure
149bbdfe8aeSchristos
1501b108b8bSchristos0	belong&0377777777	045400407	a.out NetBSD/vax 4k
151bbdfe8aeSchristos>0	use			netbsd-normal
152bbdfe8aeSchristos
1531b108b8bSchristos0	belong&0377777777	045400507	a.out NetBSD/vax 4k core
154bbdfe8aeSchristos>0	use			netbsd-core
1551b108b8bSchristos
1561b108b8bSchristos# NetBSD/alpha does not support (and has never supported) a.out objects,
1571b108b8bSchristos# so no rules are provided for them.  NetBSD/alpha ELF objects are
1581b108b8bSchristos# dealt with in "elf".
1591b108b8bSchristos0	lelong		0x00070185		ECOFF NetBSD/alpha binary
1601b108b8bSchristos>10	leshort		0x0001			not stripped
1611b108b8bSchristos>10	leshort		0x0000			stripped
1621b108b8bSchristos0	belong&0377777777	043200507	a.out NetBSD/alpha core
1631b108b8bSchristos>12	string			>\0		from '%s'
1641b108b8bSchristos>32	lelong			!0		(signal %d)
1651b108b8bSchristos
1661b108b8bSchristos0	belong&0377777777	043400413	a.out NetBSD/mips demand paged
167bbdfe8aeSchristos>0	use			\^netbsd-8192
168bbdfe8aeSchristos
1691b108b8bSchristos>16	belong			>0		not stripped
1701b108b8bSchristos0	belong&0377777777	043400410	a.out NetBSD/mips pure
171bbdfe8aeSchristos>0	use			netbsd-pure
172bbdfe8aeSchristos
1731b108b8bSchristos0	belong&0377777777	043400407	a.out NetBSD/mips
174bbdfe8aeSchristos>0	use			netbsd-normal
175bbdfe8aeSchristos
1761b108b8bSchristos0	belong&0377777777	043400507	a.out NetBSD/mips core
177bbdfe8aeSchristos>0	use			netbsd-core
1781b108b8bSchristos
1791b108b8bSchristos0	belong&0377777777	043600413	a.out NetBSD/arm32 demand paged
180bbdfe8aeSchristos>0	use			netbsd-4096
181bbdfe8aeSchristos
1821b108b8bSchristos0	belong&0377777777	043600410	a.out NetBSD/arm32 pure
183bbdfe8aeSchristos>0	use			netbsd-pure
184bbdfe8aeSchristos
1851b108b8bSchristos0	belong&0377777777	043600407	a.out NetBSD/arm32
186bbdfe8aeSchristos>0	use			netbsd-normal
187bbdfe8aeSchristos
1881b108b8bSchristos# NetBSD/arm26 has always used ELF objects, but it shares a core file
1891b108b8bSchristos# format with NetBSD/arm32.
1901b108b8bSchristos0	belong&0377777777	043600507	a.out NetBSD/arm core
191bbdfe8aeSchristos>0	use			netbsd-core
192f50962bcSchristos
193f50962bcSchristos# Kernel core dump format
194f50962bcSchristos0	belong&0x0000ffff 0x00008fca	NetBSD kernel core file
195f50962bcSchristos>0	belong&0x03ff0000 0x00000000	\b, Unknown
196c549f669Schristos>0	belong&0x03ff0000 0x00010000	\b, sun 68010/68020
197f50962bcSchristos>0	belong&0x03ff0000 0x00020000	\b, sun 68020
198f50962bcSchristos>0	belong&0x03ff0000 0x00640000	\b, 386 PC
199f50962bcSchristos>0	belong&0x03ff0000 0x00860000	\b, i386 BSD
200f50962bcSchristos>0	belong&0x03ff0000 0x00870000	\b, m68k BSD (8K pages)
201f50962bcSchristos>0	belong&0x03ff0000 0x00880000	\b, m68k BSD (4K pages)
202f50962bcSchristos>0	belong&0x03ff0000 0x00890000	\b, ns32532 BSD
203012fd133Schristos>0	belong&0x03ff0000 0x008a0000	\b, SPARC/32 BSD
204f50962bcSchristos>0	belong&0x03ff0000 0x008b0000	\b, pmax BSD
205f50962bcSchristos>0	belong&0x03ff0000 0x008c0000	\b, vax BSD (1K pages)
206f50962bcSchristos>0	belong&0x03ff0000 0x008d0000	\b, alpha BSD
207f50962bcSchristos>0	belong&0x03ff0000 0x008e0000	\b, mips BSD (Big Endian)
208f50962bcSchristos>0	belong&0x03ff0000 0x008f0000	\b, arm6 BSD
209f50962bcSchristos>0	belong&0x03ff0000 0x00900000	\b, m68k BSD (2K pages)
210f50962bcSchristos>0	belong&0x03ff0000 0x00910000	\b, sh3 BSD
211c549f669Schristos>0	belong&0x03ff0000 0x00950000	\b, ppc BSD (Big Endian)
212c549f669Schristos>0	belong&0x03ff0000 0x00960000	\b, vax BSD (4K pages)
213c549f669Schristos>0	belong&0x03ff0000 0x00970000	\b, mips1 BSD
214c549f669Schristos>0	belong&0x03ff0000 0x00980000	\b, mips2 BSD
215c549f669Schristos>0	belong&0x03ff0000 0x00990000	\b, m88k BSD
216c549f669Schristos>0	belong&0x03ff0000 0x00920000	\b, parisc BSD
217c549f669Schristos>0	belong&0x03ff0000 0x009b0000	\b, sh5/64 BSD
218c549f669Schristos>0	belong&0x03ff0000 0x009c0000	\b, SPARC/64 BSD
219c549f669Schristos>0	belong&0x03ff0000 0x009d0000	\b, amd64 BSD
220c549f669Schristos>0	belong&0x03ff0000 0x009e0000	\b, sh5/32 BSD
221c549f669Schristos>0	belong&0x03ff0000 0x009f0000	\b, ia64 BSD
222c549f669Schristos>0	belong&0x03ff0000 0x00b70000	\b, aarch64 BSD
223c549f669Schristos>0	belong&0x03ff0000 0x00b80000	\b, or1k BSD
224c549f669Schristos>0	belong&0x03ff0000 0x00b90000	\b, Risk-V BSD
225c549f669Schristos>0	belong&0x03ff0000 0x00c80000	\b, hp200 BSD
226c549f669Schristos>0	belong&0x03ff0000 0x012c0000	\b, hp300 BSD
227c549f669Schristos>0	belong&0x03ff0000 0x020b0000	\b, hp800 HP-UX
228c549f669Schristos>0	belong&0x03ff0000 0x020c0000	\b, hp200/hp300 HP-UX
229f50962bcSchristos>0	belong&0xfc000000 0x04000000	\b, CPU
230f50962bcSchristos>0	belong&0xfc000000 0x08000000	\b, DATA
231f50962bcSchristos>0	belong&0xfc000000 0x10000000	\b, STACK
232f50962bcSchristos>4	leshort	x			\b, (headersize = %d
233f50962bcSchristos>6	leshort	x			\b, segmentsize = %d
234e30da964Smlelstv>8	lelong	x			\b, segments = %d)
23574db5203Schristos
23674db5203Schristos# little endian only for now.
23774db5203Schristos0	name		ktrace
23874db5203Schristos>4	leshort		7
23974db5203Schristos>>6	leshort		<3		NetBSD ktrace file version %d
24074db5203Schristos>>>12	string		x		from %s
24174db5203Schristos>>>56	string		x		\b, emulation %s
24274db5203Schristos>>>8	lelong		<65536		\b, pid=%d
24374db5203Schristos
24474db5203Schristos56	string		netbsd
24574db5203Schristos>0	use		ktrace
24674db5203Schristos56	string		linux
24774db5203Schristos>0	use		ktrace
24874db5203Schristos56	string		sunos
24974db5203Schristos>0	use		ktrace
25074db5203Schristos56	string		hpux
25174db5203Schristos>0	use		ktrace
252