file_cmds-60.tar.gz
[apple/file_cmds.git] / file / 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 # Byte order is probably big-endian for MIPS R3000 and Amdahl.
9 # MIPS R3000 may also be for MIPS R2000.
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               Mach
24 >7      byte            7               SVR4
25 >7      byte            8               esix
26 >7      byte            9               Solaris
27 >7      byte            10              Irix
28 >7      byte            11              SCO
29 >7      byte            12              Dell
30 >8      byte            1               dynamically linked
31 >9      byte            1               unstripped
32 >5      byte            0               invalid byte order
33 >5      byte            1               LSB
34 >>16    leshort         0               no file type,
35 >>16    leshort         1               relocatable,
36 >>16    leshort         2               executable,
37 >>16    leshort         3               shared object,
38 >>16    leshort         4               core file,
39 >>16    leshort         &0xff00         processor-specific,
40 >>18    leshort         0               no machine,
41 >>18    leshort         1               AT&T WE32100 - invalid byte order,
42 >>18    leshort         2               SPARC - invalid byte order,
43 >>18    leshort         3               Intel 80386,
44 >>18    leshort         4               Motorola 68000 - invalid byte order,
45 >>18    leshort         5               Motorola 88000 - invalid byte order,
46 >>18    leshort         6               Intel 80486,
47 >>18    leshort         7               Intel 80860,
48 >>18    leshort         8               MIPS R3000,
49 >>18    leshort         9               Amdahl,
50 >>20    lelong          0               invalid version
51 >>20    lelong          1               version 1
52 >>36    lelong          1               MathCoPro/FPU/MAU Required
53 >5      byte            2               MSB
54 >>16    beshort         0               no file type,
55 >>16    beshort         1               relocatable,
56 >>16    beshort         2               executable,
57 >>16    beshort         3               shared object,
58 >>16    beshort         4               core file,
59 >>16    beshort         &0xff00         processor-specific,
60 >>18    beshort         0               no machine,
61 >>18    beshort         1               AT&T WE32100,
62 >>18    beshort         2               SPARC,
63 >>18    beshort         3               Intel 80386 - invalid byte order,
64 >>18    beshort         4               Motorola 68000,
65 >>18    beshort         5               Motorola 88000,
66 >>18    beshort         6               Intel 80486 - invalid byte order,
67 >>18    beshort         7               Intel 80860,
68 >>18    beshort         8               MIPS R3000,
69 >>18    leshort         9               Amdahl,
70 >>20    belong          0               invalid version
71 >>20    belong          1               version 1
72 >>36    belong          1               MathCoPro/FPU/MAU Required