2 #------------------------------------------------------------------------------
3 # hp: file(1) magic for Hewlett Packard machines (see also "printer")
5 # XXX - somebody should figure out whether any byte order needs to be
6 # applied to the "TML" stuff; I'm assuming the Apollo stuff is
7 # big-endian as it was mostly 68K-based.
9 # I think the 500 series was the old stack-based machines, running a
10 # UNIX environment atop the "SUN kernel"; dunno whether it was
11 # big-endian or little-endian.
13 # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
14 # hp300 are 68020+68881 based; hp400 are also 68k. The following basic
15 # HP magic is useful for reference, but using "long" magic is a better
16 # practice in order to avoid collisions.
18 # Guy Harris (guy@netapp.com): some additions to this list came from
19 # HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
20 # 1.2, and 2.0). The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
21 # "/etc/magic", though, except for the "archive file relocatable library"
22 # stuff, and the 68030 and 68040 stuff isn't there at all - are they not
23 # used in executables, or have they just not yet updated "/etc/magic"
26 # 0 beshort 200 hp200 (68010) BSD binary
27 # 0 beshort 300 hp300 (68020+68881) BSD binary
28 # 0 beshort 0x20c hp200/300 HP-UX binary
29 # 0 beshort 0x20d hp400 (68030) HP-UX binary
30 # 0 beshort 0x20e hp400 (68040?) HP-UX binary
31 # 0 beshort 0x20b PA-RISC1.0 HP-UX binary
32 # 0 beshort 0x210 PA-RISC1.1 HP-UX binary
33 # 0 beshort 0x211 PA-RISC1.2 HP-UX binary
34 # 0 beshort 0x214 PA-RISC2.0 HP-UX binary
37 # The "misc" stuff needs a byte order; the archives look suspiciously
38 # like the old 177545 archives (0xff65 = 0177545).
41 0 beshort 0627 Apollo m68k COFF executable
42 >18 beshort ^040000 not stripped
43 >22 beshort >0 - version %ld
44 0 beshort 0624 apollo a88k COFF executable
45 >18 beshort ^040000 not stripped
46 >22 beshort >0 - version %ld
47 0 long 01203604016 TML 0123 byte-order format
48 0 long 01702407010 TML 1032 byte-order format
49 0 long 01003405017 TML 2301 byte-order format
50 0 long 01602007412 TML 3210 byte-order format
52 0 belong 0x02100106 PA-RISC1.1 relocatable object
53 0 belong 0x02100107 PA-RISC1.1 executable
54 >168 belong &0x00000004 dynamically linked
55 >(144) belong 0x054ef630 dynamically linked
56 >96 belong >0 - not stripped
58 0 belong 0x02100108 PA-RISC1.1 shared executable
59 >168 belong&0x4 0x4 dynamically linked
60 >(144) belong 0x054ef630 dynamically linked
61 >96 belong >0 - not stripped
63 0 belong 0x0210010b PA-RISC1.1 demand-load executable
64 >168 belong&0x4 0x4 dynamically linked
65 >(144) belong 0x054ef630 dynamically linked
66 >96 belong >0 - not stripped
68 0 belong 0x0210010e PA-RISC1.1 shared library
69 >96 belong >0 - not stripped
71 0 belong 0x0210010d PA-RISC1.1 dynamic load library
72 >96 belong >0 - not stripped
75 0 belong 0x02140106 PA-RISC2.0 relocatable object
77 0 belong 0x02140107 PA-RISC2.0 executable
78 >168 belong &0x00000004 dynamically linked
79 >(144) belong 0x054ef630 dynamically linked
80 >96 belong >0 - not stripped
82 0 belong 0x02140108 PA-RISC2.0 shared executable
83 >168 belong &0x00000004 dynamically linked
84 >(144) belong 0x054ef630 dynamically linked
85 >96 belong >0 - not stripped
87 0 belong 0x0214010b PA-RISC2.0 demand-load executable
88 >168 belong &0x00000004 dynamically linked
89 >(144) belong 0x054ef630 dynamically linked
90 >96 belong >0 - not stripped
92 0 belong 0x0214010e PA-RISC2.0 shared library
93 >96 belong >0 - not stripped
95 0 belong 0x0214010d PA-RISC2.0 dynamic load library
96 >96 belong >0 - not stripped
99 0 belong 0x020b0106 PA-RISC1.0 relocatable object
101 0 belong 0x020b0107 PA-RISC1.0 executable
102 >168 belong&0x4 0x4 dynamically linked
103 >(144) belong 0x054ef630 dynamically linked
104 >96 belong >0 - not stripped
106 0 belong 0x020b0108 PA-RISC1.0 shared executable
107 >168 belong&0x4 0x4 dynamically linked
108 >(144) belong 0x054ef630 dynamically linked
109 >96 belong >0 - not stripped
111 0 belong 0x020b010b PA-RISC1.0 demand-load executable
112 >168 belong&0x4 0x4 dynamically linked
113 >(144) belong 0x054ef630 dynamically linked
114 >96 belong >0 - not stripped
116 0 belong 0x020b010e PA-RISC1.0 shared library
117 >96 belong >0 - not stripped
119 0 belong 0x020b010d PA-RISC1.0 dynamic load library
120 >96 belong >0 - not stripped
122 0 belong 0x213c6172 archive file
123 >68 belong 0x020b0619 - PA-RISC1.0 relocatable library
124 >68 belong 0x02100619 - PA-RISC1.1 relocatable library
125 >68 belong 0x02110619 - PA-RISC1.2 relocatable library
126 >68 belong 0x02140619 - PA-RISC2.0 relocatable library
129 0 long 0x02080106 HP s500 relocatable executable
130 >16 long >0 - version %ld
132 0 long 0x02080107 HP s500 executable
133 >16 long >0 - version %ld
135 0 long 0x02080108 HP s500 pure executable
136 >16 long >0 - version %ld
139 0 belong 0x020c0108 HP s200 pure executable
140 >4 beshort >0 - version %ld
141 >8 belong &0x80000000 save fp regs
142 >8 belong &0x40000000 dynamically linked
143 >8 belong &0x20000000 debuggable
144 >36 belong >0 not stripped
146 0 belong 0x020c0107 HP s200 executable
147 >4 beshort >0 - version %ld
148 >8 belong &0x80000000 save fp regs
149 >8 belong &0x40000000 dynamically linked
150 >8 belong &0x20000000 debuggable
151 >36 belong >0 not stripped
153 0 belong 0x020c010b HP s200 demand-load executable
154 >4 beshort >0 - version %ld
155 >8 belong &0x80000000 save fp regs
156 >8 belong &0x40000000 dynamically linked
157 >8 belong &0x20000000 debuggable
158 >36 belong >0 not stripped
160 0 belong 0x020c0106 HP s200 relocatable executable
161 >4 beshort >0 - version %ld
162 >6 beshort >0 - highwater %d
163 >8 belong &0x80000000 save fp regs
164 >8 belong &0x20000000 debuggable
165 >8 belong &0x10000000 PIC
167 0 belong 0x020a0108 HP s200 (2.x release) pure executable
168 >4 beshort >0 - version %ld
169 >36 belong >0 not stripped
171 0 belong 0x020a0107 HP s200 (2.x release) executable
172 >4 beshort >0 - version %ld
173 >36 belong >0 not stripped
175 0 belong 0x020c010e HP s200 shared library
176 >4 beshort >0 - version %ld
177 >6 beshort >0 - highwater %d
178 >36 belong >0 not stripped
180 0 belong 0x020c010d HP s200 dynamic load library
181 >4 beshort >0 - version %ld
182 >6 beshort >0 - highwater %d
183 >36 belong >0 not stripped
186 0 long 0x0000ff65 HP old archive
187 0 long 0x020aff65 HP s200 old archive
188 0 long 0x020cff65 HP s200 old archive
189 0 long 0x0208ff65 HP s500 old archive
191 0 long 0x015821a6 HP core file
193 0 long 0x4da7eee8 HP-WINDOWS font
194 >8 byte >0 - version %ld
195 0 string Bitmapfile HP Bitmapfile
197 0 string IMGfile CIS compimg HP Bitmapfile
199 #0 short 0x8000 lif file
200 0 long 0x020c010c compiled Lisp
202 0 string msgcat01 HP NLS message catalog,
203 >8 long >0 %d messages
205 # addendum to /etc/magic with HP-48sx file-types by phk@data.fls.dk 1jan92
206 0 string HPHP48- HP48 binary
208 >8 beshort 0x1129 (ADR)
209 >8 beshort 0x3329 (REAL)
210 >8 beshort 0x5529 (LREAL)
211 >8 beshort 0x7729 (COMPLX)
212 >8 beshort 0x9d29 (LCOMPLX)
213 >8 beshort 0xbf29 (CHAR)
214 >8 beshort 0xe829 (ARRAY)
215 >8 beshort 0x0a2a (LNKARRAY)
216 >8 beshort 0x2c2a (STRING)
217 >8 beshort 0x4e2a (HXS)
218 >8 beshort 0x742a (LIST)
219 >8 beshort 0x962a (DIR)
220 >8 beshort 0xb82a (ALG)
221 >8 beshort 0xda2a (UNIT)
222 >8 beshort 0xfc2a (TAGGED)
223 >8 beshort 0x1e2b (GROB)
224 >8 beshort 0x402b (LIB)
225 >8 beshort 0x622b (BACKUP)
226 >8 beshort 0x882b (LIBDATA)
227 >8 beshort 0x9d2d (PROG)
228 >8 beshort 0xcc2d (CODE)
229 >8 beshort 0x482e (GNAME)
230 >8 beshort 0x6d2e (LNAME)
231 >8 beshort 0x922e (XLIB)
232 0 string %%HP: HP48 text
233 >6 string T(0) - T(0)
234 >6 string T(1) - T(1)
235 >6 string T(2) - T(2)
236 >6 string T(3) - T(3)
240 >14 string F(.) F(.);
241 >14 string F(,) F(,);
243 # hpBSD magic numbers
244 0 beshort 200 hp200 (68010) BSD
245 >2 beshort 0407 impure binary
246 >2 beshort 0410 read-only binary
247 >2 beshort 0413 demand paged binary
248 0 beshort 300 hp300 (68020+68881) BSD
249 >2 beshort 0407 impure binary
250 >2 beshort 0410 read-only binary
251 >2 beshort 0413 demand paged binary
253 # From David Gero <dgero@nortelnetworks.com>
254 # HP-UX 10.20 core file format from /usr/include/sys/core.h
255 # Unfortunately, HP-UX uses corehead blocks without specifying the order
256 # There are four we care about:
257 # CORE_KERNEL, which starts with the string "HP-UX"
258 # CORE_EXEC, which contains the name of the command
259 # CORE_PROC, which contains the signal number that caused the core dump
260 # CORE_FORMAT, which contains the version of the core file format (== 1)
261 # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
262 # but we include all 6 variations of the order of the first 3, and
263 # assume that PROC will always be last
264 # Order 1: KERNEL, EXEC, FORMAT, PROC
273 >>>>>>>>0xB4 belong 4 core file
274 >>>>>>>>>0x90 string >\0 from '%s'
275 >>>>>>>>>0xC4 belong 3 - received SIGQUIT
276 >>>>>>>>>0xC4 belong 4 - received SIGILL
277 >>>>>>>>>0xC4 belong 5 - received SIGTRAP
278 >>>>>>>>>0xC4 belong 6 - received SIGABRT
279 >>>>>>>>>0xC4 belong 7 - received SIGEMT
280 >>>>>>>>>0xC4 belong 8 - received SIGFPE
281 >>>>>>>>>0xC4 belong 10 - received SIGBUS
282 >>>>>>>>>0xC4 belong 11 - received SIGSEGV
283 >>>>>>>>>0xC4 belong 12 - received SIGSYS
284 >>>>>>>>>0xC4 belong 33 - received SIGXCPU
285 >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
286 # Order 2: KERNEL, FORMAT, EXEC, PROC
290 >>>>>>0x60 belong 0x100
291 >>>>>>>0x6C belong 0x44
292 >>>>>>>>0xB4 belong 4 core file
293 >>>>>>>>>0xA4 string >\0 from '%s'
294 >>>>>>>>>0xC4 belong 3 - received SIGQUIT
295 >>>>>>>>>0xC4 belong 4 - received SIGILL
296 >>>>>>>>>0xC4 belong 5 - received SIGTRAP
297 >>>>>>>>>0xC4 belong 6 - received SIGABRT
298 >>>>>>>>>0xC4 belong 7 - received SIGEMT
299 >>>>>>>>>0xC4 belong 8 - received SIGFPE
300 >>>>>>>>>0xC4 belong 10 - received SIGBUS
301 >>>>>>>>>0xC4 belong 11 - received SIGSEGV
302 >>>>>>>>>0xC4 belong 12 - received SIGSYS
303 >>>>>>>>>0xC4 belong 33 - received SIGXCPU
304 >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
305 # Order 3: FORMAT, KERNEL, EXEC, PROC
311 >>>>>0x20 belong 0x3C
312 >>>>>>0x60 belong 0x100
313 >>>>>>>0x6C belong 0x44
314 >>>>>>>>0xB4 belong 4 core file
315 >>>>>>>>>0xA4 string >\0 from '%s'
316 >>>>>>>>>0xC4 belong 3 - received SIGQUIT
317 >>>>>>>>>0xC4 belong 4 - received SIGILL
318 >>>>>>>>>0xC4 belong 5 - received SIGTRAP
319 >>>>>>>>>0xC4 belong 6 - received SIGABRT
320 >>>>>>>>>0xC4 belong 7 - received SIGEMT
321 >>>>>>>>>0xC4 belong 8 - received SIGFPE
322 >>>>>>>>>0xC4 belong 10 - received SIGBUS
323 >>>>>>>>>0xC4 belong 11 - received SIGSEGV
324 >>>>>>>>>0xC4 belong 12 - received SIGSYS
325 >>>>>>>>>0xC4 belong 33 - received SIGXCPU
326 >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
327 # Order 4: EXEC, KERNEL, FORMAT, PROC
336 >>>>>>>>0xB4 belong 4 core file
337 >>>>>>>>>0x44 string >\0 from '%s'
338 >>>>>>>>>0xC4 belong 3 - received SIGQUIT
339 >>>>>>>>>0xC4 belong 4 - received SIGILL
340 >>>>>>>>>0xC4 belong 5 - received SIGTRAP
341 >>>>>>>>>0xC4 belong 6 - received SIGABRT
342 >>>>>>>>>0xC4 belong 7 - received SIGEMT
343 >>>>>>>>>0xC4 belong 8 - received SIGFPE
344 >>>>>>>>>0xC4 belong 10 - received SIGBUS
345 >>>>>>>>>0xC4 belong 11 - received SIGSEGV
346 >>>>>>>>>0xC4 belong 12 - received SIGSYS
347 >>>>>>>>>0xC4 belong 33 - received SIGXCPU
348 >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
349 # Order 5: FORMAT, EXEC, KERNEL, PROC
354 >>>>0x14 belong 0x100
355 >>>>>0x20 belong 0x44
357 >>>>>>>0x74 belong 0x3C
358 >>>>>>>>0xB4 belong 4 core file
359 >>>>>>>>>0x58 string >\0 from '%s'
360 >>>>>>>>>0xC4 belong 3 - received SIGQUIT
361 >>>>>>>>>0xC4 belong 4 - received SIGILL
362 >>>>>>>>>0xC4 belong 5 - received SIGTRAP
363 >>>>>>>>>0xC4 belong 6 - received SIGABRT
364 >>>>>>>>>0xC4 belong 7 - received SIGEMT
365 >>>>>>>>>0xC4 belong 8 - received SIGFPE
366 >>>>>>>>>0xC4 belong 10 - received SIGBUS
367 >>>>>>>>>0xC4 belong 11 - received SIGSEGV
368 >>>>>>>>>0xC4 belong 12 - received SIGSYS
369 >>>>>>>>>0xC4 belong 33 - received SIGXCPU
370 >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
371 # Order 6: EXEC, FORMAT, KERNEL, PROC
378 >>>>>>>0x74 belong 0x2C
379 >>>>>>>>0xB4 belong 4 core file
380 >>>>>>>>>0x44 string >\0 from '%s'
381 >>>>>>>>>0xC4 belong 3 - received SIGQUIT
382 >>>>>>>>>0xC4 belong 4 - received SIGILL
383 >>>>>>>>>0xC4 belong 5 - received SIGTRAP
384 >>>>>>>>>0xC4 belong 6 - received SIGABRT
385 >>>>>>>>>0xC4 belong 7 - received SIGEMT
386 >>>>>>>>>0xC4 belong 8 - received SIGFPE
387 >>>>>>>>>0xC4 belong 10 - received SIGBUS
388 >>>>>>>>>0xC4 belong 11 - received SIGSEGV
389 >>>>>>>>>0xC4 belong 12 - received SIGSYS
390 >>>>>>>>>0xC4 belong 33 - received SIGXCPU
391 >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
393 # From: AMAKAWA Shuhei <sa264@cam.ac.uk>
394 0 string HPHP49- HP49 binary