186d7f5d3SJohn Marino 286d7f5d3SJohn Marino#------------------------------------------------------------------------------ 386d7f5d3SJohn Marino# $File: olf,v 1.4 2009/09/19 16:28:11 christos Exp $ 486d7f5d3SJohn Marino# olf: file(1) magic for OLF executables 586d7f5d3SJohn Marino# 686d7f5d3SJohn Marino# We have to check the byte order flag to see what byte order all the 786d7f5d3SJohn Marino# other stuff in the header is in. 886d7f5d3SJohn Marino# 986d7f5d3SJohn Marino# MIPS R3000 may also be for MIPS R2000. 1086d7f5d3SJohn Marino# What're the correct byte orders for the nCUBE and the Fujitsu VPP500? 1186d7f5d3SJohn Marino# 1286d7f5d3SJohn Marino# Created by Erik Theisen <etheisen@openbsd.org> 1386d7f5d3SJohn Marino# Based on elf from Daniel Quinlan <quinlan@yggdrasil.com> 1486d7f5d3SJohn Marino0 string \177OLF OLF 1586d7f5d3SJohn Marino>4 byte 0 invalid class 1686d7f5d3SJohn Marino>4 byte 1 32-bit 1786d7f5d3SJohn Marino>4 byte 2 64-bit 1886d7f5d3SJohn Marino>7 byte 0 invalid os 1986d7f5d3SJohn Marino>7 byte 1 OpenBSD 2086d7f5d3SJohn Marino>7 byte 2 NetBSD 2186d7f5d3SJohn Marino>7 byte 3 FreeBSD 2286d7f5d3SJohn Marino>7 byte 4 4.4BSD 2386d7f5d3SJohn Marino>7 byte 5 Linux 2486d7f5d3SJohn Marino>7 byte 6 SVR4 2586d7f5d3SJohn Marino>7 byte 7 esix 2686d7f5d3SJohn Marino>7 byte 8 Solaris 2786d7f5d3SJohn Marino>7 byte 9 Irix 2886d7f5d3SJohn Marino>7 byte 10 SCO 2986d7f5d3SJohn Marino>7 byte 11 Dell 3086d7f5d3SJohn Marino>7 byte 12 NCR 3186d7f5d3SJohn Marino>5 byte 0 invalid byte order 3286d7f5d3SJohn Marino>5 byte 1 LSB 3386d7f5d3SJohn Marino>>16 leshort 0 no file type, 3486d7f5d3SJohn Marino>>16 leshort 1 relocatable, 3586d7f5d3SJohn Marino>>16 leshort 2 executable, 3686d7f5d3SJohn Marino>>16 leshort 3 shared object, 3786d7f5d3SJohn Marino# Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de> 3886d7f5d3SJohn Marino# corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de> 3986d7f5d3SJohn Marino>>16 leshort 4 core file 4086d7f5d3SJohn Marino>>>(0x38+0xcc) string >\0 of '%s' 4186d7f5d3SJohn Marino>>>(0x38+0x10) lelong >0 (signal %d), 4286d7f5d3SJohn Marino>>16 leshort &0xff00 processor-specific, 4386d7f5d3SJohn Marino>>18 leshort 0 no machine, 4486d7f5d3SJohn Marino>>18 leshort 1 AT&T WE32100 - invalid byte order, 4586d7f5d3SJohn Marino>>18 leshort 2 SPARC - invalid byte order, 4686d7f5d3SJohn Marino>>18 leshort 3 Intel 80386, 4786d7f5d3SJohn Marino>>18 leshort 4 Motorola 68000 - invalid byte order, 4886d7f5d3SJohn Marino>>18 leshort 5 Motorola 88000 - invalid byte order, 4986d7f5d3SJohn Marino>>18 leshort 6 Intel 80486, 5086d7f5d3SJohn Marino>>18 leshort 7 Intel 80860, 5186d7f5d3SJohn Marino>>18 leshort 8 MIPS R3000_BE - invalid byte order, 5286d7f5d3SJohn Marino>>18 leshort 9 Amdahl - invalid byte order, 5386d7f5d3SJohn Marino>>18 leshort 10 MIPS R3000_LE, 5486d7f5d3SJohn Marino>>18 leshort 11 RS6000 - invalid byte order, 5586d7f5d3SJohn Marino>>18 leshort 15 PA-RISC - invalid byte order, 5686d7f5d3SJohn Marino>>18 leshort 16 nCUBE, 5786d7f5d3SJohn Marino>>18 leshort 17 VPP500, 5886d7f5d3SJohn Marino>>18 leshort 18 SPARC32PLUS, 5986d7f5d3SJohn Marino>>18 leshort 20 PowerPC, 6086d7f5d3SJohn Marino>>18 leshort 0x9026 Alpha, 6186d7f5d3SJohn Marino>>20 lelong 0 invalid version 6286d7f5d3SJohn Marino>>20 lelong 1 version 1 6386d7f5d3SJohn Marino>>36 lelong 1 MathCoPro/FPU/MAU Required 6486d7f5d3SJohn Marino>8 string >\0 (%s) 6586d7f5d3SJohn Marino>5 byte 2 MSB 6686d7f5d3SJohn Marino>>16 beshort 0 no file type, 6786d7f5d3SJohn Marino>>16 beshort 1 relocatable, 6886d7f5d3SJohn Marino>>16 beshort 2 executable, 6986d7f5d3SJohn Marino>>16 beshort 3 shared object, 7086d7f5d3SJohn Marino>>16 beshort 4 core file, 7186d7f5d3SJohn Marino>>>(0x38+0xcc) string >\0 of '%s' 7286d7f5d3SJohn Marino>>>(0x38+0x10) belong >0 (signal %d), 7386d7f5d3SJohn Marino>>16 beshort &0xff00 processor-specific, 7486d7f5d3SJohn Marino>>18 beshort 0 no machine, 7586d7f5d3SJohn Marino>>18 beshort 1 AT&T WE32100, 7686d7f5d3SJohn Marino>>18 beshort 2 SPARC, 7786d7f5d3SJohn Marino>>18 beshort 3 Intel 80386 - invalid byte order, 7886d7f5d3SJohn Marino>>18 beshort 4 Motorola 68000, 7986d7f5d3SJohn Marino>>18 beshort 5 Motorola 88000, 8086d7f5d3SJohn Marino>>18 beshort 6 Intel 80486 - invalid byte order, 8186d7f5d3SJohn Marino>>18 beshort 7 Intel 80860, 8286d7f5d3SJohn Marino>>18 beshort 8 MIPS R3000_BE, 8386d7f5d3SJohn Marino>>18 beshort 9 Amdahl, 8486d7f5d3SJohn Marino>>18 beshort 10 MIPS R3000_LE - invalid byte order, 8586d7f5d3SJohn Marino>>18 beshort 11 RS6000, 8686d7f5d3SJohn Marino>>18 beshort 15 PA-RISC, 8786d7f5d3SJohn Marino>>18 beshort 16 nCUBE, 8886d7f5d3SJohn Marino>>18 beshort 17 VPP500, 8986d7f5d3SJohn Marino>>18 beshort 18 SPARC32PLUS, 9086d7f5d3SJohn Marino>>18 beshort 20 PowerPC or cisco 4500, 9186d7f5d3SJohn Marino>>18 beshort 21 cisco 7500, 9286d7f5d3SJohn Marino>>18 beshort 24 cisco SVIP, 9386d7f5d3SJohn Marino>>18 beshort 25 cisco 7200, 9486d7f5d3SJohn Marino>>18 beshort 36 cisco 12000, 9586d7f5d3SJohn Marino>>18 beshort 0x9026 Alpha, 9686d7f5d3SJohn Marino>>20 belong 0 invalid version 9786d7f5d3SJohn Marino>>20 belong 1 version 1 9886d7f5d3SJohn Marino>>36 belong 1 MathCoPro/FPU/MAU Required 99