elf 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. # MIPS R3000 may also be for MIPS R2000.
  8. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  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. # only for MIPS R3000_BE
  15. >>18 beshort 8
  16. >>>36 belong &0x20 N32
  17. >4 byte 2 64-bit
  18. >5 byte 0 invalid byte order
  19. >5 byte 1 LSB
  20. >>16 leshort 0 no file type,
  21. >>16 leshort 1 relocatable,
  22. >>16 leshort 2 executable,
  23. >>16 leshort 3 shared object,
  24. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  25. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  26. >>16 leshort 4 core file
  27. >>>(0x38+0xcc) string >\0 of '%s'
  28. >>>(0x38+0x10) lelong >0 (signal %d),
  29. >>16 leshort &0xff00 processor-specific,
  30. >>18 leshort 0 no machine,
  31. >>18 leshort 1 AT&T WE32100 - invalid byte order,
  32. >>18 leshort 2 SPARC - invalid byte order,
  33. >>18 leshort 3 Intel 80386,
  34. >>18 leshort 4 Motorola 68000 - invalid byte order,
  35. >>18 leshort 5 Motorola 88000 - invalid byte order,
  36. >>18 leshort 6 Intel 80486,
  37. >>18 leshort 7 Intel 80860,
  38. >>18 leshort 8 MIPS R3000_BE - invalid byte order,
  39. >>18 leshort 9 Amdahl - invalid byte order,
  40. >>18 leshort 10 MIPS R3000_LE,
  41. >>18 leshort 11 RS6000 - invalid byte order,
  42. >>18 leshort 15 PA-RISC - invalid byte order,
  43. >>18 leshort 16 nCUBE,
  44. >>18 leshort 17 Fujitsu VPP500,
  45. >>18 leshort 18 SPARC32PLUS,
  46. >>18 leshort 20 PowerPC,
  47. >>18 leshort 36 NEC V800,
  48. >>18 leshort 37 Fujitsu FR20,
  49. >>18 leshort 38 TRW RH-32,
  50. >>18 leshort 39 Motorola RCE,
  51. >>18 leshort 40 Advanced RISC Machines ARM,
  52. >>18 leshort 41 Alpha,
  53. >>18 leshort 42 Hitachi SH,
  54. >>18 leshort 43 SPARC V9 - invalid byte order,
  55. >>18 leshort 44 Siemens Tricore Embedded Processor,
  56. >>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
  57. >>18 leshort 46 Hitachi H8/300,
  58. >>18 leshort 47 Hitachi H8/300H,
  59. >>18 leshort 48 Hitachi H8S,
  60. >>18 leshort 49 Hitachi H8/500,
  61. >>18 leshort 50 IA-64 (Intel 64 bit architecture)
  62. >>18 leshort 51 Stanford MIPS-X,
  63. >>18 leshort 52 Motorola Coldfire,
  64. >>18 leshort 53 Motorola M68HC12,
  65. >>18 leshort 0x9026 Alpha (unofficial),
  66. >>20 lelong 0 invalid version
  67. >>20 lelong 1 version 1
  68. >>36 lelong 1 MathCoPro/FPU/MAU Required
  69. >8 string >\0 (%s)
  70. >5 byte 2 MSB
  71. # only for MIPS R3000_BE
  72. >>18 beshort 8
  73. # only for 32-bit
  74. >>>4 byte 1
  75. >>>>36 belong&0xf0000000 0x00000000 mips-1
  76. >>>>36 belong&0xf0000000 0x10000000 mips-2
  77. >>>>36 belong&0xf0000000 0x20000000 mips-3
  78. >>>>36 belong&0xf0000000 0x30000000 mips-4
  79. >>>>36 belong&0xf0000000 0x40000000 mips-5
  80. >>>>36 belong&0xf0000000 0x50000000 mips-6
  81. # only for 64-bit
  82. >>>4 byte 2
  83. >>>>48 belong&0xf0000000 0x00000000 mips-1
  84. >>>>48 belong&0xf0000000 0x10000000 mips-2
  85. >>>>48 belong&0xf0000000 0x20000000 mips-3
  86. >>>>48 belong&0xf0000000 0x30000000 mips-4
  87. >>>>48 belong&0xf0000000 0x40000000 mips-5
  88. >>>>48 belong&0xf0000000 0x50000000 mips-6
  89. >>16 beshort 0 no file type,
  90. >>16 beshort 1 relocatable,
  91. >>16 beshort 2 executable,
  92. >>16 beshort 3 shared object,
  93. >>16 beshort 4 core file,
  94. >>>(0x38+0xcc) string >\0 of '%s'
  95. >>>(0x38+0x10) belong >0 (signal %d),
  96. >>16 beshort &0xff00 processor-specific,
  97. >>18 beshort 0 no machine,
  98. >>18 beshort 1 AT&T WE32100,
  99. >>18 beshort 2 SPARC,
  100. >>18 beshort 3 Intel 80386 - invalid byte order,
  101. >>18 beshort 4 Motorola 68000,
  102. >>18 beshort 5 Motorola 88000,
  103. >>18 beshort 6 Intel 80486 - invalid byte order,
  104. >>18 beshort 7 Intel 80860,
  105. >>18 beshort 8 MIPS R3000_BE,
  106. >>18 beshort 9 Amdahl,
  107. >>18 beshort 10 MIPS R3000_LE - invalid byte order,
  108. >>18 beshort 11 RS6000,
  109. >>18 beshort 15 PA-RISC,
  110. >>18 beshort 16 nCUBE,
  111. >>18 beshort 17 Fujitsu VPP500,
  112. >>18 beshort 18 SPARC32PLUS,
  113. >>>36 belong&0xffff00 &0x000100 V8+ Required,
  114. >>>36 belong&0xffff00 &0x000200 Sun UltraSPARC1 Extensions Required,
  115. >>>36 belong&0xffff00 &0x000400 HaL R1 Extensions Required,
  116. >>>36 belong&0xffff00 &0x000800 Sun UltraSPARC3 Extensions Required,
  117. >>18 beshort 20 PowerPC or cisco 4500,
  118. >>18 beshort 21 cisco 7500,
  119. >>18 beshort 24 cisco SVIP,
  120. >>18 beshort 25 cisco 7200,
  121. >>18 beshort 36 NEC V800 or cisco 12000,
  122. >>18 beshort 37 Fujitsu FR20,
  123. >>18 beshort 38 TRW RH-32,
  124. >>18 beshort 39 Motorola RCE,
  125. >>18 beshort 40 Advanced RISC Machines ARM,
  126. >>18 beshort 41 Alpha,
  127. >>18 beshort 42 Hitachi SH,
  128. >>18 beshort 43 SPARC V9,
  129. >>18 beshort 44 Siemens Tricore Embedded Processor,
  130. >>18 beshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
  131. >>18 beshort 46 Hitachi H8/300,
  132. >>18 beshort 47 Hitachi H8/300H,
  133. >>18 beshort 48 Hitachi H8S,
  134. >>18 beshort 49 Hitachi H8/500,
  135. >>18 beshort 50 Intel Merced Processor,
  136. >>18 beshort 51 Stanford MIPS-X,
  137. >>18 beshort 52 Motorola Coldfire,
  138. >>18 beshort 53 Motorola M68HC12,
  139. >>18 beshort 0x9026 Alpha (unofficial),
  140. >>20 belong 0 invalid version
  141. >>20 belong 1 version 1
  142. >>36 belong 1 MathCoPro/FPU/MAU Required