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