hp 13 KB

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