cherry-pick.FILE5_34-26-gc673ce51.pr-19-recognize-ia64-and-amd64-coff-files.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Subject: PR/19: Recognize ia64 and amd64 COFF files
  2. Origin: FILE5_34-26-gc673ce51 <https://github.com/file/file/commit/FILE5_34-26-gc673ce51>
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Wed Aug 1 10:34:03 2018 +0000
  5. Bug-Debian: https://bugs.debian.org/697846
  6. --- a/magic/Magdir/coff
  7. +++ b/magic/Magdir/coff
  8. @@ -26,6 +26,10 @@
  9. >>0 uleshort 0x0550 Hitachi SH little-endian
  10. # executable (RISC System/6000 V3.1) or obj module (./ibm6000)
  11. #>>0 uleshort 0x01DF
  12. +# MS Windows COFF Intel Itanium, AMD64
  13. +# https://msdn.microsoft.com/en-us/library/windows/desktop/ms680313(v=vs.85).aspx
  14. +>>0 uleshort 0x0200 Intel ia64
  15. +>>0 uleshort 0x8664 Intel amd64
  16. # TODO for other COFFs
  17. #>>0 uleshort 0xABCD COFF_TEMPLATE
  18. >>0 default x
  19. --- a/magic/Magdir/intel
  20. +++ b/magic/Magdir/intel
  21. @@ -1,6 +1,6 @@
  22. #------------------------------------------------------------------------------
  23. -# $File: intel,v 1.16 2017/11/14 15:48:36 christos Exp $
  24. +# $File: intel,v 1.17 2018/08/01 10:34:03 christos Exp $
  25. # intel: file(1) magic for x86 Unix
  26. #
  27. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  28. @@ -42,6 +42,10 @@
  29. #>12 lelong >0 not stripped
  30. # no hint found, that at offset 22 is version
  31. #>22 leshort >0 - version %d
  32. +0 leshort 0x0200
  33. +>0 use display-coff
  34. +0 leshort 0x8664
  35. +>0 use display-coff
  36. # rom: file(1) magic for BIOS ROM Extensions found in intel machines
  37. # mapped into memory between 0xC0000 and 0xFFFFF