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