summaryrefslogtreecommitdiff
path: root/magic/Magdir/elf
diff options
context:
space:
mode:
Diffstat (limited to 'magic/Magdir/elf')
-rw-r--r--magic/Magdir/elf108
1 files changed, 53 insertions, 55 deletions
diff --git a/magic/Magdir/elf b/magic/Magdir/elf
index 04ee37e..0e0e6dc 100644
--- a/magic/Magdir/elf
+++ b/magic/Magdir/elf
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: elf,v 1.68 2014/09/19 19:05:57 christos Exp $
+# $File: elf,v 1.70 2016/06/02 12:36:30 christos Exp $
# elf: file(1) magic for ELF executables
#
# We have to check the byte order flag to see what byte order all the
@@ -15,6 +15,32 @@
# Modified by (4): <gerardo.cacciari@gmail.com> (VMS Itanium)
# Modified by (5): Matthias Urlichs <smurf@debian.org> (Listing of many architectures)
+0 name elf-mips
+>0 lelong&0xf0000000 0x00000000 MIPS-I
+>0 lelong&0xf0000000 0x10000000 MIPS-II
+>0 lelong&0xf0000000 0x20000000 MIPS-III
+>0 lelong&0xf0000000 0x30000000 MIPS-IV
+>0 lelong&0xf0000000 0x40000000 MIPS-V
+>0 lelong&0xf0000000 0x50000000 MIPS32
+>0 lelong&0xf0000000 0x60000000 MIPS64
+>0 lelong&0xf0000000 0x70000000 MIPS32 rel2
+>0 lelong&0xf0000000 0x80000000 MIPS64 rel2
+>0 lelong&0xf0000000 0x90000000 MIPS32 rel6
+>0 lelong&0xf0000000 0xa0000000 MIPS64 rel6
+
+0 name elf-sparc
+>0 lelong&0x00ffff00 0x00000100 V8+ Required,
+>0 lelong&0x00ffff00 0x00000200 Sun UltraSPARC1 Extensions Required,
+>0 lelong&0x00ffff00 0x00000400 HaL R1 Extensions Required,
+>0 lelong&0x00ffff00 0x00000800 Sun UltraSPARC3 Extensions Required,
+>0 lelong&0x3 0 total store ordering,
+>0 lelong&0x3 1 partial store ordering,
+>0 lelong&0x3 2 relaxed memory ordering,
+
+0 name elf-pa-risc
+>2 leshort 0x0214 2.0
+>0 leshort &0x0008 (LP64)
+
0 name elf-le
>16 leshort 0 no file type,
!:mime application/octet-stream
@@ -55,47 +81,26 @@
>18 leshort 8
# only for 32-bit
>>4 byte 1
->>>36 lelong&0xf0000000 0x00000000 MIPS-I
->>>36 lelong&0xf0000000 0x10000000 MIPS-II
->>>36 lelong&0xf0000000 0x20000000 MIPS-III
->>>36 lelong&0xf0000000 0x30000000 MIPS-IV
->>>36 lelong&0xf0000000 0x40000000 MIPS-V
->>>36 lelong&0xf0000000 0x50000000 MIPS32
->>>36 lelong&0xf0000000 0x60000000 MIPS64
->>>36 lelong&0xf0000000 0x70000000 MIPS32 rel2
->>>36 lelong&0xf0000000 0x80000000 MIPS64 rel2
+>>>36 use elf-mips
# only for 64-bit
>>4 byte 2
->>>48 lelong&0xf0000000 0x00000000 MIPS-I
->>>48 lelong&0xf0000000 0x10000000 MIPS-II
->>>48 lelong&0xf0000000 0x20000000 MIPS-III
->>>48 lelong&0xf0000000 0x30000000 MIPS-IV
->>>48 lelong&0xf0000000 0x40000000 MIPS-V
->>>48 lelong&0xf0000000 0x50000000 MIPS32
->>>48 lelong&0xf0000000 0x60000000 MIPS64
->>>48 lelong&0xf0000000 0x70000000 MIPS32 rel2
->>>48 lelong&0xf0000000 0x80000000 MIPS64 rel2
+>>>48 use elf-mips
>18 leshort 9 Amdahl,
>18 leshort 10 MIPS (deprecated),
>18 leshort 11 RS6000,
>18 leshort 15 PA-RISC,
# only for 32-bit
>>4 byte 1
->>>38 leshort 0x0214 2.0
->>>36 leshort &0x0008 (LP64)
+>>>36 use elf-pa-risc
# only for 64-bit
>>4 byte 2
->>>50 leshort 0x0214 2.0
->>>48 leshort &0x0008 (LP64)
+>>>48 use elf-pa-risc
>18 leshort 16 nCUBE,
>18 leshort 17 Fujitsu VPP500,
>18 leshort 18 SPARC32PLUS,
# only for 32-bit
>>4 byte 1
->>>36 lelong&0xffff00 0x000100 V8+ Required,
->>>36 lelong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
->>>36 lelong&0xffff00 0x000400 HaL R1 Extensions Required,
->>>36 lelong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
+>>>36 use elf-sparc
>18 leshort 19 Intel 80960,
>18 leshort 20 PowerPC or cisco 4500,
>18 leshort 21 64-bit PowerPC or cisco 7500,
@@ -117,12 +122,7 @@
>18 leshort 42 Renesas SH,
>18 leshort 43 SPARC V9,
>>4 byte 2
->>>48 lelong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
->>>48 lelong&0xffff00 0x000400 HaL R1 Extensions Required,
->>>48 lelong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
->>>48 lelong&0x3 0 total store ordering,
->>>48 lelong&0x3 1 partial store ordering,
->>>48 lelong&0x3 2 relaxed memory ordering,
+>>>48 use elf-sparc
>18 leshort 44 Siemens Tricore Embedded Processor,
>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
>18 leshort 46 Renesas H8/300,
@@ -301,25 +301,23 @@
>>0 use elf-le
>5 byte 2 MSB
>>0 use \^elf-le
-# Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
-# like proper ELF, but extracting the string had bad results.
->4 byte <0x80
->>8 string >\0 (%s)
->8 string \0
->>7 byte 0 (SYSV)
->>7 byte 1 (HP-UX)
->>7 byte 2 (NetBSD)
->>7 byte 3 (GNU/Linux)
->>7 byte 4 (GNU/Hurd)
->>7 byte 5 (86Open)
->>7 byte 6 (Solaris)
->>7 byte 7 (Monterey)
->>7 byte 8 (IRIX)
->>7 byte 9 (FreeBSD)
->>7 byte 10 (Tru64)
->>7 byte 11 (Novell Modesto)
->>7 byte 12 (OpenBSD)
->8 string \2
->>7 byte 13 (OpenVMS)
->>7 byte 97 (ARM)
->>7 byte 255 (embedded)
+>7 byte 0 (SYSV)
+>7 byte 1 (HP-UX)
+>7 byte 2 (NetBSD)
+>7 byte 3 (GNU/Linux)
+>7 byte 4 (GNU/Hurd)
+>7 byte 5 (86Open)
+>7 byte 6 (Solaris)
+>7 byte 7 (Monterey)
+>7 byte 8 (IRIX)
+>7 byte 9 (FreeBSD)
+>7 byte 10 (Tru64)
+>7 byte 11 (Novell Modesto)
+>7 byte 12 (OpenBSD)
+>7 byte 13 (OpenVMS)
+>7 byte 14 (HP NonStop Kernel)
+>7 byte 15 (AROS Research Operating System)
+>7 byte 16 (FenixOS)
+>7 byte 17 (Nuxi CloudABI)
+>7 byte 97 (ARM)
+>7 byte 255 (embedded)