1 2#------------------------------------------------------------------------------ 3# $File: olf,v 1.5 2024/02/29 03:42:40 christos Exp $ 4# olf: file(1) magic for OLF executables 5# 6# We have to check the byte order flag to see what byte order all the 7# other stuff in the header is in. 8# 9# MIPS R3000 may also be for MIPS R2000. 10# What're the correct byte orders for the nCUBE and the Fujitsu VPP500? 11# 12# Created by Erik Theisen <etheisen@openbsd.org> 13# Based on elf from Daniel Quinlan <quinlan@yggdrasil.com> 140 string \177OLF OLF 15>4 byte 0 invalid class 16>4 byte 1 32-bit 17>4 byte 2 64-bit 18>7 byte 0 invalid os 19>7 byte 1 OpenBSD 20>7 byte 2 NetBSD 21>7 byte 3 FreeBSD 22>7 byte 4 4.4BSD 23>7 byte 5 Linux 24>7 byte 6 SVR4 25>7 byte 7 esix 26>7 byte 8 Solaris 27>7 byte 9 Irix 28>7 byte 10 SCO 29>7 byte 11 Dell 30>7 byte 12 NCR 31>5 byte 0 invalid byte order 32>5 byte 1 LSB 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 i386, 47>>18 leshort 4 Motorola 68000 - invalid byte order, 48>>18 leshort 5 Motorola 88000 - invalid byte order, 49>>18 leshort 6 Intel i486, 50>>18 leshort 7 Intel i860, 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 64>8 string >\0 (%s) 65>5 byte 2 MSB 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, 76>>18 beshort 2 SPARC, 77>>18 beshort 3 Intel i386 - invalid byte order, 78>>18 beshort 4 Motorola 68000, 79>>18 beshort 5 Motorola 88000, 80>>18 beshort 6 Intel i486 - invalid byte order, 81>>18 beshort 7 Intel i860, 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 99