xref: /freebsd/contrib/file/magic/Magdir/intel (revision 58a0f0d00c0cc4a90ce584a61470290751bfcac7)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*58a0f0d0SEitan Adler# $File: intel,v 1.16 2017/11/14 15:48:36 christos Exp $
4b6cee71dSXin LI# intel:  file(1) magic for x86 Unix
5b6cee71dSXin LI#
6b6cee71dSXin LI# Various flavors of x86 UNIX executable/object (other than Xenix, which
7b6cee71dSXin LI# is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
8b6cee71dSXin LI# Windows as well.
9b6cee71dSXin LI#
10b6cee71dSXin LI# Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
11b6cee71dSXin LI# whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
12b6cee71dSXin LI# as well, if, as, and when IBM makes it portable.
13b6cee71dSXin LI#
14b6cee71dSXin LI# The `versions' should be un-commented if they work for you.
15b6cee71dSXin LI# (Was the problem just one of endianness?)
16b6cee71dSXin LI#
17b6cee71dSXin LI0	leshort		0502		basic-16 executable
18b6cee71dSXin LI>12	lelong		>0		not stripped
19b6cee71dSXin LI#>22	leshort		>0		- version %d
20b6cee71dSXin LI0	leshort		0503		basic-16 executable (TV)
21b6cee71dSXin LI>12	lelong		>0		not stripped
22b6cee71dSXin LI#>22	leshort		>0		- version %d
23b6cee71dSXin LI0	leshort		0510		x86 executable
24b6cee71dSXin LI>12	lelong		>0		not stripped
25b6cee71dSXin LI0	leshort		0511		x86 executable (TV)
26b6cee71dSXin LI>12	lelong		>0		not stripped
27b6cee71dSXin LI0	leshort		=0512		iAPX 286 executable small model (COFF)
28b6cee71dSXin LI>12	lelong		>0		not stripped
29b6cee71dSXin LI#>22	leshort		>0		- version %d
30b6cee71dSXin LI0	leshort		=0522		iAPX 286 executable large model (COFF)
31b6cee71dSXin LI>12	lelong		>0		not stripped
32b6cee71dSXin LI#>22	leshort		>0		- version %d
333e41d09dSXin LI# updated by Joerg Jenderek at Oct 2015
343e41d09dSXin LI# https://de.wikipedia.org/wiki/Common_Object_File_Format
353e41d09dSXin LI# http://www.delorie.com/djgpp/doc/coff/filhdr.html
363e41d09dSXin LI# ./msdos (version 5.25) labeled the next entry as "MS Windows COFF Intel 80386 object file"
373e41d09dSXin LI# ./intel (version 5.25) label labeled the next entry as "80386 COFF executable"
38b6cee71dSXin LI# SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
393e41d09dSXin LI0	leshort		=0514
403e41d09dSXin LI# use subroutine to display name+flags+variables for common object formated files
413e41d09dSXin LI>0	use				display-coff
423e41d09dSXin LI#>12	lelong		>0		not stripped
433e41d09dSXin LI# no hint found, that at offset 22 is version
443e41d09dSXin LI#>22	leshort		>0		- version %d
45b6cee71dSXin LI
46b6cee71dSXin LI# rom: file(1) magic for BIOS ROM Extensions found in intel machines
47b6cee71dSXin LI#      mapped into memory between 0xC0000 and 0xFFFFF
48*58a0f0d0SEitan Adler# From: Alex Myczko <alex@aiei.ch>
493e41d09dSXin LI# updated by Joerg Jenderek
503e41d09dSXin LI# https://en.wikipedia.org/wiki/Option_ROM
51b6cee71dSXin LI0        beshort         0x55AA       BIOS (ia32) ROM Ext.
523e41d09dSXin LI!:mime	application/octet-stream
533e41d09dSXin LI!:ext	rom/bin
54b6cee71dSXin LI>5       string          USB          USB
55b6cee71dSXin LI>7       string          LDR          UNDI image
56b6cee71dSXin LI>30      string          IBM          IBM comp. Video
57b6cee71dSXin LI>26      string          Adaptec      Adaptec
58b6cee71dSXin LI>28      string          Adaptec      Adaptec
59b6cee71dSXin LI>42      string          PROMISE      Promise
60b6cee71dSXin LI>2       byte            x            (%d*512)
61b6cee71dSXin LI
62b6cee71dSXin LI# Flash descriptors for Intel SPI flash roms.
63b6cee71dSXin LI# From Dr. Jesus <j@hug.gs>
64b6cee71dSXin LI0	lelong		0x0ff0a55a	Intel serial flash for ICH/PCH ROM <= 5 or 3400 series A-step
65b6cee71dSXin LI16	lelong		0x0ff0a55a	Intel serial flash for PCH ROM
66