mach 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. #------------------------------------------------------------
  2. # $File: mach,v 1.23 2015/10/15 21:51:22 christos Exp $
  3. # Mach has two magic numbers, 0xcafebabe and 0xfeedface.
  4. # Unfortunately the first, cafebabe, is shared with
  5. # Java ByteCode, so they are both handled in the file "cafebabe".
  6. # The "feedface" ones are handled herein.
  7. #------------------------------------------------------------
  8. # if set, it's for the 64-bit version of the architecture
  9. # yes, this is separate from the low-order magic number bit
  10. # it's also separate from the "64-bit libraries" bit in the
  11. # upper 8 bits of the CPU subtype
  12. 0 name mach-o-cpu
  13. >0 belong&0x01000000 0
  14. #
  15. # 32-bit ABIs.
  16. #
  17. # 1 vax
  18. >>0 belong&0x00ffffff 1
  19. >>>4 belong&0x00ffffff 0 vax
  20. >>>4 belong&0x00ffffff 1 vax11/780
  21. >>>4 belong&0x00ffffff 2 vax11/785
  22. >>>4 belong&0x00ffffff 3 vax11/750
  23. >>>4 belong&0x00ffffff 4 vax11/730
  24. >>>4 belong&0x00ffffff 5 uvaxI
  25. >>>4 belong&0x00ffffff 6 uvaxII
  26. >>>4 belong&0x00ffffff 7 vax8200
  27. >>>4 belong&0x00ffffff 8 vax8500
  28. >>>4 belong&0x00ffffff 9 vax8600
  29. >>>4 belong&0x00ffffff 10 vax8650
  30. >>>4 belong&0x00ffffff 11 vax8800
  31. >>>4 belong&0x00ffffff 12 uvaxIII
  32. >>>4 belong&0x00ffffff >12 vax subarchitecture=%d
  33. >>0 belong&0x00ffffff 2 romp
  34. >>0 belong&0x00ffffff 3 architecture=3
  35. >>0 belong&0x00ffffff 4 ns32032
  36. >>0 belong&0x00ffffff 5 ns32332
  37. >>0 belong&0x00ffffff 6 m68k
  38. # 7 x86
  39. >>0 belong&0x00ffffff 7
  40. >>>4 belong&0x0000000f 3 i386
  41. >>>4 belong&0x0000000f 4 i486
  42. >>>>4 belong&0x00fffff0 0
  43. >>>>4 belong&0x00fffff0 0x80 \bsx
  44. >>>4 belong&0x0000000f 5 i586
  45. >>>4 belong&0x0000000f 6
  46. >>>>4 belong&0x00fffff0 0 p6
  47. >>>>4 belong&0x00fffff0 0x10 pentium_pro
  48. >>>>4 belong&0x00fffff0 0x20 pentium_2_m0x20
  49. >>>>4 belong&0x00fffff0 0x30 pentium_2_m3
  50. >>>>4 belong&0x00fffff0 0x40 pentium_2_m0x40
  51. >>>>4 belong&0x00fffff0 0x50 pentium_2_m5
  52. >>>>4 belong&0x00fffff0 >0x50 pentium_2_m0x%x
  53. >>>4 belong&0x0000000f 7 celeron
  54. >>>>4 belong&0x00fffff0 0x00 \b_m0x%x
  55. >>>>4 belong&0x00fffff0 0x10 \b_m0x%x
  56. >>>>4 belong&0x00fffff0 0x20 \b_m0x%x
  57. >>>>4 belong&0x00fffff0 0x30 \b_m0x%x
  58. >>>>4 belong&0x00fffff0 0x40 \b_m0x%x
  59. >>>>4 belong&0x00fffff0 0x50 \b_m0x%x
  60. >>>>4 belong&0x00fffff0 0x60
  61. >>>>4 belong&0x00fffff0 0x70 \b_mobile
  62. >>>>4 belong&0x00fffff0 >0x70 \b_m0x%x
  63. >>>4 belong&0x0000000f 8 pentium_3
  64. >>>>4 belong&0x00fffff0 0x00
  65. >>>>4 belong&0x00fffff0 0x10 \b_m
  66. >>>>4 belong&0x00fffff0 0x20 \b_xeon
  67. >>>>4 belong&0x00fffff0 >0x20 \b_m0x%x
  68. >>>4 belong&0x0000000f 9 pentiumM
  69. >>>>4 belong&0x00fffff0 0x00
  70. >>>>4 belong&0x00fffff0 >0x00 \b_m0x%x
  71. >>>4 belong&0x0000000f 10 pentium_4
  72. >>>>4 belong&0x00fffff0 0x00
  73. >>>>4 belong&0x00fffff0 0x10 \b_m
  74. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%x
  75. >>>4 belong&0x0000000f 11 itanium
  76. >>>>4 belong&0x00fffff0 0x00
  77. >>>>4 belong&0x00fffff0 0x10 \b_2
  78. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%x
  79. >>>4 belong&0x0000000f 12 xeon
  80. >>>>4 belong&0x00fffff0 0x00
  81. >>>>4 belong&0x00fffff0 0x10 \b_mp
  82. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%x
  83. >>>4 belong&0x0000000f >12 ia32 family=%d
  84. >>>>4 belong&0x00fffff0 0x00
  85. >>>>4 belong&0x00fffff0 >0x00 model=%x
  86. >>0 belong&0x00ffffff 8 mips
  87. >>>4 belong&0x00ffffff 1 R2300
  88. >>>4 belong&0x00ffffff 2 R2600
  89. >>>4 belong&0x00ffffff 3 R2800
  90. >>>4 belong&0x00ffffff 4 R2000a
  91. >>>4 belong&0x00ffffff 5 R2000
  92. >>>4 belong&0x00ffffff 6 R3000a
  93. >>>4 belong&0x00ffffff 7 R3000
  94. >>>4 belong&0x00ffffff >7 subarchitecture=%d
  95. >>0 belong&0x00ffffff 9 ns32532
  96. >>0 belong&0x00ffffff 10 mc98000
  97. >>0 belong&0x00ffffff 11 hppa
  98. >>>4 belong&0x00ffffff 0 7100
  99. >>>4 belong&0x00ffffff 1 7100LC
  100. >>>4 belong&0x00ffffff >1 subarchitecture=%d
  101. >>0 belong&0x00ffffff 12 arm
  102. >>>4 belong&0x00ffffff 0
  103. >>>4 belong&0x00ffffff 1 subarchitecture=%d
  104. >>>4 belong&0x00ffffff 2 subarchitecture=%d
  105. >>>4 belong&0x00ffffff 3 subarchitecture=%d
  106. >>>4 belong&0x00ffffff 4 subarchitecture=%d
  107. >>>4 belong&0x00ffffff 5 \bv4t
  108. >>>4 belong&0x00ffffff 6 \bv6
  109. >>>4 belong&0x00ffffff 7 \bv5tej
  110. >>>4 belong&0x00ffffff 8 \bxscale
  111. >>>4 belong&0x00ffffff 9 \bv7
  112. >>>4 belong&0x00ffffff 10 \bv7f
  113. >>>4 belong&0x00ffffff 11 \bv7s
  114. >>>4 belong&0x00ffffff 12 \bv7k
  115. >>>4 belong&0x00ffffff 13 \bv8
  116. >>>4 belong&0x00ffffff 14 \bv6m
  117. >>>4 belong&0x00ffffff 15 \bv7m
  118. >>>4 belong&0x00ffffff 16 \bv7em
  119. >>>4 belong&0x00ffffff >16 subarchitecture=%d
  120. # 13 m88k
  121. >>0 belong&0x00ffffff 13
  122. >>>4 belong&0x00ffffff 0 mc88000
  123. >>>4 belong&0x00ffffff 1 mc88100
  124. >>>4 belong&0x00ffffff 2 mc88110
  125. >>>4 belong&0x00ffffff >2 mc88000 subarchitecture=%d
  126. >>0 belong&0x00ffffff 14 SPARC
  127. >>0 belong&0x00ffffff 15 i860g
  128. >>0 belong&0x00ffffff 16 alpha
  129. >>0 belong&0x00ffffff 17 rs6000
  130. >>0 belong&0x00ffffff 18 ppc
  131. >>>4 belong&0x00ffffff 0
  132. >>>4 belong&0x00ffffff 1 \b_601
  133. >>>4 belong&0x00ffffff 2 \b_602
  134. >>>4 belong&0x00ffffff 3 \b_603
  135. >>>4 belong&0x00ffffff 4 \b_603e
  136. >>>4 belong&0x00ffffff 5 \b_603ev
  137. >>>4 belong&0x00ffffff 6 \b_604
  138. >>>4 belong&0x00ffffff 7 \b_604e
  139. >>>4 belong&0x00ffffff 8 \b_620
  140. >>>4 belong&0x00ffffff 9 \b_650
  141. >>>4 belong&0x00ffffff 10 \b_7400
  142. >>>4 belong&0x00ffffff 11 \b_7450
  143. >>>4 belong&0x00ffffff 100 \b_970
  144. >>>4 belong&0x00ffffff >100 subarchitecture=%d
  145. >>0 belong&0x00ffffff >18 architecture=%d
  146. >0 belong&0x01000000 0x01000000
  147. #
  148. # 64-bit ABIs.
  149. #
  150. >>0 belong&0x00ffffff 0 64-bit architecture=%d
  151. >>0 belong&0x00ffffff 1 64-bit architecture=%d
  152. >>0 belong&0x00ffffff 2 64-bit architecture=%d
  153. >>0 belong&0x00ffffff 3 64-bit architecture=%d
  154. >>0 belong&0x00ffffff 4 64-bit architecture=%d
  155. >>0 belong&0x00ffffff 5 64-bit architecture=%d
  156. >>0 belong&0x00ffffff 6 64-bit architecture=%d
  157. >>0 belong&0x00ffffff 7 x86_64
  158. >>>4 belong&0x00ffffff 0 subarchitecture=%d
  159. >>>4 belong&0x00ffffff 1 subarchitecture=%d
  160. >>>4 belong&0x00ffffff 2 subarchitecture=%d
  161. >>>4 belong&0x00ffffff 3
  162. >>>4 belong&0x00ffffff 4 \b_arch1
  163. >>>4 belong&0x00ffffff 8 \b_haswell
  164. >>>4 belong&0x00ffffff >4 subarchitecture=%d
  165. >>0 belong&0x00ffffff 8 64-bit architecture=%d
  166. >>0 belong&0x00ffffff 9 64-bit architecture=%d
  167. >>0 belong&0x00ffffff 10 64-bit architecture=%d
  168. >>0 belong&0x00ffffff 11 64-bit architecture=%d
  169. >>0 belong&0x00ffffff 12 arm64
  170. >>>4 belong&0x00ffffff 0
  171. >>>4 belong&0x00ffffff 1 \bv8
  172. >>0 belong&0x00ffffff 13 64-bit architecture=%d
  173. >>0 belong&0x00ffffff 14 64-bit architecture=%d
  174. >>0 belong&0x00ffffff 15 64-bit architecture=%d
  175. >>0 belong&0x00ffffff 16 64-bit architecture=%d
  176. >>0 belong&0x00ffffff 17 64-bit architecture=%d
  177. >>0 belong&0x00ffffff 18 ppc64
  178. >>>4 belong&0x00ffffff 0
  179. >>>4 belong&0x00ffffff 1 \b_601
  180. >>>4 belong&0x00ffffff 2 \b_602
  181. >>>4 belong&0x00ffffff 3 \b_603
  182. >>>4 belong&0x00ffffff 4 \b_603e
  183. >>>4 belong&0x00ffffff 5 \b_603ev
  184. >>>4 belong&0x00ffffff 6 \b_604
  185. >>>4 belong&0x00ffffff 7 \b_604e
  186. >>>4 belong&0x00ffffff 8 \b_620
  187. >>>4 belong&0x00ffffff 9 \b_650
  188. >>>4 belong&0x00ffffff 10 \b_7400
  189. >>>4 belong&0x00ffffff 11 \b_7450
  190. >>>4 belong&0x00ffffff 100 \b_970
  191. >>>4 belong&0x00ffffff >100 subarchitecture=%d
  192. >>0 belong&0x00ffffff >18 64-bit architecture=%d
  193. 0 name mach-o-be
  194. >0 byte 0xcf 64-bit
  195. >4 use mach-o-cpu
  196. >12 belong 1 object
  197. >12 belong 2 executable
  198. >12 belong 3 fixed virtual memory shared library
  199. >12 belong 4 core
  200. >12 belong 5 preload executable
  201. >12 belong 6 dynamically linked shared library
  202. >12 belong 7 dynamic linker
  203. >12 belong 8 bundle
  204. >12 belong 9 dynamically linked shared library stub
  205. >12 belong 10 dSYM companion file
  206. >12 belong 11 kext bundle
  207. >12 belong >11
  208. >>12 belong x filetype=%d
  209. >24 belong >0 \b, flags:<
  210. >>24 belong &0x0000001 \bNOUNDEFS
  211. >>24 belong &0x0000002 \b|INCRLINK
  212. >>24 belong &0x0000004 \b|DYLDLINK
  213. >>24 belong &0x0000008 \b|BINDATLOAD
  214. >>24 belong &0x0000010 \b|PREBOUND
  215. >>24 belong &0x0000020 \b|SPLIT_SEGS
  216. >>24 belong &0x0000040 \b|LAZY_INIT
  217. >>24 belong &0x0000080 \b|TWOLEVEL
  218. >>24 belong &0x0000100 \b|FORCE_FLAT
  219. >>24 belong &0x0000200 \b|NOMULTIDEFS
  220. >>24 belong &0x0000400 \b|NOFIXPREBINDING
  221. >>24 belong &0x0000800 \b|PREBINDABLE
  222. >>24 belong &0x0001000 \b|ALLMODSBOUND
  223. >>24 belong &0x0002000 \b|SUBSECTIONS_VIA_SYMBOLS
  224. >>24 belong &0x0004000 \b|CANONICAL
  225. >>24 belong &0x0008000 \b|WEAK_DEFINES
  226. >>24 belong &0x0010000 \b|BINDS_TO_WEAK
  227. >>24 belong &0x0020000 \b|ALLOW_STACK_EXECUTION
  228. >>24 belong &0x0040000 \b|ROOT_SAFE
  229. >>24 belong &0x0080000 \b|SETUID_SAFE
  230. >>24 belong &0x0100000 \b|NO_REEXPORTED_DYLIBS
  231. >>24 belong &0x0200000 \b|PIE
  232. >>24 belong &0x0400000 \b|DEAD_STRIPPABLE_DYLIB
  233. >>24 belong &0x0800000 \b|HAS_TLV_DESCRIPTORS
  234. >>24 belong &0x1000000 \b|NO_HEAP_EXECUTION
  235. >>24 belong &0x2000000 \b|APP_EXTENSION_SAFE
  236. >>24 belong x \b>
  237. #
  238. 0 lelong&0xfffffffe 0xfeedface Mach-O
  239. !:strength +1
  240. !:mime application/x-mach-binary
  241. >0 use \^mach-o-be
  242. 0 belong&0xfffffffe 0xfeedface Mach-O
  243. !:strength +1
  244. !:mime application/x-mach-binary
  245. >0 use mach-o-be