hp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. #------------------------------------------------------------------------------
  2. # $File: hp,v 1.24 2014/04/30 21:41:02 christos Exp $
  3. # hp: file(1) magic for Hewlett Packard machines (see also "printer")
  4. #
  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.
  8. #
  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.
  12. #
  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.
  17. #
  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"
  24. # completely?
  25. #
  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
  35. #
  36. # The "misc" stuff needs a byte order; the archives look suspiciously
  37. # like the old 177545 archives (0xff65 = 0177545).
  38. #
  39. #### Old Apollo stuff
  40. 0 beshort 0627 Apollo m68k COFF executable
  41. >18 beshort ^040000 not stripped
  42. >22 beshort >0 - version %d
  43. 0 beshort 0624 apollo a88k COFF executable
  44. >18 beshort ^040000 not stripped
  45. >22 beshort >0 - version %d
  46. 0 long 01203604016 TML 0123 byte-order format
  47. 0 long 01702407010 TML 1032 byte-order format
  48. 0 long 01003405017 TML 2301 byte-order format
  49. 0 long 01602007412 TML 3210 byte-order format
  50. #### PA-RISC 1.1
  51. 0 belong 0x02100106 PA-RISC1.1 relocatable object
  52. 0 belong 0x02100107 PA-RISC1.1 executable
  53. >168 belong &0x00000004 dynamically linked
  54. >(144) belong 0x054ef630 dynamically linked
  55. >96 belong >0 - not stripped
  56. 0 belong 0x02100108 PA-RISC1.1 shared executable
  57. >168 belong&0x4 0x4 dynamically linked
  58. >(144) belong 0x054ef630 dynamically linked
  59. >96 belong >0 - not stripped
  60. 0 belong 0x0210010b PA-RISC1.1 demand-load executable
  61. >168 belong&0x4 0x4 dynamically linked
  62. >(144) belong 0x054ef630 dynamically linked
  63. >96 belong >0 - not stripped
  64. 0 belong 0x0210010e PA-RISC1.1 shared library
  65. >96 belong >0 - not stripped
  66. 0 belong 0x0210010d PA-RISC1.1 dynamic load library
  67. >96 belong >0 - not stripped
  68. #### PA-RISC 2.0
  69. 0 belong 0x02140106 PA-RISC2.0 relocatable object
  70. 0 belong 0x02140107 PA-RISC2.0 executable
  71. >168 belong &0x00000004 dynamically linked
  72. >(144) belong 0x054ef630 dynamically linked
  73. >96 belong >0 - not stripped
  74. 0 belong 0x02140108 PA-RISC2.0 shared executable
  75. >168 belong &0x00000004 dynamically linked
  76. >(144) belong 0x054ef630 dynamically linked
  77. >96 belong >0 - not stripped
  78. 0 belong 0x0214010b PA-RISC2.0 demand-load executable
  79. >168 belong &0x00000004 dynamically linked
  80. >(144) belong 0x054ef630 dynamically linked
  81. >96 belong >0 - not stripped
  82. 0 belong 0x0214010e PA-RISC2.0 shared library
  83. >96 belong >0 - not stripped
  84. 0 belong 0x0214010d PA-RISC2.0 dynamic load library
  85. >96 belong >0 - not stripped
  86. #### 800
  87. 0 belong 0x020b0106 PA-RISC1.0 relocatable object
  88. 0 belong 0x020b0107 PA-RISC1.0 executable
  89. >168 belong&0x4 0x4 dynamically linked
  90. >(144) belong 0x054ef630 dynamically linked
  91. >96 belong >0 - not stripped
  92. 0 belong 0x020b0108 PA-RISC1.0 shared executable
  93. >168 belong&0x4 0x4 dynamically linked
  94. >(144) belong 0x054ef630 dynamically linked
  95. >96 belong >0 - not stripped
  96. 0 belong 0x020b010b PA-RISC1.0 demand-load executable
  97. >168 belong&0x4 0x4 dynamically linked
  98. >(144) belong 0x054ef630 dynamically linked
  99. >96 belong >0 - not stripped
  100. 0 belong 0x020b010e PA-RISC1.0 shared library
  101. >96 belong >0 - not stripped
  102. 0 belong 0x020b010d PA-RISC1.0 dynamic load library
  103. >96 belong >0 - not stripped
  104. 0 belong 0x213c6172 archive file
  105. >68 belong 0x020b0619 - PA-RISC1.0 relocatable library
  106. >68 belong 0x02100619 - PA-RISC1.1 relocatable library
  107. >68 belong 0x02110619 - PA-RISC1.2 relocatable library
  108. >68 belong 0x02140619 - PA-RISC2.0 relocatable library
  109. #### 500
  110. 0 long 0x02080106 HP s500 relocatable executable
  111. >16 long >0 - version %d
  112. 0 long 0x02080107 HP s500 executable
  113. >16 long >0 - version %d
  114. 0 long 0x02080108 HP s500 pure executable
  115. >16 long >0 - version %d
  116. #### 200
  117. 0 belong 0x020c0108 HP s200 pure executable
  118. >4 beshort >0 - version %d
  119. >8 belong &0x80000000 save fp regs
  120. >8 belong &0x40000000 dynamically linked
  121. >8 belong &0x20000000 debuggable
  122. >36 belong >0 not stripped
  123. 0 belong 0x020c0107 HP s200 executable
  124. >4 beshort >0 - version %d
  125. >8 belong &0x80000000 save fp regs
  126. >8 belong &0x40000000 dynamically linked
  127. >8 belong &0x20000000 debuggable
  128. >36 belong >0 not stripped
  129. 0 belong 0x020c010b HP s200 demand-load executable
  130. >4 beshort >0 - version %d
  131. >8 belong &0x80000000 save fp regs
  132. >8 belong &0x40000000 dynamically linked
  133. >8 belong &0x20000000 debuggable
  134. >36 belong >0 not stripped
  135. 0 belong 0x020c0106 HP s200 relocatable executable
  136. >4 beshort >0 - version %d
  137. >6 beshort >0 - highwater %d
  138. >8 belong &0x80000000 save fp regs
  139. >8 belong &0x20000000 debuggable
  140. >8 belong &0x10000000 PIC
  141. 0 belong 0x020a0108 HP s200 (2.x release) pure executable
  142. >4 beshort >0 - version %d
  143. >36 belong >0 not stripped
  144. 0 belong 0x020a0107 HP s200 (2.x release) executable
  145. >4 beshort >0 - version %d
  146. >36 belong >0 not stripped
  147. 0 belong 0x020c010e HP s200 shared library
  148. >4 beshort >0 - version %d
  149. >6 beshort >0 - highwater %d
  150. >36 belong >0 not stripped
  151. 0 belong 0x020c010d HP s200 dynamic load library
  152. >4 beshort >0 - version %d
  153. >6 beshort >0 - highwater %d
  154. >36 belong >0 not stripped
  155. #### MISC
  156. 0 long 0x0000ff65 HP old archive
  157. 0 long 0x020aff65 HP s200 old archive
  158. 0 long 0x020cff65 HP s200 old archive
  159. 0 long 0x0208ff65 HP s500 old archive
  160. 0 long 0x015821a6 HP core file
  161. 0 long 0x4da7eee8 HP-WINDOWS font
  162. >8 byte >0 - version %d
  163. 0 string Bitmapfile HP Bitmapfile
  164. 0 string IMGfile CIS compimg HP Bitmapfile
  165. # XXX - see "lif"
  166. #0 short 0x8000 lif file
  167. 0 long 0x020c010c compiled Lisp
  168. 0 string msgcat01 HP NLS message catalog,
  169. >8 long >0 %d messages
  170. # Summary: HP-48/49 calculator
  171. # Created by: phk@data.fls.dk
  172. # Modified by (1): AMAKAWA Shuhei <sa264@cam.ac.uk>
  173. # Modified by (2): Samuel Thibault <samuel.thibault@ens-lyon.org> (HP49 support)
  174. 0 string HPHP HP
  175. >4 string 48 48 binary
  176. >4 string 49 49 binary
  177. >7 byte >64 - Rev %c
  178. >8 leshort 0x2911 (ADR)
  179. >8 leshort 0x2933 (REAL)
  180. >8 leshort 0x2955 (LREAL)
  181. >8 leshort 0x2977 (COMPLX)
  182. >8 leshort 0x299d (LCOMPLX)
  183. >8 leshort 0x29bf (CHAR)
  184. >8 leshort 0x29e8 (ARRAY)
  185. >8 leshort 0x2a0a (LNKARRAY)
  186. >8 leshort 0x2a2c (STRING)
  187. >8 leshort 0x2a4e (HXS)
  188. >8 leshort 0x2a74 (LIST)
  189. >8 leshort 0x2a96 (DIR)
  190. >8 leshort 0x2ab8 (ALG)
  191. >8 leshort 0x2ada (UNIT)
  192. >8 leshort 0x2afc (TAGGED)
  193. >8 leshort 0x2b1e (GROB)
  194. >8 leshort 0x2b40 (LIB)
  195. >8 leshort 0x2b62 (BACKUP)
  196. >8 leshort 0x2b88 (LIBDATA)
  197. >8 leshort 0x2d9d (PROG)
  198. >8 leshort 0x2dcc (CODE)
  199. >8 leshort 0x2e48 (GNAME)
  200. >8 leshort 0x2e6d (LNAME)
  201. >8 leshort 0x2e92 (XLIB)
  202. 0 string %%HP: HP text
  203. >6 string T(0) - T(0)
  204. >6 string T(1) - T(1)
  205. >6 string T(2) - T(2)
  206. >6 string T(3) - T(3)
  207. >10 string A(D) A(D)
  208. >10 string A(R) A(R)
  209. >10 string A(G) A(G)
  210. >14 string F(.) F(.);
  211. >14 string F(,) F(,);
  212. # Summary: HP-38/39 calculator
  213. # Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
  214. 0 string HP3
  215. >3 string 8 HP 38
  216. >3 string 9 HP 39
  217. >4 string Bin binary
  218. >4 string Asc ASCII
  219. >7 string A (Directory List)
  220. >7 string B (Zaplet)
  221. >7 string C (Note)
  222. >7 string D (Program)
  223. >7 string E (Variable)
  224. >7 string F (List)
  225. >7 string G (Matrix)
  226. >7 string H (Library)
  227. >7 string I (Target List)
  228. >7 string J (ASCII Vector specification)
  229. >7 string K (wildcard)
  230. # Summary: HP-38/39 calculator
  231. # Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
  232. 0 string HP3
  233. >3 string 8 HP 38
  234. >3 string 9 HP 39
  235. >4 string Bin binary
  236. >4 string Asc ASCII
  237. >7 string A (Directory List)
  238. >7 string B (Zaplet)
  239. >7 string C (Note)
  240. >7 string D (Program)
  241. >7 string E (Variable)
  242. >7 string F (List)
  243. >7 string G (Matrix)
  244. >7 string H (Library)
  245. >7 string I (Target List)
  246. >7 string J (ASCII Vector specification)
  247. >7 string K (wildcard)
  248. # hpBSD magic numbers
  249. 0 beshort 200 hp200 (68010) BSD
  250. >2 beshort 0407 impure binary
  251. >2 beshort 0410 read-only binary
  252. >2 beshort 0413 demand paged binary
  253. 0 beshort 300 hp300 (68020+68881) BSD
  254. >2 beshort 0407 impure binary
  255. >2 beshort 0410 read-only binary
  256. >2 beshort 0413 demand paged binary
  257. #
  258. # From David Gero <dgero@nortelnetworks.com>
  259. # HP-UX 10.20 core file format from /usr/include/sys/core.h
  260. # Unfortunately, HP-UX uses corehead blocks without specifying the order
  261. # There are four we care about:
  262. # CORE_KERNEL, which starts with the string "HP-UX"
  263. # CORE_EXEC, which contains the name of the command
  264. # CORE_PROC, which contains the signal number that caused the core dump
  265. # CORE_FORMAT, which contains the version of the core file format (== 1)
  266. # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
  267. # but we include all 6 variations of the order of the first 3, and
  268. # assume that PROC will always be last
  269. # Order 1: KERNEL, EXEC, FORMAT, PROC
  270. 0x10 string HP-UX
  271. >0 belong 2
  272. >>0xC belong 0x3C
  273. >>>0x4C belong 0x100
  274. >>>>0x58 belong 0x44
  275. >>>>>0xA0 belong 1
  276. >>>>>>0xAC belong 4
  277. >>>>>>>0xB0 belong 1
  278. >>>>>>>>0xB4 belong 4 core file
  279. >>>>>>>>>0x90 string >\0 from '%s'
  280. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  281. >>>>>>>>>0xC4 belong 4 - received SIGILL
  282. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  283. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  284. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  285. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  286. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  287. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  288. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  289. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  290. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  291. # Order 2: KERNEL, FORMAT, EXEC, PROC
  292. >>>0x4C belong 1
  293. >>>>0x58 belong 4
  294. >>>>>0x5C belong 1
  295. >>>>>>0x60 belong 0x100
  296. >>>>>>>0x6C belong 0x44
  297. >>>>>>>>0xB4 belong 4 core file
  298. >>>>>>>>>0xA4 string >\0 from '%s'
  299. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  300. >>>>>>>>>0xC4 belong 4 - received SIGILL
  301. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  302. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  303. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  304. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  305. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  306. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  307. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  308. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  309. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  310. # Order 3: FORMAT, KERNEL, EXEC, PROC
  311. 0x24 string HP-UX
  312. >0 belong 1
  313. >>0xC belong 4
  314. >>>0x10 belong 1
  315. >>>>0x14 belong 2
  316. >>>>>0x20 belong 0x3C
  317. >>>>>>0x60 belong 0x100
  318. >>>>>>>0x6C belong 0x44
  319. >>>>>>>>0xB4 belong 4 core file
  320. >>>>>>>>>0xA4 string >\0 from '%s'
  321. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  322. >>>>>>>>>0xC4 belong 4 - received SIGILL
  323. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  324. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  325. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  326. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  327. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  328. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  329. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  330. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  331. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  332. # Order 4: EXEC, KERNEL, FORMAT, PROC
  333. 0x64 string HP-UX
  334. >0 belong 0x100
  335. >>0xC belong 0x44
  336. >>>0x54 belong 2
  337. >>>>0x60 belong 0x3C
  338. >>>>>0xA0 belong 1
  339. >>>>>>0xAC belong 4
  340. >>>>>>>0xB0 belong 1
  341. >>>>>>>>0xB4 belong 4 core file
  342. >>>>>>>>>0x44 string >\0 from '%s'
  343. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  344. >>>>>>>>>0xC4 belong 4 - received SIGILL
  345. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  346. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  347. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  348. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  349. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  350. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  351. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  352. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  353. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  354. # Order 5: FORMAT, EXEC, KERNEL, PROC
  355. 0x78 string HP-UX
  356. >0 belong 1
  357. >>0xC belong 4
  358. >>>0x10 belong 1
  359. >>>>0x14 belong 0x100
  360. >>>>>0x20 belong 0x44
  361. >>>>>>0x68 belong 2
  362. >>>>>>>0x74 belong 0x3C
  363. >>>>>>>>0xB4 belong 4 core file
  364. >>>>>>>>>0x58 string >\0 from '%s'
  365. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  366. >>>>>>>>>0xC4 belong 4 - received SIGILL
  367. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  368. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  369. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  370. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  371. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  372. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  373. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  374. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  375. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  376. # Order 6: EXEC, FORMAT, KERNEL, PROC
  377. >0 belong 0x100
  378. >>0xC belong 0x44
  379. >>>0x54 belong 1
  380. >>>>0x60 belong 4
  381. >>>>>0x64 belong 1
  382. >>>>>>0x68 belong 2
  383. >>>>>>>0x74 belong 0x2C
  384. >>>>>>>>0xB4 belong 4 core file
  385. >>>>>>>>>0x44 string >\0 from '%s'
  386. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  387. >>>>>>>>>0xC4 belong 4 - received SIGILL
  388. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  389. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  390. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  391. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  392. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  393. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  394. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  395. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  396. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ