xref: /dragonfly/contrib/file/magic/Magdir/hp (revision 6fca56fb90a257291c53bba3b861b751027c3e3d)
1
2#------------------------------------------------------------------------------
3# $File: hp,v 1.25 2019/01/13 00:32:38 christos Exp $
4# hp:  file(1) magic for Hewlett Packard machines (see also "printer")
5#
6# XXX - somebody should figure out whether any byte order needs to be
7# applied to the "TML" stuff; I'm assuming the Apollo stuff is
8# big-endian as it was mostly 68K-based.
9#
10# I think the 500 series was the old stack-based machines, running a
11# UNIX environment atop the "SUN kernel"; dunno whether it was
12# big-endian or little-endian.
13#
14# Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
15# hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
16# HP magic is useful for reference, but using "long" magic is a better
17# practice in order to avoid collisions.
18#
19# Guy Harris (guy@netapp.com): some additions to this list came from
20# HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
21# 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
22# "/etc/magic", though, except for the "archive file relocatable library"
23# stuff, and the 68030 and 68040 stuff isn't there at all - are they not
24# used in executables, or have they just not yet updated "/etc/magic"
25# completely?
26#
27# 0       beshort             200                 hp200 (68010) BSD binary
28# 0       beshort             300                 hp300 (68020+68881) BSD binary
29# 0       beshort             0x20c               hp200/300 HP-UX binary
30# 0       beshort             0x20d               hp400 (68030) HP-UX binary
31# 0       beshort             0x20e               hp400 (68040?) HP-UX binary
32# 0       beshort             0x20b               PA-RISC1.0 HP-UX binary
33# 0       beshort             0x210               PA-RISC1.1 HP-UX binary
34# 0       beshort             0x211               PA-RISC1.2 HP-UX binary
35# 0       beshort             0x214               PA-RISC2.0 HP-UX binary
36
37#
38# The "misc" stuff needs a byte order; the archives look suspiciously
39# like the old 177545 archives (0xff65 = 0177545).
40#
41#### Old Apollo stuff
420         beshort             0627                Apollo m68k COFF executable
43>18       beshort             ^040000             not stripped
44>22       beshort             >0                  - version %d
450         beshort             0624                apollo a88k COFF executable
46>18       beshort             ^040000             not stripped
47>22       beshort             >0                  - version %d
480       long            01203604016     TML 0123 byte-order format
490       long            01702407010     TML 1032 byte-order format
500       long            01003405017     TML 2301 byte-order format
510       long            01602007412     TML 3210 byte-order format
52#### PA-RISC 1.1
530         belong              0x02100106          PA-RISC1.1 relocatable object
540         belong              0x02100107          PA-RISC1.1 executable
55>168      belong              &0x00000004         dynamically linked
56>(144)    belong              0x054ef630          dynamically linked
57>96       belong              >0                  - not stripped
58
590         belong              0x02100108          PA-RISC1.1 shared executable
60>168      belong&0x4          0x4                 dynamically linked
61>(144)    belong              0x054ef630          dynamically linked
62>96       belong              >0                  - not stripped
63
640         belong              0x0210010b          PA-RISC1.1 demand-load executable
65>168      belong&0x4          0x4                 dynamically linked
66>(144)    belong              0x054ef630          dynamically linked
67>96       belong              >0                  - not stripped
68
690         belong              0x0210010e          PA-RISC1.1 shared library
70>96       belong              >0                  - not stripped
71
720         belong              0x0210010d          PA-RISC1.1 dynamic load library
73>96       belong              >0                  - not stripped
74
75#### PA-RISC 2.0
760         belong              0x02140106          PA-RISC2.0 relocatable object
77
780       belong                0x02140107          PA-RISC2.0 executable
79>168      belong              &0x00000004         dynamically linked
80>(144)    belong              0x054ef630          dynamically linked
81>96       belong              >0                  - not stripped
82
830       belong                0x02140108          PA-RISC2.0 shared executable
84>168      belong              &0x00000004         dynamically linked
85>(144)    belong              0x054ef630          dynamically linked
86>96       belong              >0                  - not stripped
87
880       belong                0x0214010b          PA-RISC2.0 demand-load executable
89>168      belong              &0x00000004         dynamically linked
90>(144)    belong              0x054ef630          dynamically linked
91>96       belong              >0                  - not stripped
92
930       belong                0x0214010e          PA-RISC2.0 shared library
94>96       belong              >0                  - not stripped
95
960       belong                0x0214010d          PA-RISC2.0 dynamic load library
97>96       belong              >0                  - not stripped
98
99#### 800
1000         belong              0x020b0106          PA-RISC1.0 relocatable object
101
1020         belong              0x020b0107          PA-RISC1.0 executable
103>168      belong&0x4          0x4                 dynamically linked
104>(144)    belong              0x054ef630          dynamically linked
105>96       belong              >0                  - not stripped
106
1070         belong              0x020b0108          PA-RISC1.0 shared executable
108>168      belong&0x4          0x4                 dynamically linked
109>(144)    belong              0x054ef630          dynamically linked
110>96       belong              >0                  - not stripped
111
1120         belong              0x020b010b          PA-RISC1.0 demand-load executable
113>168      belong&0x4          0x4                 dynamically linked
114>(144)    belong              0x054ef630          dynamically linked
115>96       belong              >0                  - not stripped
116
1170         belong              0x020b010e          PA-RISC1.0 shared library
118>96       belong              >0                  - not stripped
119
1200         belong              0x020b010d          PA-RISC1.0 dynamic load library
121>96       belong              >0                  - not stripped
122
123#### 500
1240         long                0x02080106          HP s500 relocatable executable
125>16       long                >0                  - version %d
126
1270         long                0x02080107          HP s500 executable
128>16       long                >0                  - version %d
129
1300         long                0x02080108          HP s500 pure executable
131>16       long                >0                  - version %d
132
133#### 200
1340         belong              0x020c0108          HP s200 pure executable
135>4        beshort             >0                  - version %d
136>8        belong              &0x80000000         save fp regs
137>8        belong              &0x40000000         dynamically linked
138>8        belong              &0x20000000         debuggable
139>36       belong              >0                  not stripped
140
1410         belong              0x020c0107          HP s200 executable
142>4        beshort             >0                  - version %d
143>8        belong              &0x80000000         save fp regs
144>8        belong              &0x40000000         dynamically linked
145>8        belong              &0x20000000         debuggable
146>36       belong              >0                  not stripped
147
1480         belong              0x020c010b          HP s200 demand-load executable
149>4        beshort             >0                  - version %d
150>8        belong              &0x80000000         save fp regs
151>8        belong              &0x40000000         dynamically linked
152>8        belong              &0x20000000         debuggable
153>36       belong              >0                  not stripped
154
1550         belong              0x020c0106          HP s200 relocatable executable
156>4        beshort             >0                  - version %d
157>6        beshort             >0                  - highwater %d
158>8        belong              &0x80000000         save fp regs
159>8        belong              &0x20000000         debuggable
160>8        belong              &0x10000000         PIC
161
1620         belong              0x020a0108          HP s200 (2.x release) pure executable
163>4        beshort             >0                  - version %d
164>36       belong              >0                  not stripped
165
1660         belong              0x020a0107          HP s200 (2.x release) executable
167>4        beshort             >0                  - version %d
168>36       belong              >0                  not stripped
169
1700         belong              0x020c010e          HP s200 shared library
171>4        beshort             >0                  - version %d
172>6        beshort             >0                  - highwater %d
173>36       belong              >0                  not stripped
174
1750         belong              0x020c010d          HP s200 dynamic load library
176>4        beshort             >0                  - version %d
177>6        beshort             >0                  - highwater %d
178>36       belong              >0                  not stripped
179
180#### MISC
1810         long                0x0000ff65          HP old archive
1820         long                0x020aff65          HP s200 old archive
1830         long                0x020cff65          HP s200 old archive
1840         long                0x0208ff65          HP s500 old archive
185
1860         long                0x015821a6          HP core file
187
1880         long                0x4da7eee8          HP-WINDOWS font
189>8        byte                >0                  - version %d
1900         string              Bitmapfile          HP Bitmapfile
191
1920         string              IMGfile   CIS       compimg HP Bitmapfile
193# XXX - see "lif"
194#0        short               0x8000              lif file
1950         long                0x020c010c          compiled Lisp
196
1970         string              msgcat01  HP NLS message catalog,
198>8        long                >0                  %d messages
199
200# Summary: HP-48/49 calculator
201# Created by: phk@data.fls.dk
202# Modified by (1): AMAKAWA Shuhei <sa264@cam.ac.uk>
203# Modified by (2): Samuel Thibault <samuel.thibault@ens-lyon.org> (HP49 support)
2040         string              HPHP                HP
205>4        string              48                  48 binary
206>4        string              49                  49 binary
207>7        byte                >64                 - Rev %c
208>8        leshort             0x2911              (ADR)
209>8        leshort             0x2933              (REAL)
210>8        leshort             0x2955              (LREAL)
211>8        leshort             0x2977              (COMPLX)
212>8        leshort             0x299d              (LCOMPLX)
213>8        leshort             0x29bf              (CHAR)
214>8        leshort             0x29e8              (ARRAY)
215>8        leshort             0x2a0a              (LNKARRAY)
216>8        leshort             0x2a2c              (STRING)
217>8        leshort             0x2a4e              (HXS)
218>8        leshort             0x2a74              (LIST)
219>8        leshort             0x2a96              (DIR)
220>8        leshort             0x2ab8              (ALG)
221>8        leshort             0x2ada              (UNIT)
222>8        leshort             0x2afc              (TAGGED)
223>8        leshort             0x2b1e              (GROB)
224>8        leshort             0x2b40              (LIB)
225>8        leshort             0x2b62              (BACKUP)
226>8        leshort             0x2b88              (LIBDATA)
227>8        leshort             0x2d9d              (PROG)
228>8        leshort             0x2dcc              (CODE)
229>8        leshort             0x2e48              (GNAME)
230>8        leshort             0x2e6d              (LNAME)
231>8        leshort             0x2e92              (XLIB)
232
2330         string              %%HP:               HP text
234>6        string              T(0)                - T(0)
235>6        string              T(1)                - T(1)
236>6        string              T(2)                - T(2)
237>6        string              T(3)                - T(3)
238>10       string              A(D)                A(D)
239>10       string              A(R)                A(R)
240>10       string              A(G)                A(G)
241>14       string              F(.)                F(.);
242>14       string              F(,)                F(,);
243
244
245# Summary: HP-38/39 calculator
246# Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2470         string              HP3
248>3        string              8                   HP 38
249>3        string              9                   HP 39
250>4        string              Bin                 binary
251>4        string              Asc                 ASCII
252>7        string              A                   (Directory List)
253>7        string              B                   (Zaplet)
254>7        string              C                   (Note)
255>7        string              D                   (Program)
256>7        string              E                   (Variable)
257>7        string              F                   (List)
258>7        string              G                   (Matrix)
259>7        string              H                   (Library)
260>7        string              I                   (Target List)
261>7        string              J                   (ASCII Vector specification)
262>7        string              K                   (wildcard)
263
264# Summary: HP-38/39 calculator
265# Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2660         string              HP3
267>3        string              8                   HP 38
268>3        string              9                   HP 39
269>4        string              Bin                 binary
270>4        string              Asc                 ASCII
271>7        string              A                   (Directory List)
272>7        string              B                   (Zaplet)
273>7        string              C                   (Note)
274>7        string              D                   (Program)
275>7        string              E                   (Variable)
276>7        string              F                   (List)
277>7        string              G                   (Matrix)
278>7        string              H                   (Library)
279>7        string              I                   (Target List)
280>7        string              J                   (ASCII Vector specification)
281>7        string              K                   (wildcard)
282
283# hpBSD magic numbers
2840         beshort             200                 hp200 (68010) BSD
285>2        beshort             0407                impure binary
286>2        beshort             0410                read-only binary
287>2        beshort             0413                demand paged binary
2880         beshort             300                 hp300 (68020+68881) BSD
289>2        beshort             0407                impure binary
290>2        beshort             0410                read-only binary
291>2        beshort             0413                demand paged binary
292#
293# From David Gero <dgero@nortelnetworks.com>
294# HP-UX 10.20 core file format from /usr/include/sys/core.h
295# Unfortunately, HP-UX uses corehead blocks without specifying the order
296# There are four we care about:
297#     CORE_KERNEL, which starts with the string "HP-UX"
298#     CORE_EXEC, which contains the name of the command
299#     CORE_PROC, which contains the signal number that caused the core dump
300#     CORE_FORMAT, which contains the version of the core file format (== 1)
301# The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
302# but we include all 6 variations of the order of the first 3, and
303# assume that PROC will always be last
304# Order 1: KERNEL, EXEC, FORMAT, PROC
3050x10                string    HP-UX
306>0                  belong    2
307>>0xC               belong    0x3C
308>>>0x4C             belong    0x100
309>>>>0x58  belong    0x44
310>>>>>0xA0 belong    1
311>>>>>>0xAC          belong    4
312>>>>>>>0xB0         belong    1
313>>>>>>>>0xB4        belong    4                   core file
314>>>>>>>>>0x90       string    >\0                 from '%s'
315>>>>>>>>>0xC4       belong    3                   - received SIGQUIT
316>>>>>>>>>0xC4       belong    4                   - received SIGILL
317>>>>>>>>>0xC4       belong    5                   - received SIGTRAP
318>>>>>>>>>0xC4       belong    6                   - received SIGABRT
319>>>>>>>>>0xC4       belong    7                   - received SIGEMT
320>>>>>>>>>0xC4       belong    8                   - received SIGFPE
321>>>>>>>>>0xC4       belong    10                  - received SIGBUS
322>>>>>>>>>0xC4       belong    11                  - received SIGSEGV
323>>>>>>>>>0xC4       belong    12                  - received SIGSYS
324>>>>>>>>>0xC4       belong    33                  - received SIGXCPU
325>>>>>>>>>0xC4       belong    34                  - received SIGXFSZ
326# Order 2: KERNEL, FORMAT, EXEC, PROC
327>>>0x4C             belong    1
328>>>>0x58  belong    4
329>>>>>0x5C belong    1
330>>>>>>0x60          belong    0x100
331>>>>>>>0x6C         belong    0x44
332>>>>>>>>0xB4        belong    4                   core file
333>>>>>>>>>0xA4       string    >\0                 from '%s'
334>>>>>>>>>0xC4       belong    3                   - received SIGQUIT
335>>>>>>>>>0xC4       belong    4                   - received SIGILL
336>>>>>>>>>0xC4       belong    5                   - received SIGTRAP
337>>>>>>>>>0xC4       belong    6                   - received SIGABRT
338>>>>>>>>>0xC4       belong    7                   - received SIGEMT
339>>>>>>>>>0xC4       belong    8                   - received SIGFPE
340>>>>>>>>>0xC4       belong    10                  - received SIGBUS
341>>>>>>>>>0xC4       belong    11                  - received SIGSEGV
342>>>>>>>>>0xC4       belong    12                  - received SIGSYS
343>>>>>>>>>0xC4       belong    33                  - received SIGXCPU
344>>>>>>>>>0xC4       belong    34                  - received SIGXFSZ
345# Order 3: FORMAT, KERNEL, EXEC, PROC
3460x24                string    HP-UX
347>0                  belong    1
348>>0xC               belong    4
349>>>0x10             belong    1
350>>>>0x14  belong    2
351>>>>>0x20 belong    0x3C
352>>>>>>0x60          belong    0x100
353>>>>>>>0x6C         belong    0x44
354>>>>>>>>0xB4        belong    4                   core file
355>>>>>>>>>0xA4       string    >\0                 from '%s'
356>>>>>>>>>0xC4       belong    3                   - received SIGQUIT
357>>>>>>>>>0xC4       belong    4                   - received SIGILL
358>>>>>>>>>0xC4       belong    5                   - received SIGTRAP
359>>>>>>>>>0xC4       belong    6                   - received SIGABRT
360>>>>>>>>>0xC4       belong    7                   - received SIGEMT
361>>>>>>>>>0xC4       belong    8                   - received SIGFPE
362>>>>>>>>>0xC4       belong    10                  - received SIGBUS
363>>>>>>>>>0xC4       belong    11                  - received SIGSEGV
364>>>>>>>>>0xC4       belong    12                  - received SIGSYS
365>>>>>>>>>0xC4       belong    33                  - received SIGXCPU
366>>>>>>>>>0xC4       belong    34                  - received SIGXFSZ
367# Order 4: EXEC, KERNEL, FORMAT, PROC
3680x64                string    HP-UX
369>0                  belong    0x100
370>>0xC               belong    0x44
371>>>0x54             belong    2
372>>>>0x60  belong    0x3C
373>>>>>0xA0 belong    1
374>>>>>>0xAC          belong    4
375>>>>>>>0xB0         belong    1
376>>>>>>>>0xB4        belong    4                   core file
377>>>>>>>>>0x44       string    >\0                 from '%s'
378>>>>>>>>>0xC4       belong    3                   - received SIGQUIT
379>>>>>>>>>0xC4       belong    4                   - received SIGILL
380>>>>>>>>>0xC4       belong    5                   - received SIGTRAP
381>>>>>>>>>0xC4       belong    6                   - received SIGABRT
382>>>>>>>>>0xC4       belong    7                   - received SIGEMT
383>>>>>>>>>0xC4       belong    8                   - received SIGFPE
384>>>>>>>>>0xC4       belong    10                  - received SIGBUS
385>>>>>>>>>0xC4       belong    11                  - received SIGSEGV
386>>>>>>>>>0xC4       belong    12                  - received SIGSYS
387>>>>>>>>>0xC4       belong    33                  - received SIGXCPU
388>>>>>>>>>0xC4       belong    34                  - received SIGXFSZ
389# Order 5: FORMAT, EXEC, KERNEL, PROC
3900x78                string    HP-UX
391>0                  belong    1
392>>0xC               belong    4
393>>>0x10             belong    1
394>>>>0x14  belong    0x100
395>>>>>0x20 belong    0x44
396>>>>>>0x68          belong    2
397>>>>>>>0x74         belong    0x3C
398>>>>>>>>0xB4        belong    4                   core file
399>>>>>>>>>0x58       string    >\0                 from '%s'
400>>>>>>>>>0xC4       belong    3                   - received SIGQUIT
401>>>>>>>>>0xC4       belong    4                   - received SIGILL
402>>>>>>>>>0xC4       belong    5                   - received SIGTRAP
403>>>>>>>>>0xC4       belong    6                   - received SIGABRT
404>>>>>>>>>0xC4       belong    7                   - received SIGEMT
405>>>>>>>>>0xC4       belong    8                   - received SIGFPE
406>>>>>>>>>0xC4       belong    10                  - received SIGBUS
407>>>>>>>>>0xC4       belong    11                  - received SIGSEGV
408>>>>>>>>>0xC4       belong    12                  - received SIGSYS
409>>>>>>>>>0xC4       belong    33                  - received SIGXCPU
410>>>>>>>>>0xC4       belong    34                  - received SIGXFSZ
411# Order 6: EXEC, FORMAT, KERNEL, PROC
412>0                  belong    0x100
413>>0xC               belong    0x44
414>>>0x54             belong    1
415>>>>0x60  belong    4
416>>>>>0x64 belong    1
417>>>>>>0x68          belong    2
418>>>>>>>0x74         belong    0x2C
419>>>>>>>>0xB4        belong    4                   core file
420>>>>>>>>>0x44       string    >\0                 from '%s'
421>>>>>>>>>0xC4       belong    3                   - received SIGQUIT
422>>>>>>>>>0xC4       belong    4                   - received SIGILL
423>>>>>>>>>0xC4       belong    5                   - received SIGTRAP
424>>>>>>>>>0xC4       belong    6                   - received SIGABRT
425>>>>>>>>>0xC4       belong    7                   - received SIGEMT
426>>>>>>>>>0xC4       belong    8                   - received SIGFPE
427>>>>>>>>>0xC4       belong    10                  - received SIGBUS
428>>>>>>>>>0xC4       belong    11                  - received SIGSEGV
429>>>>>>>>>0xC4       belong    12                  - received SIGSYS
430>>>>>>>>>0xC4       belong    33                  - received SIGXCPU
431>>>>>>>>>0xC4       belong    34                  - received SIGXFSZ
432
433
434