hp revision 68349
168349Sobrien
268349Sobrien#------------------------------------------------------------------------------
368349Sobrien# hp:  file(1) magic for Hewlett Packard machines (see also "printer")
468349Sobrien#
568349Sobrien# XXX - somebody should figure out whether any byte order needs to be
668349Sobrien# applied to the "TML" stuff; I'm assuming the Apollo stuff is
768349Sobrien# big-endian as it was mostly 68K-based.
868349Sobrien#
968349Sobrien# I think the 500 series was the old stack-based machines, running a
1068349Sobrien# UNIX environment atop the "SUN kernel"; dunno whether it was
1168349Sobrien# big-endian or little-endian.
1268349Sobrien#
1368349Sobrien# Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
1468349Sobrien# hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
1568349Sobrien# HP magic is useful for reference, but using "long" magic is a better
1668349Sobrien# practice in order to avoid collisions.
1768349Sobrien#
1868349Sobrien# Guy Harris (guy@netapp.com): some additions to this list came from
1968349Sobrien# HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
2068349Sobrien# 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
2168349Sobrien# "/etc/magic", though, except for the "archive file relocatable library"
2268349Sobrien# stuff, and the 68030 and 68040 stuff isn't there at all - are they not
2368349Sobrien# used in executables, or have they just not yet updated "/etc/magic"
2468349Sobrien# completely?
2568349Sobrien#
2668349Sobrien# 0	beshort		200		hp200 (68010) BSD binary
2768349Sobrien# 0	beshort		300		hp300 (68020+68881) BSD binary
2868349Sobrien# 0	beshort		0x20c		hp200/300 HP-UX binary
2968349Sobrien# 0	beshort		0x20d		hp400 (68030) HP-UX binary
3068349Sobrien# 0	beshort		0x20e		hp400 (68040?) HP-UX binary
3168349Sobrien# 0	beshort		0x20b		PA-RISC1.0 HP-UX binary
3268349Sobrien# 0	beshort		0x210		PA-RISC1.1 HP-UX binary
3368349Sobrien# 0	beshort		0x211		PA-RISC1.2 HP-UX binary
3468349Sobrien# 0	beshort		0x214		PA-RISC2.0 HP-UX binary
3568349Sobrien
3668349Sobrien#
3768349Sobrien# The "misc" stuff needs a byte order; the archives look suspiciously
3868349Sobrien# like the old 177545 archives (0xff65 = 0177545).
3968349Sobrien#
4068349Sobrien#### Old Apollo stuff
4168349Sobrien0	beshort		0627		Apollo m68k COFF executable
4268349Sobrien>18	beshort		^040000		not stripped
4368349Sobrien>22	beshort		>0		- version %ld
4468349Sobrien0	beshort		0624		apollo a88k COFF executable
4568349Sobrien>18	beshort		^040000		not stripped
4668349Sobrien>22	beshort		>0		- version %ld
4768349Sobrien0       long            01203604016     TML 0123 byte-order format
4868349Sobrien0       long            01702407010     TML 1032 byte-order format
4968349Sobrien0       long            01003405017     TML 2301 byte-order format
5068349Sobrien0       long            01602007412     TML 3210 byte-order format
5168349Sobrien#### PA-RISC 1.1
5268349Sobrien0	belong 		0x02100106	PA-RISC1.1 relocatable object
5368349Sobrien0	belong 		0x02100107	PA-RISC1.1 executable
5468349Sobrien>168	belong		&0x00000004	dynamically linked
5568349Sobrien>(144)	belong		0x054ef630	dynamically linked
5668349Sobrien>96	belong		>0		- not stripped
5768349Sobrien
5868349Sobrien0	belong 		0x02100108	PA-RISC1.1 shared executable
5968349Sobrien>168	belong&0x4	0x4		dynamically linked
6068349Sobrien>(144)	belong		0x054ef630	dynamically linked
6168349Sobrien>96	belong		>0		- not stripped
6268349Sobrien
6368349Sobrien0	belong 		0x0210010b	PA-RISC1.1 demand-load executable
6468349Sobrien>168	belong&0x4	0x4		dynamically linked
6568349Sobrien>(144)	belong		0x054ef630	dynamically linked
6668349Sobrien>96	belong		>0		- not stripped
6768349Sobrien
6868349Sobrien0	belong 		0x0210010e	PA-RISC1.1 shared library
6968349Sobrien>96	belong		>0		- not stripped
7068349Sobrien
7168349Sobrien0	belong 		0x0210010d	PA-RISC1.1 dynamic load library
7268349Sobrien>96	belong		>0		- not stripped
7368349Sobrien
7468349Sobrien#### PA-RISC 2.0
7568349Sobrien0	belong		0x02140106	PA-RISC2.0 relocatable object
7668349Sobrien
7768349Sobrien0       belong		0x02140107	PA-RISC2.0 executable
7868349Sobrien>168	belong		&0x00000004	dynamically linked
7968349Sobrien>(144)	belong		0x054ef630	dynamically linked
8068349Sobrien>96	belong		>0		- not stripped
8168349Sobrien
8268349Sobrien0       belong		0x02140108	PA-RISC2.0 shared executable
8368349Sobrien>168	belong		&0x00000004	dynamically linked
8468349Sobrien>(144)	belong		0x054ef630	dynamically linked
8568349Sobrien>96	belong		>0		- not stripped
8668349Sobrien
8768349Sobrien0       belong		0x0214010b	PA-RISC2.0 demand-load executable
8868349Sobrien>168	belong		&0x00000004	dynamically linked
8968349Sobrien>(144)	belong		0x054ef630	dynamically linked
9068349Sobrien>96	belong		>0		- not stripped
9168349Sobrien
9268349Sobrien0       belong		0x0214010e	PA-RISC2.0 shared library
9368349Sobrien>96	belong		>0		- not stripped
9468349Sobrien
9568349Sobrien0       belong		0x0214010d	PA-RISC2.0 dynamic load library
9668349Sobrien>96	belong		>0		- not stripped
9768349Sobrien
9868349Sobrien#### 800
9968349Sobrien0	belong 		0x020b0106	PA-RISC1.0 relocatable object
10068349Sobrien
10168349Sobrien0	belong 		0x020b0107	PA-RISC1.0 executable
10268349Sobrien>168	belong&0x4	0x4		dynamically linked
10368349Sobrien>(144)	belong		0x054ef630	dynamically linked
10468349Sobrien>96	belong		>0		- not stripped
10568349Sobrien
10668349Sobrien0	belong 		0x020b0108	PA-RISC1.0 shared executable
10768349Sobrien>168	belong&0x4	0x4		dynamically linked
10868349Sobrien>(144)	belong		0x054ef630	dynamically linked
10968349Sobrien>96	belong		>0		- not stripped
11068349Sobrien
11168349Sobrien0	belong 		0x020b010b	PA-RISC1.0 demand-load executable
11268349Sobrien>168	belong&0x4	0x4		dynamically linked
11368349Sobrien>(144)	belong		0x054ef630	dynamically linked
11468349Sobrien>96	belong		>0		- not stripped
11568349Sobrien
11668349Sobrien0	belong 		0x020b010e	PA-RISC1.0 shared library
11768349Sobrien>96	belong		>0		- not stripped
11868349Sobrien
11968349Sobrien0	belong 		0x020b010d	PA-RISC1.0 dynamic load library
12068349Sobrien>96	belong		>0		- not stripped
12168349Sobrien
12268349Sobrien0	belong		0x213c6172	archive file
12368349Sobrien>68	belong 		0x020b0619	- PA-RISC1.0 relocatable library
12468349Sobrien>68	belong	 	0x02100619	- PA-RISC1.1 relocatable library
12568349Sobrien>68	belong 		0x02110619	- PA-RISC1.2 relocatable library
12668349Sobrien>68	belong 		0x02140619	- PA-RISC2.0 relocatable library
12768349Sobrien
12868349Sobrien#### 500
12968349Sobrien0	long		0x02080106	HP s500 relocatable executable
13068349Sobrien>16	long		>0		- version %ld
13168349Sobrien
13268349Sobrien0	long		0x02080107	HP s500 executable
13368349Sobrien>16	long		>0		- version %ld
13468349Sobrien
13568349Sobrien0	long		0x02080108	HP s500 pure executable
13668349Sobrien>16	long		>0		- version %ld
13768349Sobrien
13868349Sobrien#### 200
13968349Sobrien0	belong 		0x020c0108	HP s200 pure executable
14068349Sobrien>4	beshort		>0		- version %ld
14168349Sobrien>8	belong		&0x80000000	save fp regs
14268349Sobrien>8	belong		&0x40000000	dynamically linked
14368349Sobrien>8	belong		&0x20000000	debuggable
14468349Sobrien>36	belong		>0		not stripped
14568349Sobrien
14668349Sobrien0	belong		0x020c0107	HP s200 executable
14768349Sobrien>4	beshort		>0		- version %ld
14868349Sobrien>8	belong		&0x80000000	save fp regs
14968349Sobrien>8	belong		&0x40000000	dynamically linked
15068349Sobrien>8	belong		&0x20000000	debuggable
15168349Sobrien>36	belong		>0		not stripped
15268349Sobrien
15368349Sobrien0	belong		0x020c010b	HP s200 demand-load executable
15468349Sobrien>4	beshort		>0		- version %ld
15568349Sobrien>8	belong		&0x80000000	save fp regs
15668349Sobrien>8	belong		&0x40000000	dynamically linked
15768349Sobrien>8	belong		&0x20000000	debuggable
15868349Sobrien>36	belong		>0		not stripped
15968349Sobrien
16068349Sobrien0	belong		0x020c0106	HP s200 relocatable executable
16168349Sobrien>4	beshort		>0		- version %ld
16268349Sobrien>6	beshort		>0		- highwater %d
16368349Sobrien>8	belong		&0x80000000	save fp regs
16468349Sobrien>8	belong		&0x20000000	debuggable
16568349Sobrien>8	belong		&0x10000000	PIC
16668349Sobrien
16768349Sobrien0	belong 		0x020a0108	HP s200 (2.x release) pure executable
16868349Sobrien>4	beshort		>0		- version %ld
16968349Sobrien>36	belong		>0		not stripped
17068349Sobrien
17168349Sobrien0	belong		0x020a0107	HP s200 (2.x release) executable
17268349Sobrien>4	beshort		>0		- version %ld
17368349Sobrien>36	belong		>0		not stripped
17468349Sobrien
17568349Sobrien0	belong		0x020c010e	HP s200 shared library
17668349Sobrien>4	beshort		>0		- version %ld
17768349Sobrien>6	beshort		>0		- highwater %d
17868349Sobrien>36	belong		>0		not stripped
17968349Sobrien
18068349Sobrien0	belong		0x020c010d	HP s200 dynamic load library
18168349Sobrien>4	beshort		>0		- version %ld
18268349Sobrien>6	beshort		>0		- highwater %d
18368349Sobrien>36	belong		>0		not stripped
18468349Sobrien
18568349Sobrien#### MISC
18668349Sobrien0	long		0x0000ff65	HP old archive
18768349Sobrien0	long		0x020aff65	HP s200 old archive
18868349Sobrien0	long		0x020cff65	HP s200 old archive
18968349Sobrien0	long		0x0208ff65	HP s500 old archive
19068349Sobrien
19168349Sobrien0	long		0x015821a6	HP core file
19268349Sobrien
19368349Sobrien0	long		0x4da7eee8	HP-WINDOWS font
19468349Sobrien>8	byte		>0		- version %ld
19568349Sobrien0	string		Bitmapfile	HP Bitmapfile
19668349Sobrien
19768349Sobrien0	string		IMGfile	CIS 	compimg HP Bitmapfile
19868349Sobrien# XXX - see "lif"
19968349Sobrien#0	short		0x8000		lif file
20068349Sobrien0	long		0x020c010c	compiled Lisp
20168349Sobrien
20268349Sobrien0	string		msgcat01	HP NLS message catalog,
20368349Sobrien>8	long		>0		%d messages
20468349Sobrien
20568349Sobrien# addendum to /etc/magic with HP-48sx file-types by phk@data.fls.dk 1jan92
20668349Sobrien0	string		HPHP48-		HP48 binary
20768349Sobrien>7	byte		>0		- Rev %c
20868349Sobrien>8	beshort		0x1129		(ADR)
20968349Sobrien>8	beshort		0x3329		(REAL)
21068349Sobrien>8	beshort		0x5529		(LREAL)
21168349Sobrien>8	beshort		0x7729		(COMPLX)
21268349Sobrien>8	beshort		0x9d29		(LCOMPLX)
21368349Sobrien>8	beshort		0xbf29		(CHAR)
21468349Sobrien>8	beshort		0xe829		(ARRAY)
21568349Sobrien>8	beshort		0x0a2a		(LNKARRAY)
21668349Sobrien>8	beshort		0x2c2a		(STRING)
21768349Sobrien>8	beshort		0x4e2a		(HXS)
21868349Sobrien>8	beshort		0x742a		(LIST)
21968349Sobrien>8	beshort		0x962a		(DIR)
22068349Sobrien>8	beshort		0xb82a		(ALG)
22168349Sobrien>8	beshort		0xda2a		(UNIT)
22268349Sobrien>8	beshort		0xfc2a		(TAGGED)
22368349Sobrien>8	beshort		0x1e2b		(GROB)
22468349Sobrien>8	beshort		0x402b		(LIB)
22568349Sobrien>8	beshort		0x622b		(BACKUP)
22668349Sobrien>8	beshort		0x882b		(LIBDATA)
22768349Sobrien>8	beshort		0x9d2d		(PROG)
22868349Sobrien>8	beshort		0xcc2d		(CODE)
22968349Sobrien>8	beshort		0x482e		(GNAME)
23068349Sobrien>8	beshort		0x6d2e		(LNAME)
23168349Sobrien>8	beshort		0x922e		(XLIB)
23268349Sobrien0	string		%%HP:		HP48 text
23368349Sobrien>6	string		T(0)		- T(0)
23468349Sobrien>6	string		T(1)		- T(1)
23568349Sobrien>6	string		T(2)		- T(2)
23668349Sobrien>6	string		T(3)		- T(3)
23768349Sobrien>10	string		A(D)		A(D)
23868349Sobrien>10	string		A(R)		A(R)
23968349Sobrien>10	string		A(G)		A(G)
24068349Sobrien>14	string		F(.)		F(.);
24168349Sobrien>14	string		F(,)		F(,);
24268349Sobrien
24368349Sobrien# hpBSD magic numbers
24468349Sobrien0	beshort		200		hp200 (68010) BSD
24568349Sobrien>2	beshort		0407		impure binary
24668349Sobrien>2	beshort		0410		read-only binary
24768349Sobrien>2	beshort		0413		demand paged binary
24868349Sobrien0	beshort		300		hp300 (68020+68881) BSD
24968349Sobrien>2	beshort		0407		impure binary
25068349Sobrien>2	beshort		0410		read-only binary
25168349Sobrien>2	beshort		0413		demand paged binary
252