e698c36a49eea4bca73cd85de713afcf186fbf2c
[dragonfly.git] / contrib / file / magic / Magdir / olf
1
2 #------------------------------------------------------------------------------
3 # olf:  file(1) magic for OLF executables
4 #
5 # We have to check the byte order flag to see what byte order all the
6 # other stuff in the header is in.
7 #
8 # MIPS R3000 may also be for MIPS R2000.
9 # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
10 #
11 # Created by Erik Theisen <etheisen@openbsd.org>
12 # Based on elf from Daniel Quinlan <quinlan@yggdrasil.com>
13 0       string          \177OLF         OLF
14 >4      byte            0               invalid class
15 >4      byte            1               32-bit
16 >4      byte            2               64-bit
17 >7      byte            0               invalid os
18 >7      byte            1               OpenBSD
19 >7      byte            2               NetBSD
20 >7      byte            3               FreeBSD
21 >7      byte            4               4.4BSD
22 >7      byte            5               Linux
23 >7      byte            6               SVR4
24 >7      byte            7               esix
25 >7      byte            8               Solaris
26 >7      byte            9               Irix
27 >7      byte            10              SCO
28 >7      byte            11              Dell
29 >7      byte            12              NCR
30 >5      byte            0               invalid byte order
31 >5      byte            1               LSB
32 >>16    leshort         0               no file type,
33 >>16    leshort         1               relocatable,
34 >>16    leshort         2               executable,
35 >>16    leshort         3               shared object,
36 # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
37 # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
38 >>16    leshort         4               core file
39 >>>(0x38+0xcc) string   >\0             of '%s'
40 >>>(0x38+0x10) lelong   >0              (signal %d),
41 >>16    leshort         &0xff00         processor-specific,
42 >>18    leshort         0               no machine,
43 >>18    leshort         1               AT&T WE32100 - invalid byte order,
44 >>18    leshort         2               SPARC - invalid byte order,
45 >>18    leshort         3               Intel 80386,
46 >>18    leshort         4               Motorola 68000 - invalid byte order,
47 >>18    leshort         5               Motorola 88000 - invalid byte order,
48 >>18    leshort         6               Intel 80486,
49 >>18    leshort         7               Intel 80860,
50 >>18    leshort         8               MIPS R3000_BE - invalid byte order,
51 >>18    leshort         9               Amdahl - invalid byte order,
52 >>18    leshort         10              MIPS R3000_LE,
53 >>18    leshort         11              RS6000 - invalid byte order,
54 >>18    leshort         15              PA-RISC - invalid byte order,
55 >>18    leshort         16              nCUBE,
56 >>18    leshort         17              VPP500,
57 >>18    leshort         18              SPARC32PLUS,
58 >>18    leshort         20              PowerPC,
59 >>18    leshort         0x9026          Alpha,
60 >>20    lelong          0               invalid version
61 >>20    lelong          1               version 1
62 >>36    lelong          1               MathCoPro/FPU/MAU Required
63 >8      string          >\0             (%s)
64 >5      byte            2               MSB
65 >>16    beshort         0               no file type,
66 >>16    beshort         1               relocatable,
67 >>16    beshort         2               executable,
68 >>16    beshort         3               shared object,
69 >>16    beshort         4               core file,
70 >>>(0x38+0xcc) string   >\0             of '%s'
71 >>>(0x38+0x10) belong   >0              (signal %d),
72 >>16    beshort         &0xff00         processor-specific,
73 >>18    beshort         0               no machine,
74 >>18    beshort         1               AT&T WE32100,
75 >>18    beshort         2               SPARC,
76 >>18    beshort         3               Intel 80386 - invalid byte order,
77 >>18    beshort         4               Motorola 68000,
78 >>18    beshort         5               Motorola 88000,
79 >>18    beshort         6               Intel 80486 - invalid byte order,
80 >>18    beshort         7               Intel 80860,
81 >>18    beshort         8               MIPS R3000_BE,
82 >>18    beshort         9               Amdahl,
83 >>18    beshort         10              MIPS R3000_LE - invalid byte order,
84 >>18    beshort         11              RS6000,
85 >>18    beshort         15              PA-RISC,
86 >>18    beshort         16              nCUBE,
87 >>18    beshort         17              VPP500,
88 >>18    beshort         18              SPARC32PLUS,
89 >>18    beshort         20              PowerPC or cisco 4500,
90 >>18    beshort         21              cisco 7500,
91 >>18    beshort         24              cisco SVIP,
92 >>18    beshort         25              cisco 7200,
93 >>18    beshort         36              cisco 12000,
94 >>18    beshort         0x9026          Alpha,
95 >>20    belong          0               invalid version
96 >>20    belong          1               version 1
97 >>36    belong          1               MathCoPro/FPU/MAU Required