home *** CD-ROM | disk | FTP | other *** search
/ BUG 1 / BUGCD1996_0708.ISO / pc / util / minilin / minilin.exe / ETC / MAGIC < prev    next >
Text File  |  1994-05-19  |  48KB  |  1,486 lines

  1. # Magic file created Thu May 19 03:24:41 CDT 1994 by fuzzy!root     tty2     May 19 00:00
  2. #! file
  3. # Magic data for file(1) command.
  4. # Machine-genererated from src/cmd/file/magdir/*; edit there only!
  5. # Format is described in magic(files), where:
  6. # files is 4 on V7 and BSD, 4 on SV, and ?? in the SVID.
  7. # $Id: Localstuff,v 1.2 93/01/05 13:22:25 ian Exp $
  8. # Add any locally-observed files here.  Remember:
  9. # text if readable, executable if runnable binary, data if unreadable.
  10. #
  11. # Alliant FX series a.out files:
  12. # If the FX series is the one that had a processor with a 68K-derived
  13. # instruction set, the "short" should probably become "beshort" and the
  14. # "long" should probably become "belong".
  15. # If it's the i860-based one, they should probably become either the
  16. # big-endian or little-endian versions, depending on the mode they ran
  17. # the 860 in....
  18. #
  19. 0    short        0420        0420 Alliant virtual executable
  20. >2    short        &0x0020        common library
  21. >16    long        >0        not stripped
  22. 0    short        0421        0421 Alliant compact executable
  23. >2    short        &0x0020        common library
  24. >16    long        >0        not stripped
  25. #
  26. # magic.apl:
  27. #
  28. 0    long        0100554        APL workspace (Ken's original?)
  29. #
  30. # "ar", for all kinds of archives.
  31. #
  32. # XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
  33. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  34. #
  35. # 0    string        !<arch>        current ar archive
  36. # 0    long        0x213c6172    archive file
  37. #
  38. # and for SVR3.1 archives, we have:
  39. #
  40. # 0    string        \<ar>        System V Release 1 ar archive
  41. # 0    string        =<ar>        archive
  42. # 0    string        =<ar>        archive
  43. #
  44. # XXX - did Aegis really store shared libraries, breakpointed modules,
  45. # and absolute code program modules in the same format as new-style
  46. # "ar" archives?
  47. #
  48. 0    string        !<arch>        current ar archive
  49. >8    string        __.SYMDEF    random library
  50. >0    belong        =65538        - pre SR9.5
  51. >0    belong        =65539        - post SR9.5
  52. >0    beshort        2        - object archive
  53. >0    beshort        3        - shared library module
  54. >0    beshort        4        - debug break-pointed module
  55. >0    beshort        5        - absolute code program module
  56. 0    string        \<ar>        System V Release 1 ar archive
  57. 0    string        =<ar>        archive
  58. #
  59. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  60. # thingies, to help you recognize VAX files on big-endian machines;
  61. # with "leshort", "lelong", and "string", that's no longer necessary....
  62. #
  63. # 0    long        0x3c61723e    VAX 5.0 archive
  64. #
  65. 0    long        0x213c6172    archive file
  66. 0    lelong        0177555        very old VAX archive
  67. 0    leshort        0177555        very old PDP-11 archive
  68. #
  69. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  70. # be a random library (it said 0xff65 rather than 0177545).
  71. #
  72. 0    lelong        0177545        old VAX archive
  73. >8    string        __.SYMDEF    random library
  74. 0    leshort        0177545        old PDP-11 archive
  75. >8    string        __.SYMDEF    random library
  76. #
  77. 0    string        =<ar>        archive
  78. #
  79. # From "pdp":
  80. #
  81. 0    lelong        0x39bed        PDP-11 old archive
  82. 0    lelong        0x39bee        PDP-11 4.0 archive
  83. #
  84. 0    string        -h-        Software Tools format archive text
  85. # "arc" archiver
  86. 0    byte        26        'arc' archive
  87. >1    byte        0        (empty)
  88. >1    byte        1        (old format)
  89. # Rahul Dhesi's zoo archive format, from keith@cerberus.uchicago.edu.
  90. 20    long        0xdca7c4fd    Rahul Dhesi's "zoo" archive
  91. # ZIP archiver
  92. 0    string        PK        zip archive file 
  93. >2    byte        >0        - version [%d
  94. >3    byte        >0        %d]
  95. #
  96. # AT&T 3B machines
  97. #
  98. # The `versions' should be un-commented if they work for you.
  99. # (Was the problem just one of endianness?)
  100. #
  101. # 3B20
  102. #
  103. 0    beshort        0550        3b20 COFF executable
  104. >12    belong        >0        not stripped
  105. #>22    beshort        >0        - version %ld
  106. 0    beshort        0551        3b20 COFF executable (TV)
  107. >12    belong        >0        not stripped
  108. #>22    beshort        >0        - version %ld
  109. #
  110. # WE32K
  111. #
  112. 0    beshort        0560        WE32000 COFF
  113. >18    beshort        ^00000020    object
  114. >18    beshort        &00000020    executable
  115. >12    belong        >0        not stripped
  116. >18    beshort        ^00010000    N/A on 3b2/300 w/paging
  117. >18    beshort        &00020000    32100 required
  118. >18    beshort        &00040000    and mau hardware required
  119. >20    beshort        0407        (impure)
  120. >20    beshort        0410        (pure)
  121. >20    beshort        0413        (demand paged)
  122. >20    beshort        0443        (target shared library)
  123. >22    beshort        >0        - version %ld
  124. 0    beshort        0561        WE32000 COFF executable (TV)
  125. >12    belong        >0        not stripped
  126. #>18    beshort        &00020000    - 32100 required
  127. #>18    beshort        &00040000    and mau hardware required
  128. #>22    beshort        >0        - version %ld
  129. # Sound formats, from Jan Nicolai Langfeldt <janl@ifi.uio.no>
  130. #
  131. # XXX -what the hell is the "mips" stuff doing there?  It looks like
  132. # the archive stuff from "iris"....
  133. #
  134. 0       string          .snd            audio data:
  135. >12     long            1               8-bit u-law,
  136. >12     long            2               8-bit linear PCM,
  137. >12     long            3               16-bit linear PCM,
  138. >12     long            4               24-bit linear PCM,
  139. >12     long            5               32-bit linear PCM,
  140. >12     long            6               32-bit floating point,
  141. >12     long            7               64-bit floating point,
  142. >12    long        23        compressed (G.721 ADPCM),
  143. >20     long            1               mono,
  144. >20     long            2               stereo,
  145. >20     long            4               quad,
  146. >16     long            x               %d Hz
  147. 8       long            0x41494646      AIFF sound data file
  148. 0       long            0x4e54524b      MultiTrack sound data file
  149. >4      long            x               - version %ld
  150. >20     string          U               with mipsucode members
  151. >21     string          L               with mipsel members
  152. >21     string          B               with mipseb members
  153. >19     string          L               and a EL hash tabl
  154. >19     string          B               and a EB hash tabl
  155. >22     string          X               -- out of date
  156. # 68K Blit stuff as seen from 680x0 machine
  157. # Note that this 0407 conflicts with several other a.out formats...
  158. #
  159. # XXX - should this be redone with "be" and "le", so that it works on
  160. # little-endian machines as well?  If so, what's the deal with
  161. # "VAX-order" and "VAX-order2"?
  162. #
  163. #0    long        0407        68K Blit (standalone) executable
  164. #0    short        0407        VAX-order2 68K Blit (standalone) executable
  165. 0    short        03401        VAX-order 68K Blit (standalone) executable
  166. 0    long        0406        68k Blit mpx/mux executable
  167. 0    short        0406        VAX-order2 68k Blit mpx/mux executable
  168. 0    short        03001        VAX-order 68k Blit mpx/mux executable
  169. # Need more values for WE32 DMD executables.
  170. # Note that 0520 is the same as COFF
  171. #0    short        0520        tty630 layers executable
  172. # BSDI BSD/386
  173. 0    long    0314    BSD/386 demand paged (first page unmapped) pure executable
  174. #    this first will upset you if you're a PL/1 shop...
  175. #    in which case rm it; ascmagic will catch real C programs
  176. 0    string        /*        c program text
  177. #
  178. # Intergraph, formerly Fairchild, Clipper.
  179. #
  180. # XXX - what byte order does the Clipper use?
  181. #
  182. # XXX - what's the "!" stuff:
  183. #
  184. # >18    short        !074000,000000    C1 R1 
  185. # >18    short        !074000,004000    C2 R1
  186. # >18    short        !074000,010000    C3 R1
  187. # >18    short        !074000,074000    TEST
  188. #
  189. # I shall assume it's ANDing the field with the first value and
  190. # comparing it with the second, and rewrite it as:
  191. #
  192. # >18    short&074000    000000        C1 R1 
  193. # >18    short&074000    004000        C2 R1
  194. # >18    short&074000    010000        C3 R1
  195. # >18    short&074000    074000        TEST
  196. #
  197. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  198. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  199. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  200. # somebody else thought was a good idea; it's not documented in the
  201. # man page for this version of "magic", nor does it appear to be
  202. # implemented (at least not after I blew off the bogus code to turn
  203. # old-style "&"s into new-style "&"s, which just didn't work at all).
  204. #
  205. 0    short        0575        CLIPPER COFF executable (VAX #)
  206. >20    short        0407        (impure)
  207. >20    short        0410        (5.2 compatible)
  208. >20    short        0411        (pure)
  209. >20    short        0413        (demand paged)
  210. >20    short        0443        (target shared library)
  211. >12    long        >0        not stripped
  212. >22    short        >0        - version %ld
  213. 0    short        0577        CLIPPER COFF executable
  214. >18    short&074000    000000        C1 R1 
  215. >18    short&074000    004000        C2 R1
  216. >18    short&074000    010000        C3 R1
  217. >18    short&074000    074000        TEST
  218. >20    short        0407        (impure)
  219. >20    short        0410        (pure)
  220. >20    short        0411        (separate I&D)
  221. >20    short        0413        (paged)
  222. >20    short        0443        (target shared library)
  223. >12    long        >0        not stripped
  224. >22    short        >0        - version %ld
  225. >48    long&01        01        alignment trap enabled
  226. >52    byte        1        -Ctnc
  227. >52    byte        2        -Ctsw
  228. >52    byte        3        -Ctpw
  229. >52    byte        4        -Ctcb
  230. >53    byte        1        -Cdnc
  231. >53    byte        2        -Cdsw
  232. >53    byte        3        -Cdpw
  233. >53    byte        4        -Cdcb
  234. >54    byte        1        -Csnc
  235. >54    byte        2        -Cssw
  236. >54    byte        3        -Cspw
  237. >54    byte        4        -Cscb
  238. 4    string        pipe        CLIPPER instruction trace
  239. 4    string        prof        CLIPPER instruction profile
  240. #
  241. # "Commands": stuff for various shells and interpreters.
  242. #
  243. 0    string        :\ shell archive or commands for antique kernel text
  244. 0    string        #!/bin/sh        Bourne Shell script text
  245. 0    string        #!\ /bin/sh        Bourne Shell script text
  246. 0    string        #!/bin/csh        C Shell script text
  247. 0    string        #!\ /bin/csh        C Shell script text
  248. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  249. 0    string        #!/bin/ksh        Korn Shell script text
  250. 0    string        #!\ /bin/ksh        Korn Shell script text
  251. 0    string         #!/bin/tcsh        Tenex C Shell script text
  252. 0    string         #!\ /bin/tcsh        Tenex C Shell script text
  253. 0    string        #!/usr/local/tcsh    Tenex C Shell script text
  254. 0    string         #!\ /usr/local/tcsh    Tenex C Shell script text
  255. 0    string        #!/usr/local/bin/tcsh    Tenex C Shell script text
  256. 0    string        #!\ /usr/local/bin/tcsh    Tenex C Shell script text
  257. 0    string        #!/bin/awk        Awk Commands text
  258. 0    string        #!\ /bin/awk        Awk Commands text
  259. 0    string        #!\ /            a
  260. >3    string        >\0            %s script
  261. 0    string        #!/            a
  262. >2    string        >\0            %s script
  263. 0    string        #!\             commands text
  264. >3    string        >\0            for %s
  265.  
  266. # For Larry Wall's perl language.  The ``eval'' line recognizes an
  267. # outrageously clever hack for USG systems.
  268. #                Keith Waclena <keith@cerberus.uchicago.edu>
  269. 0    string        #!/bin/perl    perl commands text
  270. 0    string        #!\ /bin/perl    perl commands text
  271. 0    string        eval\ "exec\ /bin/perl    perl commands text
  272. #
  273. # Formats for various forms of compressed data
  274. # Formats for "compress" proper have been moved into "compress.c",
  275. # because it tries to uncompress it to figure out what's inside.
  276. #
  277. # XXX - the two "packed data" versions are byte-swapped versions of
  278. # one another; is that because the 2-byte magic number is written
  279. # out in native byte order, with "unpack" figuring out the byte order
  280. # from the magic number (in which case both can be left as is, or
  281. # changed to specify a byte order *and* to indicate the byte order of
  282. # the packing machine), or because the old "file" didn't have any way of
  283. # having "magic"-file entries that specified a particular byte order?
  284. #
  285. 0    short        017436        packed data
  286. 0    short        017037        packed data
  287.  
  288. #
  289. # This magic number is byte-order-independent.
  290. #
  291. 0    short        017437        old packed data
  292.  
  293. #
  294. 0    string        \377\037    compacted data
  295. 0    short        0145405        huf output
  296. #
  297. # Squeeze and Crunch, from Keith Waclena <keith@cerberus.uchicago.edu>
  298. # These numbers were gleaned from the Unix versions of the programs to
  299. # handle these formats.  Note that I can only uncrunch, not crunch, and
  300. # I didn't have a crunched file handy, so the crunch number is untested.
  301. 0    short        0x76FF        squeezed data (CP/M, DOS)
  302. 0    short        0x76FE        crunched data (CP/M, DOS)
  303. # Freeze
  304. 0    short        0x1f9f        Frozen file 2.1
  305. 0    short        0x1f9e        Frozen file 1.0
  306. #
  307. # GNU gzip compressor, from christos@deshaw.com (Christos Zoulas)
  308. #
  309. 0       string          \037\213        gzip compressed file method:
  310. >2      byte            <8              reserved,
  311. >2      byte            8               deflate,
  312. >3    byte        &0x1f        flags: 
  313. >3    byte        &0x01        ascii-text,
  314. >3    byte        &0x02        multi-part,
  315. >3    byte        &0x04        name-present,
  316. >3    byte        &0x08        comment-present,
  317. >3    byte        &0x10        encrypted,
  318. >4    date        x        last modified: %s,
  319. >8    byte        x        extra-flags: %x,
  320. >9    byte        =0x00        os: MS/DOS
  321. >9    byte        =0x01        os: Amiga
  322. >9    byte        =0x02        os: VMS
  323. >9    byte        =0x03        os: Unix
  324. >9    byte        =0x05        os: Atari
  325. >9    byte        =0x06        os: OS/2
  326. >9    byte        =0x07        os: MacOS
  327. >9    byte        =0x0A        os: Tops/20
  328. >9    byte        =0x0B        os: Win/32
  329. #
  330. # XXX - what byte order does a Convex use?
  331. #
  332. 0    long        0513        Convex executable
  333. #
  334. # Yes, the two "cpio archive" formats *are* supposed to just be "short".
  335. # The idea is to indicate archives produced on machines with the same
  336. # byte order as the machine running "file" with "cpio archive", and
  337. # to indicate archives produced on machines with the opposite byte order
  338. # from the machine running "file" with "byte-swapped cpio archive".
  339. #
  340. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  341. # are defined as "short"s; I think all the new formats are
  342. # character-header formats, and thus are strings not numbers.
  343. #
  344. 0    short        070707        cpio archive
  345. 0    short        0143561        byte-swapped cpio archive
  346. 0    string        070707        ASCII cpio archive (pre-SVR4 or odc)
  347. 0    string        070701        ASCII cpio archive (SVR4 with no CRC)
  348. 0    string        070702        ASCII cpio archive (SVR4 with CRC)
  349. #
  350. # ... diamond is a multi-media mail and electronic conferencing system....
  351. #
  352. # XXX - I think it was either renamed Slate, or replaced by Slate....
  353. #
  354. #    The full deal is too long...
  355. #0    string    <list>\n<protocol\ bbn-multimedia-format>    Diamond Multimedia Document
  356. 0    string    =<list>\n<protocol\ bbn-m    Diamond Multimedia Document
  357. #
  358. # magic file lines for output from "diff"...
  359. 0    string        diff\     'diff' output text
  360. 0    string        ***\         'diff' output text
  361. 0    string        Only\ in\     'diff' output text
  362. 0    string        Common\ subdirectories:\     'diff' output text
  363. # Magic numbers for ditroff intermediate language
  364. 0    string        x\ T\ cat    titroff output for the C/A/T text
  365. 0    string        x\ T\ ps    titroff output for PostScript
  366. 0    string        x\ T         titroff output text
  367. #
  368. # magic.dump, dump file format. For new and old dump filesystems
  369. #
  370. # No, these shouldn't specify a specific byte order, because the byte
  371. # order is dependent on the machine that produced the dump.
  372. #
  373. 24    long    60012        new-fs dump file,
  374. >4    date    x        Previous dump %s,
  375. >8    date    x        This dump %s,
  376. >12    long    >0        Volume %ld,
  377. >692    long    0        Level zero, type:
  378. >692    long    >0        Level %d, type:
  379. >0    long    1        tape header,
  380. >0    long    2        beginning of file record,
  381. >0    long    3        map of inodes on tape,
  382. >0    long    4        continuation of file record,
  383. >0    long    5        end of volume,
  384. >0    long    6        map of inodes deleted,
  385. >0    long    7        end of medium (for floppy),
  386. >676    string    >\0        Label %s,
  387. >696    string    >\0        Filesystem %s,
  388. >760    string    >\0        Device %s,
  389. >824    string    >\0        Host %s,
  390. >888    long    >0        Flags %x
  391.  
  392. 24    long    60011        old-fs dump file,
  393. #>4    date    x        Previous dump %s,
  394. #>8    date    x        This dump %s,
  395. >12    long    >0        Volume %ld,
  396. >692    long    0        Level zero, type:
  397. >692    long    >0        Level %d, type:
  398. >0    long    1        tape header,
  399. >0    long    2        beginning of file record,
  400. >0    long    3        map of inodes on tape,
  401. >0    long    4        continuation of file record,
  402. >0    long    5        end of volume,
  403. >0    long    6        map of inodes deleted,
  404. >0    long    7        end of medium (for floppy),
  405. >676    string    >\0        Label %s,
  406. >696    string    >\0        Filesystem %s,
  407. >760    string    >\0        Device %s,
  408. >824    string    >\0        Host %s,
  409. >888    long    >0        Flags %x
  410. #
  411. # ELF
  412. # Missing MIPS image type and flags
  413. #
  414. # Question marks on processor types flag "should not happen because the
  415. # byte order is wrong".  We have to check the byte order flag to see what
  416. # byte order all the other stuff in the header is in.
  417. #
  418. 0    string        \177ELF        ELF
  419. >4    byte        0        invalid class
  420. >4    byte        1        32-bit
  421. >4    byte        2        64-bit
  422. >5    byte        0        invalid byte order
  423. >5    byte        1        LSB
  424. >>16    leshort        0        unknown type
  425. >>16    leshort        1        relocatable
  426. >>16    leshort        2        executable
  427. >>16    leshort        3        dynamic lib
  428. >>16    leshort        4        core file
  429. >>18    leshort        0        unknown machine
  430. >>18    leshort        1        WE32100 and up
  431. >>18    leshort        2        SPARC?
  432. >>18    leshort        3        i386 (386 and up)
  433. >>18    leshort        4        M68000?
  434. >>18    leshort        5        M88000?
  435. >>18    leshort        7        i860
  436. >>20    lelong        1        Version 1
  437. >>36    lelong        1        MathCoPro/FPU/MAU Required
  438. >5    byte        2        MSB
  439. >>16    beshort        0        unknown type
  440. >>16    beshort        1        relocatable
  441. >>16    beshort        2        executable
  442. >>16    beshort        3        dynamic lib
  443. >>16    beshort        4        core file
  444. >>18    beshort        0        unknown machine
  445. >>18    beshort        1        WE32100 and up
  446. >>18    beshort        2        SPARC
  447. >>18    beshort        3        i386 (386 and up)?
  448. >>18    beshort        4        M68000
  449. >>18    beshort        5        M88000
  450. >>18    beshort        7        i860
  451. >>20    belong        1        Version 1
  452. >>36    belong        1        MathCoPro/FPU/MAU Required
  453.  
  454. #
  455. # magic.encore: Recognize encore machines
  456. #
  457. # XXX - needs to have the byte order specified (NS32K was little-endian,
  458. # dunno whether they run the 88K in little-endian mode or not).
  459. #
  460. 0    short        0x154        Encore
  461. >20    short        0x107        executable
  462. >20    short        0x108        pure executable
  463. >20    short        0x10b        demand-paged executable
  464. >20    short        0x10f        unsupported executable
  465. >12    long        >0        not stripped
  466. >22    short        >0        - version %ld
  467. >22    short        0        -
  468. #>4    date        x        stamp %s
  469. 0    short        0x155        Encore unsupported executable
  470. >12    long        >0        not stripped
  471. >22    short        >0        - version %ld
  472. >22    short        0        -
  473. #>4    date        x        stamp %s
  474. 0    string    \366\366\366\366    Formatted floppy w/ no filesystem data
  475. 0    string    FONT    ASCII vfont text
  476. 0    short    0436    Berkeley vfont data
  477. 0    short    017001    byte-swapped Berkeley vfont data
  478. #
  479. # Magic number for FrameMaker files
  480. # This stuff came on a FrameMaker demo tape, most of which is
  481. # copyright, but this file is "published" as witness the following:
  482. #
  483. 0    string        \<MakerFile    FrameMaker document
  484. >11    string        3.0         (3.0
  485. >11    string        2.0         (2.0
  486. >11    string        1.0         (1.0
  487. >14    byte        x          %c)
  488. 0    string        \<MIFFile    FrameMaker MIF file
  489. >9    string        3.0         (3.0)
  490. >9    string        2.0         (2.0)
  491. >9    string        1.0         (1.x)
  492. 0    string        \<MakerDictionary    FraneMaker Dictionary text
  493. >17    string        3.0         (3.0)
  494. >17    string        2.0         (2.0)
  495. >17    string        1.0         (1.x)
  496. 0    string        \<MakerScreenFon    FrameMaker Font file
  497. >17    string        1.01         (%s)
  498. 0    string        \<MML        FrameMaker MML file
  499. 0    string        \<Book        FrameMaker Book file
  500. >10    string        3.0         (3.0
  501. >10    string        2.0         (2.0
  502. >10    string        1.0         (1.0
  503. >13    byte        x          %c)
  504. 0    string        \<Maker Intermediate Print File    FrameMaker IPL file
  505. 0    string        \<MakerDictionary    FraneMaker Dictionary text
  506. #
  507. # magic.hp: Hewlett Packard Magic
  508. #
  509. # XXX - somebody should figure out whether any byte order needs to be
  510. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  511. # big-endian as it was mostly 68K-based.
  512. #
  513. # HP-PA is big-endian, so it (and "800", which is *also* HP-PA-based; I
  514. # assume "HPPA-RISC1.1" really means "HP-PA Version 1.1", which first
  515. # showed up in the 700 series, although later 800 series machines are,
  516. # I think, based on the PA7100 which implements HP-PA 1.1) are flagged
  517. # as big-endian.
  518. #
  519. # I think the 500 series was the old stack-based machines, running a
  520. # UNIX environment atop the "SUN kernel"; dunno whether it was
  521. # big-endian or little-endian.
  522. #
  523. # I'm guessing that the 200 series was 68K-based; the 300 and 400 series
  524. # are.
  525. #
  526. # The "misc" stuff needs a byte order; the archives look suspiciously
  527. # like the old 177545 archives (0xff65 = 0177545).
  528. #
  529. #### Old Apollo stuff
  530. 0    beshort        0627        Apollo m68k COFF executable
  531. >18    beshort        ^040000        not stripped 
  532. >22    beshort        >0        - version %ld
  533. 0    beshort        0624        apollo a88k COFF executable
  534. >18    beshort        ^040000        not stripped 
  535. >22    beshort        >0        - version %ld
  536. 0       long            01203604016     TML 0123 byte-order format
  537. 0       long            01702407010     TML 1032 byte-order format
  538. 0       long            01003405017     TML 2301 byte-order format
  539. 0       long            01602007412     TML 3210 byte-order format
  540. #### HPPA
  541. 0    belong         0x02100106    HPPA-RISC1.1 relocatable object
  542. 0    belong         0x02100107    HPPA-RISC1.1 executable
  543. >(144)    belong        0x054ef630    dynamically linked
  544. >96    belong        >0        -not stripped
  545.  
  546. 0    belong         0x02100108    HPPA-RISC1.1 shared executable
  547. >(144)    belong        0x054ef630    dynamically linked
  548. >96    belong        >0        -not stripped
  549.  
  550. 0    belong         0x0210010b    HPPA-RISC1.1 demand-load executable
  551. >(144)    belong        0x054ef630    dynamically linked
  552. >96    belong        >0        -not stripped
  553.  
  554. 0    belong         0x0210010e    HPPA-RISC1.1 shared library
  555. >96    belong        >0        -not stripped
  556.  
  557. 0    belong         0x0210010d    HPPA-RISC1.1 dynamic load library
  558. >96    belong        >0        -not stripped
  559.  
  560. #### 800
  561. 0    belong         0x020b0106    HP s800 relocatable object
  562.  
  563. 0    belong         0x020b0107    HP s800 executable
  564. >(144)    belong        0x054ef630    dynamically linked
  565. >96    belong        >0        -not stripped
  566.  
  567. 0    belong         0x020b0108    HP s800 shared executable
  568. >(144)    belong        0x054ef630    dynamically linked
  569. >96    belong        >0        -not stripped
  570.  
  571. 0    belong         0x020b010b    HP s800 demand-load executable
  572. >(144)    belong        0x054ef630    dynamically linked
  573. >96    belong        >0        -not stripped
  574.  
  575. 0    belong         0x020b010e    HP s800 shared library
  576. >96    belong        >0        -not stripped
  577.  
  578. 0    belong         0x020b010d    HP s800 dynamic load library
  579. >96    belong        >0        -not stripped
  580.  
  581. 0    belong        0x213c6172    archive file
  582. >68    belong         0x020b0619    -HP s800 relocatable library
  583.  
  584. #### 500
  585. 0    long        0x02080106    HP s500 relocatable executable
  586. >16    long        >0        -version %ld
  587.  
  588. 0    long        0x02080107    HP s500 executable
  589. >16    long        >0        -version %ld
  590.  
  591. 0    long        0x02080108    HP s500 pure executable
  592. >16    long        >0        -version %ld
  593.  
  594. #### 200
  595. 0    belong         0x020c0108    HP s200 pure executable
  596. >4    beshort        >0        -version %ld
  597. >8    belong        &0x80000000    save fp regs
  598. >8    belong        &0x40000000    dynamically linked
  599. >8    belong        &0x20000000    debuggable
  600. >36    belong        >0        not stripped
  601.  
  602. 0    belong        0x020c0107    HP s200 executable
  603. >4    beshort        >0        -version %ld
  604. >8    belong        &0x80000000    save fp regs
  605. >8    belong        &0x40000000    dynamically linked
  606. >8    belong        &0x20000000    debuggable
  607. >36    belong        >0        not stripped
  608.  
  609. 0    belong        0x020c010b    HP s200 demand-load executable
  610. >4    beshort        >0        -version %ld
  611. >8    belong        &0x80000000    save fp regs
  612. >8    belong        &0x40000000    dynamically linked
  613. >8    belong        &0x20000000    debuggable
  614. >36    belong        >0        not stripped
  615.  
  616. 0    belong        0x020c0106    HP s200 relocatable executable
  617. >4    beshort        >0        -version %ld
  618. >6    beshort        >0        -highwater %d
  619. >8    belong        &0x80000000    save fp regs
  620. >8    belong        &0x20000000    debuggable
  621. >8    belong        &0x10000000    PIC
  622.  
  623. 0    belong         0x020a0108    HP s200 (2.x release) pure executable
  624. >4    beshort        >0        -version %ld
  625. >36    belong        >0        not stripped
  626.  
  627. 0    belong        0x020a0107    HP s200 (2.x release) executable
  628. >4    beshort        >0        -version %ld
  629. >36    belong        >0        not stripped
  630.  
  631. 0    belong        0x020c010e    HP s200 shared library
  632. >4    beshort        >0        -version %ld
  633. >6    beshort        >0        -highwater %d
  634. >36    belong        >0        not stripped
  635.  
  636. 0    belong        0x020c010d    HP s200 dynamic load library
  637. >4    beshort        >0        -version %ld
  638. >6    beshort        >0        -highwater %d
  639. >36    belong        >0        not stripped
  640.  
  641. #### MISC
  642. 0    long        0x0000ff65    HP old archive
  643. 0    long        0x020aff65    HP s200 old archive
  644. 0    long        0x020cff65    HP s200 old archive
  645. 0    long        0x0208ff65    HP s500 old archive
  646.  
  647. 0    long        0x015821a6    HP core file
  648.  
  649. 0    long        0x4da7eee8    HP-WINDOWS font
  650. >8    byte        >0        -version %ld
  651. 0    string        Bitmapfile    HP Bitmapfile
  652.  
  653. 0    string        IMGfile    CIS     compimg HP Bitmapfile
  654. 0    short        0x8000        lif file
  655. 0    long        0x020c010c    compiled Lisp
  656.  
  657. 0    string        msgcat01    HP NLS message catalog,
  658. >8    long        >0        %d messages
  659. #
  660. # IBM 370 and compatibles.
  661. #
  662. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  663. # What the heck *is* "USS/370"?
  664. #
  665. 0       beshort        0531        SVR2 executable (Amdahl-UTS)
  666. >12    belong        >0        not stripped
  667. >24     belong        >0        - version %ld
  668. 0    beshort        0534        SVR2 pure executable (Amdahl-UTS)
  669. >12    belong        >0        not stripped
  670. >24    belong        >0        - version %ld
  671. 0    beshort        0530        SVR2 pure executable (USS/370)
  672. >12    belong        >0        not stripped
  673. >24    belong        >0        - version %ld
  674. 0    beshort        0535        SVR2 executable (USS/370)
  675. >12    belong        >0        not stripped
  676. >24    belong        >0        - version %ld
  677.  
  678. #
  679. # magic.rs6000:
  680. #
  681. # RS/6000 and the RT PC.
  682. #
  683. 0    beshort        0x01df        executable (RISC System/6000 V3.1) or obj module
  684. >12    belong        >0        not stripped
  685. # Breaks sun4 statically linked execs.
  686. #0      beshort        0x0103        executable (RT Version 2) or obj module
  687. #>2    byte        0x50        pure
  688. #>28    belong        >0        not stripped
  689. #>6    beshort        >0        - version %ld
  690. 0    beshort        0x0104        shared library
  691. 0    beshort        0x0105        ctab data
  692. 0    beshort        0xfe04        structured file
  693. 0    string        0xabcdef    message catalog
  694. #0    string        <aiaff>        archive
  695. # image file format
  696. # From Robert Potter, potter@cs.rochester.edu
  697. 0    string        Imagefile\ version-    iff image data
  698. # this adds the whole header (inc. version number), informative but longish
  699. >10    string        >\0        %s
  700. # Tell file about magic for IMAGEN printer-ready files:
  701. 0    string    @document(        Imagen printer
  702. # this only works if "language xxx" is first item in Imagen header.
  703. >10    string    language\ impress    (imPRESS data)
  704. >10    string    language\ daisy        (daisywheel text)
  705. >10    string    language\ diablo        (daisywheel text)
  706. >10    string    language\ printer    (line printer emulation)
  707. >10    string    language\ tektronix    (Tektronix 4014 emulation)
  708. # Add any other languages that your Imagen uses - remember
  709. # to keep the word `text' if the file is human-readable.
  710. #
  711. # Now magic for IMAGEN font files...
  712. 0    string        Rast        RST-format raster font data
  713. >45    string        >0        face %
  714. # image formats, originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  715. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  716. # merging several one- and two-line files into here.
  717. #
  718. # XXX - byte order for GIF and TIFF fields?
  719. #
  720.  
  721. 0    string        xbtoa            btoa'd file
  722.  
  723. # PBMPLUS
  724. 0    string        P1            PBM file
  725. 0    string        P2            PGM file
  726. 0    string        P3            PPM file
  727. 0    string        P4            PBM "rawbits" file
  728. 0    string        P5            PGM "rawbits" file
  729. 0    string        P6            PPM "rawbits" file
  730.  
  731. # TIFF and friends
  732. 0    string        \115\115        TIFF file, big-endian
  733. >2      short           >0                  version %d
  734. 0    string        \111\111        TIFF file, little-endian
  735. >2      short           >0                  version %d
  736. #
  737. # NIFF (Navy Interchange File Format, a modification of TIFF)
  738. 0    string        IIN1            NIFF raster data
  739.  
  740. # GIF
  741. 0    string        GIF        GIF picture
  742. >3    string        87a        - version %s
  743. >3    string        89a        - version %s
  744. >6    short        >0        %d x
  745. >8    short        >0        %d,
  746. >10    byte        &0x40        interlaced,
  747. >10    byte&0x07    =0x00        2 colors
  748. >10    byte&0x07    =0x01        4 colors
  749. >10    byte&0x07    =0x02        8 colors
  750. >10    byte&0x07    =0x03        16 colors
  751. >10    byte&0x07    =0x04        32 colors
  752. >10    byte&0x07    =0x05        64 colors
  753. >10    byte&0x07    =0x06        128 colors
  754. >10    byte&0x07    =0x07        256 colors
  755.  
  756. # Miscellany
  757. 0    long        1123028772        Artisan image file
  758. >4    long        1    rectangular 24-bit image
  759. >4    long        2    rectangular 8-bit image with colormap
  760. >4      long            3    rectangular 32-bit image (24-bit with matte)
  761. 0    string        \361\0\100\273        CMU window manager bitmap
  762. 0    string        #FIG            FIG graphics savefile text
  763. >6      string          2.1                 Version 2.1
  764. >6      string          2.0                 Version 2.0
  765. 0    string        GKSM            GKS Metafile
  766. 8    string        ILBM            IFF ILBM file
  767. 0    string        yz            MGR bitmap
  768. 6    string        JFIF            JPEG picture
  769. 0       string          ARF_BEGARF          PHIGS clear text archive
  770. #
  771. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  772. # is in "microsoft").  DOS is in "ms-dos"; the ambitious soul can do
  773. # Windows as well.
  774. #
  775. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  776. # whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
  777. # as well, if, as, and when IBM makes it portable.
  778. #
  779. # The `versions' should be un-commented if they work for you.
  780. # (Was the problem just one of endianness?)
  781. #
  782. 0    leshort        0502        basic-16 executable
  783. >12    lelong        >0        not stripped
  784. #>22    leshort        >0        - version %ld
  785. 0    leshort        0503        basic-16 executable (TV)
  786. >12    lelong        >0        not stripped
  787. #>22    leshort        >0        - version %ld
  788. 0    leshort        0510        x86 executable
  789. >12    lelong        >0        not stripped
  790. 0    leshort        0511        x86 executable (TV)
  791. >12    lelong        >0        not stripped
  792. 0    leshort        =0512        iAPX 286 executable small model (COFF)
  793. >12    lelong        >0        not stripped
  794. #>22    leshort        >0        - version %ld
  795. 0    leshort        =0522        iAPX 286 executable large model (COFF)
  796. >12    lelong        >0        not stripped
  797. #>22    leshort        >0        - version %ld
  798. 0    leshort        =0514        80386 COFF executable
  799. >12    lelong        >0        not stripped
  800. >22    leshort        >0        - version %ld
  801. #
  802. # magic for InterLeaf TPS:
  803. 0    string        =\210OPS    Interleaf saved data
  804. 0    string        =<!OPS        Interleaf document text
  805. >5    string        ,\ Version\     (version
  806. >>14    string        >\0        %s)
  807.  
  808. #
  809. # magic.iris: Magic for mips from an iris4d
  810. #
  811. # Dunno what byte-order munging is needed; all of SGI's *current*
  812. # machines and OSes run in big-endian mode on the MIPS machines,
  813. # as far as I know, but they do have the MIPSEB and MIPSEL stuff
  814. # here....
  815. #
  816. 0    short        0x0160        mipseb
  817. >20    short        0407        executable
  818. >20    short        0410        pure
  819. >20    short        0413        demand paged
  820. >8    long        >0        not stripped
  821. >8    long        0        stripped
  822. >22    byte        >0        - version %ld.
  823. >23    byte        >0        %ld
  824. 0    short        0x0162        mipsel
  825. >20    short        0407        executable
  826. >20    short        0410        pure
  827. >20    short        0413        demand paged
  828. >8    long        >0        not stripped
  829. >8    long        0        stripped
  830. >23    byte        >0        - version %ld.
  831. >22    byte        >0        %ld
  832. 0    short        0x6001        swapped mipseb
  833. >20    short        03401        executable
  834. >20    short        04001        pure
  835. >20    short        05401        demand paged
  836. >8    long        >0        not stripped
  837. >8    long        0        stripped
  838. >22    byte        >0        - version %ld.
  839. >23    byte        >0        %ld
  840. 0    short        0x6201        swapped mipsel
  841. >20    short        03401        executable
  842. >20    short        04001        pure
  843. >20    short        05401        demand paged
  844. >8    long        >0        not stripped
  845. >8    long        0        stripped
  846. >22    byte        >0        - version %ld.
  847. >23    byte        >0        %ld
  848. 0    short        0x180        mipseb ucode
  849. 0    short        0x182        mipsel ucode
  850. #
  851. # IRIX core format version 1 (from /usr/include/core.out.h)
  852. 0    long        0xdeadadb0    IRIX core dump
  853. >4    long        1        of
  854. >16    string        >\0        '%s'
  855. #
  856. # Archives - This handles archive subtypes
  857. #
  858. 0    string        !<arch>\n__________E    MIPS archive
  859. >20    string        U            with mipsucode members
  860. >21    string        L            with mipsel members
  861. >21    string        B            with mipseb members
  862. >19    string        L            and a EL hash table
  863. >19    string        B            and a EB hash table
  864. >22    string        X            -- out of date
  865. #
  866. # magic.ispell
  867. #
  868. # XXX - byte order?
  869. #
  870. 0    short    0xffff9601    ispell hash file
  871. >2    short    0x00    - 8-bit, no capitalization, 26 flags
  872. >2    short    0x01    - 7-bit, no capitalization, 26 flags 
  873. >2    short    0x02    - 8-bit, capitalization, 26 flags
  874. >2    short    0x03    - 7-bit, capitalization, 26 flags 
  875. >2    short    0x04    - 8-bit, no capitalization, 52 flags
  876. >2    short    0x05    - 7-bit, no capitalization, 52 flags 
  877. >2    short    0x06    - 8-bit, capitalization, 52 flags
  878. >2    short    0x07    - 7-bit, capitalization, 52 flags 
  879. >2    short    0x08    - 8-bit, no capitalization, 128 flags
  880. >2    short    0x09    - 7-bit, no capitalization, 128 flags 
  881. >2    short    0x0A    - 8-bit, capitalization, 128 flags
  882. >2    short    0x0B    - 7-bit, capitalization, 128 flags 
  883. >2    short    0x0C    - 8-bit, no capitalization, 256 flags
  884. >2    short    0x0D    - 7-bit, no capitalization, 256 flags 
  885. >2    short    0x0E    - 8-bit, capitalization, 256 flags
  886. >2    short    0x0F    - 7-bit, capitalization, 256 flags 
  887. >4    short    >0    and %d string characters
  888. #    derived empirically, your offsets may vary!
  889. 53    string        yyprevious    c program text (from lex)
  890. >3    string        >\0         for %s
  891. #
  892. # magic.lif:
  893. #
  894. # XXX - byte order?
  895. #
  896. 0    short        0x8000        lif file
  897. # Values for Linux/i386 binaries, From: Rik Faith <faith@cs.unc.edu>
  898. 2       short           100             Linux/i386
  899. >0      short           0407            executable
  900. >0      short           0410            pure executable
  901. >0      short           0413            demand paged executable
  902. >16     long            >0              not stripped
  903. >0      string          Jump            jump
  904. # core dump file
  905. 216     long            0421            core file (Linux)
  906. 0    string        #\ Magic    magic text file for file(1) cmd
  907. # Unfortunately, saved netnews also has From line added in some news software.
  908. #0    string        From         mail text
  909. # There are tests to ascmagic.c to cope with mail and news.
  910. 0    string        Relay-Version:     old news text
  911. 0    string        #!\ rnews    batched news text
  912. 0    string        N#!\ rnews    mailed, batched news text
  913. 0    string        Forward\ to     mail forwarding text
  914. 0    string        Pipe\ to     mail piping text
  915. 0    string        Return-Path:    smtp mail text
  916. 0    string        Path:        news text
  917. 0    string        Xref:        news text
  918. 0    string        From:        news or mail text
  919. 0    string        Article     saved news text
  920. #
  921. # Microsoft (Xenix, not DOS)
  922. #
  923. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  924. # model" lifted from "magic.xenix", with comment "derived empirically;
  925. # treat as folklore until proven"
  926. #
  927. # "small model", "large model", "huge model" stuff lifted from XXX
  928. #
  929. # XXX - "x.out" collides with PDP-11 archives....
  930. #
  931. 0    string        core        core file (Xenix)
  932. 0    byte        0x80        8086 relocatable (Microsoft)
  933. 0    leshort        0xff65        x.out
  934. >2    string        __.SYMDEF     randomized
  935. >0    byte        x        archive
  936. 0    leshort        0x206        Microsoft a.out
  937. >8    leshort        1        Middle model
  938. >0x1e    leshort        &0x10        overlay
  939. >0x1e    leshort        &0x2        separate
  940. >0x1e    leshort        &0x4        pure
  941. >0x1e    leshort        &0x800        segmented
  942. >0x1e    leshort        &0x400        standalone
  943. >0x1e    leshort        &0x8        fixed-stack
  944. >0x1c    byte        &0x80        byte-swapped
  945. >0x1c    byte        &0x40        word-swapped
  946. >0x10    lelong        >0        not-stripped
  947. >0x1e    leshort        ^0xc000        pre-SysV
  948. >0x1c    byte        &0x4        86
  949. >0x1c    byte        &0x9        286
  950. >0x1c    byte        &0xa        386
  951. >0x1f    byte        <0x040        small model
  952. >0x1f    byte        =0x048        large model    
  953. >0x1f    byte        =0x049        huge model 
  954. >0x1e    leshort        &0x1        executable
  955. >0x1e    leshort        ^0x1        object file
  956. >0x1e    leshort        &0x40        Large Text
  957. >0x1e    leshort        &0x20        Large Data
  958. >0x1e    leshort        &0x120        Huge Objects Enabled
  959. >0x10    lelong        >0        not stripped
  960.  
  961. 0    leshort        0x140        old Microsoft 8086 x.out
  962. >0x3    byte        &0x4        separate
  963. >0x3    byte        &0x2        pure
  964. >0    byte        &0x1        executable
  965. >0    byte        ^0x1        relocatable
  966. >0x14    lelong        >0        not stripped
  967.  
  968. 0    lelong        0x206        b.out
  969. >0x1e    leshort        &0x10        overlay
  970. >0x1e    leshort        &0x2        separate
  971. >0x1e    leshort        &0x4        pure
  972. >0x1e    leshort        &0x800        segmented
  973. >0x1e    leshort        &0x400        standalone
  974. >0x1e    leshort        &0x1        executable
  975. >0x1e    leshort        ^0x1        object file
  976. >0x1e    leshort        &0x4000        V2.3
  977. >0x1e    leshort        &0x8000        V3.0
  978. >0x1c    byte        &0x4        86
  979. >0x1c    byte        &0xb        186
  980. >0x1c    byte        &0x9        286
  981. >0x1c    byte        &0x29        286
  982. >0x1c    byte        &0xa        386
  983. >0x1e    leshort        &0x4        Large Text
  984. >0x1e    leshort        &0x2        Large Data
  985. >0x1e    leshort        &0x102        Huge Objects Enabled
  986.  
  987. 0    leshort        0x580        XENIX 8086 relocatable or 80286 small model
  988. #
  989. # RISC MIPS decstation
  990. # Should this be "leshort", given that DEC ran the DECstations in
  991. # little-endian mode?
  992. #
  993. # Where is the non-SGI, non-DEC MIPS stuff?
  994. #
  995. 0    short        0x6201        MIPS executable
  996. #
  997. # XXX - byte order?
  998. #
  999. 0    long    31415        Mirage Assembler m.out executable
  1000. #
  1001. # ID is the binary tags database produced by mkid(1).
  1002. #
  1003. # XXX - byte order?
  1004. #
  1005. 0    string        \311\304    ID tags data
  1006. >2    short        >0        version %d
  1007. 0    long        0x1010101    MMDF mailbox
  1008. #
  1009. # Motorola
  1010. #
  1011. # 68K
  1012. #
  1013. 0    beshort        0520        mc68k COFF
  1014. >18    beshort        ^00000020    object
  1015. >18    beshort        &00000020    executable
  1016. >12    belong        >0        not stripped
  1017. >168    string        .lowmem        Apple toolbox
  1018. >20    beshort        0407        (impure)
  1019. >20    beshort        0410        (pure)
  1020. >20    beshort        0413        (demand paged)
  1021. >20    beshort        0421        (standalone)
  1022. 0    beshort        0521        mc68k executable (shared)
  1023. >12    belong        >0        not stripped
  1024. 0    beshort        0522        mc68k executable (shared demand paged)
  1025. >12    belong        >0        not stripped
  1026. #
  1027. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  1028. #
  1029. 0    beshort        0554        68K BCS executable
  1030. #
  1031. # 88K
  1032. #
  1033. # Motorola/88Open BCS
  1034. #
  1035. 0    beshort        0555        88K BCS executable
  1036. #
  1037. # Various MS-DOS magic numbers
  1038. #
  1039. 0    string        MZ        DOS executable (EXE)
  1040. 0    string        LZ        DOS executable (built-in)
  1041. 0    byte        0xe9        DOS executable (COM)
  1042. 0    byte        0xeb        DOS executable (COM)
  1043. 0    byte        0xf0        MS-DOS program library
  1044. #
  1045. # magic.tower:
  1046. #
  1047. # NCR Tower objects, contributed by
  1048. # Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne@ford-vax.arpa
  1049. # uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne@fmsrl7.UUCP
  1050. #
  1051. 0    beshort        000610    Tower/XP rel 2 object
  1052. >12       belong        >0    not stripped
  1053. >20       beshort        0407    executable
  1054. >20       beshort        0410    pure executable
  1055. >22       beshort        >0    - version %ld
  1056. 0    beshort        000615    Tower/XP rel 2 object
  1057. >12       belong        >0    not stripped
  1058. >20       beshort        0407    executable
  1059. >20       beshort        0410    pure executable
  1060. >22       beshort        >0    - version %ld
  1061. 0    beshort        000620    Tower/XP rel 3 object
  1062. >12       belong        >0    not stripped
  1063. >20       beshort        0407    executable
  1064. >20       beshort        0410    pure executable
  1065. >22       beshort        >0    - version %ld
  1066. 0    beshort        000625    Tower/XP rel 3 object
  1067. >12       belong        >0    not stripped
  1068. >20       beshort        0407    executable
  1069. >20       beshort        0410    pure executable
  1070. >22       beshort        >0    - version %ld
  1071. 0    beshort        000630    Tower32/600/400 68020 object
  1072. >12       belong        >0    not stripped
  1073. >20       beshort        0407    executable
  1074. >20       beshort        0410    pure executable
  1075. >22       beshort        >0    - version %ld
  1076. 0    beshort        000640    Tower32/800 68020
  1077. >18       beshort        &020000    w/68881 object
  1078. >18       beshort        &040000    compatible object
  1079. >18       beshort        &~060000    object
  1080. >20       beshort        0407    executable
  1081. >20       beshort        0413    pure executable
  1082. >12       belong        >0    not stripped
  1083. >22       beshort        >0    - version %ld
  1084. 0    beshort        000645    Tower32/800 68010
  1085. >18       beshort        &040000    compatible object
  1086. >18       beshort        &~060000 object
  1087. >20       beshort        0407    executable
  1088. >20       beshort        0413    pure executable
  1089. >12       belong        >0    not stripped
  1090. >22       beshort        >0    - version %ld
  1091. # NeWS, not "news" as in "netnews"
  1092. 0    string        StartFontMetrics    ASCII font metrics
  1093. 0    string        StartFont    ASCII font bits
  1094. 0    long        0x137A2944    NeWS bitmap font
  1095. 0    long        0x137A2947    NeWS font family
  1096. #
  1097. # XXX - byte order?
  1098. #
  1099. 0    short    0x2a17    "compact bitmap" format (Poskanzer)
  1100. #
  1101. # magic.pdp: PDP-11 executable/object and APL workspace
  1102. #
  1103. 0    lelong        0101555        PDP-11 single precision APL workspace
  1104. 0    lelong        0101554        PDP-11 double precision APL workspace
  1105.  
  1106. #
  1107. # PDP-11 a.out
  1108. #
  1109. 0    leshort        0407        PDP-11 executable
  1110. >8    leshort        >0        not stripped
  1111.  
  1112. 0    leshort        0401        PDP-11 UNIX/RT ldp
  1113. 0    leshort        0405        PDP-11 old overlay
  1114.  
  1115. 0    leshort        0410        PDP-11 pure executable
  1116. >8    leshort        >0        not stripped
  1117.  
  1118. 0    leshort        0411        PDP-11 separate I&D executable
  1119. >8    leshort        >0        not stripped
  1120.  
  1121. 0    leshort        0437        PDP-11 kernel overlay
  1122. #
  1123. # pgp (pretty good protection)
  1124. 0       short           0x9900                  pgp key public ring
  1125. 0       short           0x9501                  pgp key security ring
  1126. 0       string          -----BEGIN\040PGP       pgp armored data
  1127. >15     string          PUBLIC\040KEY\040BLOCK- public key blocK
  1128. >15     string          MESSAGE-                message
  1129. >15     string          SIGNED\040MESSAGE-      signed message
  1130. >15     string          PGP\040SIGNATURE-       signature
  1131. #
  1132. # SysV R4 PKG Datastreams:
  1133. #
  1134. 0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
  1135. #
  1136. #/etc/magic entries for Plus Five's UNIX MUMPS
  1137. #
  1138. # XXX - byte order?  Paging Hokey....
  1139. #
  1140. 0    short        0x259        mumps avl global
  1141. >2    byte        >0        (V%d)
  1142. >6    byte        >0        with %d byte name
  1143. >7    byte        >0        and %d byte data cells
  1144. 0    short        0x25a        mumps blt global
  1145. >2    byte        >0        (V%d)
  1146. >8    short        >0        - %d byte blocks
  1147. >15    byte        0x00        - P/D format
  1148. >15    byte        0x01        - P/K/D format
  1149. >15    byte        0x02        - K/D format
  1150. >15    byte        >0x02        - Bad Flags
  1151. #
  1152. # magic.postscript: Magic for postscript files
  1153. #
  1154. # XXX - should we match only versions 1.0 and 2.0, or should we wildcard
  1155. # it?
  1156. #
  1157. 0    string        %!        PostScript text
  1158. >2    string    PS-Adobe-        conforming
  1159. >>11    string    1.0            at level %s
  1160. >>11    string    2.0            at level %s
  1161. #
  1162. # magic.ps: psdatabase magic
  1163. #
  1164. 0    byte    0126    ps database
  1165. >1    string    >\0    - version %s
  1166. >4    string    >\0    from kernel %s
  1167. #
  1168. # magic.pyramid: Magic for pyramids
  1169. #
  1170. # XXX - byte order?
  1171. #
  1172. 0    long        0x50900107    Pyramid 90x family executable
  1173. 0    long        0x50900108    Pyramid 90x family pure executable
  1174. >16    long        >0        not stripped
  1175. 0    long        0x5090010b    Pyramid 90x family demand paged pure executable
  1176. >16    long        >0        not stripped
  1177. # for SC
  1178. 38    string        Spreadsheet    sc file
  1179. # SCCS archive structure:
  1180. # \001h01207
  1181. # \001s 00276/00000/00000
  1182. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  1183. # \001c date and time created 87/09/23 08:09:20 by ian
  1184. # \001e
  1185. # \001u
  1186. # \001U
  1187. # ... etc.
  1188. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  1189. # *Sigh*. And these both came from various parts of the USG.
  1190. # Maybe we should just switch everybody from SCCS to RCS!
  1191. # Further, you can't just say '\001h0', because the five-digit number
  1192. # is a checksum that could (presumably) have any leading digit,
  1193. # and we don't have regular expression matching yet. 
  1194. # Hence the following official kludge:
  1195. 8    string        \001s\             SCCS archive.
  1196. #
  1197. # magic.sendmail:
  1198. #
  1199. # XXX - byte order?
  1200. #
  1201. 0    byte    046      Sendmail frozen configuration 
  1202. >16    string    >\0      - version %s
  1203. 0    short    0x271c      Sendmail frozen configuration
  1204. >16    string    >\0      - version %s
  1205. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  1206. # For Sequent's multiprocessor systems (incomplete).
  1207. 0       leshort   0x00ea        BALANCE NS32000 .o
  1208. 0       leshort   0x10ea        BALANCE NS32000 executable (0 @ 0)
  1209. >16     lelong    >0            not stripped
  1210. 0       leshort   0x20ea        BALANCE NS32000 executable (invalid @ 0)
  1211. >16     lelong    >0            not stripped
  1212. 0       leshort   0x30ea        BALANCE NS32000 standalone executable
  1213. >16     lelong    >0            not stripped
  1214. # Also need info on Sequent "Symmetry" series...
  1215. # $Id: sgml,v 1.3 93/01/05 12:52:44 ian Exp $
  1216. # SGML goop, mostly from rph@sq.
  1217. 0    string        \<!DOCTYPE    Exported SGML document
  1218. 0    string        \<!doctype    Exported SGML document
  1219. 0    string        \<!SUBDOC    Exported SGML subdocument
  1220. 0    string        \<!subdoc    Exported SGML subdocument
  1221. # SoftQuad Publishing Software magic numbers
  1222. # $Id: softquad,v 1.8 93/02/19 14:36:43 ian Exp $
  1223. # Author/Editor and RulesBuilder
  1224. #
  1225. # XXX - byte order?
  1226. #
  1227. 0    string        \<!SQ\ DTD>    Compiled SGML rules file
  1228. >9    string        >\0         Type %s
  1229. 0    string        \<!SQ\ A/E>    A/E SGML Document binary
  1230. >9    string        >\0         Type %s
  1231. 0    string        \<!SQ\ STS>    A/E SGML binary styles file
  1232. >9    string        >\0         Type %s
  1233. 0    short        0xc0de        Compiled PSI (v1) data
  1234. 0    short        0xc0da        Compiled PSI (v2) data
  1235. >3    string        >\0        (%s)
  1236. # Binary sqtroff font/desc files...
  1237. 0    short        0125252        SoftQuad DESC or font file binary
  1238. >2    short        >0        - version %d
  1239. # Bitmaps...
  1240. 0    string        SQ\ BITMAP1    SoftQuad Raster Format text
  1241. #0    string        SQ\ BITMAP2    SoftQuad Raster Format data
  1242. # sqtroff intermediate language (replacement for ditroff int. lang.)
  1243. 0    string        X\         SoftQuad troff Context intermediate
  1244. >2    string        495        for AT&T 495 laser printer
  1245. >2    string        hp        for Hewlett-Packard LaserJet
  1246. >2    string        impr        for IMAGEN imPRESS
  1247. >2    string        ps        for PostScript
  1248. #
  1249. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  1250. # releases.
  1251. # (5.x uses ELF.)
  1252. #
  1253. 0    belong&0777777    0600413        sparc demand paged
  1254. >0    byte        &0x80
  1255. >>20    belong        <4096        shared library
  1256. >>20    belong        =4096        dynamically linked executable
  1257. >>20    belong        >4096        dynamically linked executable
  1258. >0    byte        ^0x80        executable
  1259. >16    belong        >0        not stripped
  1260. 0    belong&0777777    0600410        sparc pure
  1261. >0    byte        &0x80        dynamically linked executable
  1262. >0    byte        ^0x80        executable
  1263. >16    belong        >0        not stripped
  1264. 0    belong&0777777    0600407        sparc
  1265. >0    byte        &0x80        dynamically linked executable
  1266. >0    byte        ^0x80        executable
  1267. >16    belong        >0        not stripped
  1268.  
  1269. 0    belong&0777777    0400413        mc68020 demand paged
  1270. >0    byte        &0x80
  1271. >>20    belong        <4096        shared library
  1272. >>20    belong        =4096        dynamically linked executable
  1273. >>20    belong        >4096        dynamically linked executable
  1274. >16    belong        >0        not stripped
  1275. 0    belong&0777777    0400410        mc68020 pure
  1276. >0    byte        &0x80        dynamically linked executable
  1277. >0    byte        ^0x80        executable
  1278. >16    belong        >0        not stripped
  1279. 0    belong&0777777    0400407        mc68020
  1280. >0    byte        &0x80        dynamically linked executable
  1281. >0    byte        ^0x80        executable
  1282. >16    belong        >0        not stripped
  1283.  
  1284. 0    belong&0777777    0200413        mc68010 demand paged
  1285. >0    byte        &0x80
  1286. >>20    belong        <4096        shared library
  1287. >>20    belong        =4096        dynamically linked executable
  1288. >>20    belong        >4096        dynamically linked executable
  1289. >16    belong        >0        not stripped
  1290. 0    belong&0777777    0200410        mc68010 pure
  1291. >0    byte        &0x80        dynamically linked executable
  1292. >0    byte        ^0x80        executable
  1293. >16    belong        >0        not stripped
  1294. 0    belong&0777777    0200407        mc68010
  1295. >0    byte        &0x80        dynamically linked executable
  1296. >0    byte        ^0x80        executable
  1297. >16    belong        >0        not stripped
  1298.  
  1299. # reworked these to avoid anything beginning with zero becoming "old sun-2"
  1300. 0    belong        0407        old sun-2 executable
  1301. >16    belong        >0        not stripped
  1302. 0    belong        0410        old sun-2 pure executable
  1303. >16    belong        >0        not stripped
  1304. 0    belong        0413        old sun-2 demand paged executable
  1305. >16    belong        >0        not stripped
  1306.  
  1307. #
  1308. # Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  1309. # binary executed in compatibility mode under SunOS 5.x".
  1310. #
  1311. 0    belong        0x080456    SunOS core file
  1312. >4    belong        432        (SPARC)
  1313. >>132    string        >\0        from '%s'
  1314. >4    belong        826        (68K)
  1315. >>128    string        >\0        from '%s'
  1316. >4    belong        456        (SPARC 4.x BCP)
  1317. >>152    string        >\0        from '%s'
  1318. #
  1319. # Sun rasterfiles
  1320. #
  1321. # XXX - byte order?  What about the 386i?
  1322. #
  1323. 0    string    \x59\xa6\x6a\x95    rasterfile
  1324. >4    long    >0        %d
  1325. >8    long    >0        x %d
  1326. >12    long    >0        x %d
  1327. >20    long    0        old format
  1328. >20    long    2        compressed
  1329. >24    long    1        with color map
  1330. #
  1331. # Terminfo
  1332. #
  1333. # XXX - byte order for screen images?
  1334. #
  1335. 0    string        \032\001    Compiled terminfo entry
  1336. 0    short        0433        Curses screen image
  1337. 0    short        0434        Curses screen image
  1338. #
  1339. # magic.tex: 
  1340. #
  1341. # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
  1342. #
  1343. 0    short    0173402    DVI File
  1344. >16    string    >\0    (%s)
  1345. 0    short    0173531    Packed TeX Font
  1346. >4    string    >\0    (%s)
  1347. 2    string    \000\022    Metafont Font Metric
  1348. >34    string    >\0    (%s)
  1349. #
  1350. # magic.troff:
  1351. #
  1352. 0    string        \100\357    very old (C/A/T) troff output data
  1353. 0    string        '        [nt]roff, tbl, or eqn input text
  1354.  
  1355. # other typesetting magic
  1356. 0    string        \100\357    very old (C/A/T) troff output data
  1357. 0    string        Interpress/Xerox    Xerox InterPress data
  1358. >16    string        /            (version
  1359. >>17    string        >\0            %s)
  1360. #
  1361. # magic.unknown: Unknown machine magic
  1362. #
  1363. # XXX - this probably should be pruned, as it'll match PDP-11 and
  1364. # VAX image formats.
  1365. #
  1366. # 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
  1367. # respectively).
  1368. #
  1369. # 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
  1370. # have the "version %ld", which may be a bogus COFFism (I don't think
  1371. # there ever was COFF for the PDP-11).
  1372. #
  1373. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  1374. # long, as it would be on a VAX.
  1375. #
  1376. # 0x10C is 0414, 0x10D is 0415, and 0x10E is 416; those *are* unknown.
  1377. #
  1378. 0    short        0x107        unknown machine executable
  1379. >8    short        >0        not stripped
  1380. >15    byte        >0        - version %ld
  1381. 0    short        0x108        unknown pure executable
  1382. >8    short        >0        not stripped
  1383. >15    byte        >0        - version %ld
  1384. 0    short        0x109        PDP-11 separate I&D
  1385. >8    short        >0        not stripped
  1386. >15    byte        >0        - version %ld
  1387. 0    short        0x10b        unknown pure executable
  1388. >8    short        >0        not stripped
  1389. >15    byte        >0        - version %ld
  1390. 0    long        0x10c        unknown demand paged pure executable
  1391. >16    long        >0        not stripped
  1392. 0    long        0x10d        unknown demand paged pure executable
  1393. >16    long        >0        not stripped
  1394. 0    long        0x10e        unknown readable demand paged pure executable
  1395. 0    string        begin         uuencoded mail text
  1396. # Btoa(1) is an alternative to uuencode that requires less space.
  1397. 0    string        xbtoa\ Begin    btoa'd text
  1398. #    Herewith many of the object file formats used by USG systems.
  1399. #    Most have been moved to files for a particular processor,
  1400. #    and deleted if they duplicate other entries.
  1401. #
  1402. 0    short        0610        Perkin-Elmer executable
  1403. #
  1404. # magic.pdp: VAX executable/object and APL workspace
  1405. #
  1406. 0    lelong        0101557        VAX single precision APL workspace
  1407. 0    lelong        0101556        VAX double precision APL workspace
  1408.  
  1409. #
  1410. # VAX a.out (32V, BSD)
  1411. #
  1412. 0    lelong        0407        VAX executable
  1413. >16    lelong        >0        not stripped
  1414.  
  1415. 0    lelong        0410        VAX pure executable
  1416. >16    lelong        >0        not stripped
  1417.  
  1418. 0    lelong        0413        VAX demand paged pure executable
  1419. >16    lelong        >0        not stripped
  1420.  
  1421. 0    lelong        0420        VAX demand paged (first page unmapped) pure executable
  1422. >16    lelong        >0        not stripped
  1423.  
  1424. #
  1425. # VAX COFF
  1426. #
  1427. # The `versions' should be un-commented if they work for you.
  1428. # (Was the problem just one of endianness?)
  1429. #
  1430. 0    leshort        0570        VAX COFF executable
  1431. >12    lelong        >0        not stripped
  1432. #>22    leshort        >0        - version %ld
  1433. 0    leshort        0575        VAX COFF pure executable
  1434. >12    lelong        >0        not stripped
  1435. #>22    leshort        >0        - version %ld
  1436. #
  1437. # magic.visx: Visx format file
  1438. #
  1439. 0    short        0x5555        VISX image file
  1440. >2    byte        0        (zero)
  1441. >2    byte        1        (unsigned char)
  1442. >2    byte        2        (short integer)
  1443. >2    byte        3        (float 32)
  1444. >2    byte        4        (float 64)
  1445. >2    byte        5        (signed char)
  1446. >2    byte        6        (bit-plane)
  1447. >2    byte        7        (classes)
  1448. >2    byte        8        (statistics)
  1449. >2    byte        10        (ascii text)
  1450. >2    byte        15        (image segments)
  1451. >2    byte        100        (image set)
  1452. >2    byte        101        (unsigned char vector)
  1453. >2    byte        102        (short integer vector)
  1454. >2    byte        103        (float 32 vector)
  1455. >2    byte        104        (float 64 vector)
  1456. >2    byte        105        (signed char vector)
  1457. >2    byte        106        (bit plane vector)
  1458. >2    byte        121        (feature vector)
  1459. >2    byte        122        (feature vector library)
  1460. >2    byte        124        (chain code)
  1461. >2    byte        126        (bit vector)
  1462. >2    byte        130        (graph)
  1463. >2    byte        131        (adjacency graph)
  1464. >2    byte        132        (adjacency graph library)
  1465. >2    string        .VISIX        (ascii text)
  1466. #
  1467. # magic.x11
  1468. #
  1469. # I think this is byte-order-dependent; if so, it should become:
  1470. #
  1471. # 0    belong    00000004    X11 big-endian snf font
  1472. # 0    lelong    00000004    X11 little-endian snf font
  1473. #
  1474. 0    long    00000004    X11 snf font
  1475. #
  1476. # Zilog Z8000.
  1477. #
  1478. # Was it big-endian or little-endian?  My Product Specification doesn't
  1479. # say.
  1480. #
  1481. 0    long        0xe807        object file (z8000 a.out)
  1482. 0    long        0xe808        pure object file (z8000 a.out)
  1483. 0    long        0xe809        separate object file (z8000 a.out)
  1484. 0    long        0xe805        overlay object file (z8000 a.out)
  1485.  
  1486.