]> granicus.if.org Git - file/commitdiff
PR/461: Add new MIPS ISAs.
authorChristos Zoulas <christos@zoulas.com>
Tue, 16 Jun 2015 17:23:08 +0000 (17:23 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 16 Jun 2015 17:23:08 +0000 (17:23 +0000)
While there, factor out magic

magic/Magdir/elf

index 04ee37ed5c7c8e3840666e183d7a7312dfa26123..1509c44ab7b86df6d5c37bef145cd84d939a9d93 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: elf,v 1.68 2014/09/19 19:05:57 christos Exp $
+# $File: elf,v 1.69 2015/06/16 17:23:08 christos Exp $
 # elf:  file(1) magic for ELF executables
 #
 # We have to check the byte order flag to see what byte order all the
 # 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
 >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,
 >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,