Magdir_elf 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #------------------------------------------------------------------------------
  2. # elf: file(1) magic for ELF executables
  3. #
  4. # We have to check the byte order flag to see what byte order all the
  5. # other stuff in the header is in.
  6. #
  7. # Byte order is probably big-endian for MIPS RS3000 and Amdahl.
  8. # MIPS RS3000 may also be for MIPS RS2000.
  9. #
  10. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  11. 0 string \177ELF ELF
  12. >4 byte 0 invalid class
  13. >4 byte 1 32-bit
  14. >4 byte 2 64-bit
  15. >5 byte 0 invalid byte order
  16. >5 byte 1 LSB
  17. >>16 leshort 0 no file type,
  18. >>16 leshort 1 relocatable,
  19. >>16 leshort 2 executable,
  20. >>16 leshort 3 shared object,
  21. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  22. >>16 leshort 4 core file
  23. >>>576 string >\0 of '%s'
  24. >>>400 lelong >0 (signal %d),
  25. >>16 leshort &0xff00 processor-specific,
  26. >>18 leshort 0 no machine,
  27. >>18 leshort 1 AT&T WE32100 - invalid byte order,
  28. >>18 leshort 2 SPARC - invalid byte order,
  29. >>18 leshort 3 Intel 80386,
  30. >>18 leshort 4 Motorola 68000 - invalid byte order,
  31. >>18 leshort 5 Motorola 88000 - invalid byte order,
  32. >>18 leshort 6 Intel 80486,
  33. >>18 leshort 7 Intel 80860,
  34. >>18 leshort 8 MIPS RS3000,
  35. >>18 leshort 9 Amdahl,
  36. >>20 lelong 0 invalid version
  37. >>20 lelong 1 version 1
  38. >>36 lelong 1 MathCoPro/FPU/MAU Required
  39. >5 byte 2 MSB
  40. >>16 beshort 0 no file type,
  41. >>16 beshort 1 relocatable,
  42. >>16 beshort 2 executable,
  43. >>16 beshort 3 shared object,
  44. >>16 beshort 4 core file,
  45. >>>576 string >\0 of '%s'
  46. >>>400 lelong >0 (signal %d),
  47. >>16 beshort &0xff00 processor-specific,
  48. >>18 beshort 0 no machine,
  49. >>18 beshort 1 AT&T WE32100,
  50. >>18 beshort 2 SPARC,
  51. >>18 beshort 3 Intel 80386 - invalid byte order,
  52. >>18 beshort 4 Motorola 68000,
  53. >>18 beshort 5 Motorola 88000,
  54. >>18 beshort 6 Intel 80486 - invalid byte order,
  55. >>18 beshort 7 Intel 80860,
  56. >>18 beshort 8 MIPS RS3000,
  57. >>18 leshort 9 Amdahl,
  58. >>20 belong 0 invalid version
  59. >>20 belong 1 version 1
  60. >>36 belong 1 MathCoPro/FPU/MAU Required