netbsd 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. #------------------------------------------------------------------------------
  2. # $File: netbsd,v 1.26 2019/01/01 03:11:23 christos Exp $
  3. # netbsd: file(1) magic for NetBSD objects
  4. #
  5. # All new-style magic numbers are in network byte order.
  6. # The old-style magic numbers are indistinguishable from the same magic
  7. # numbers used in other systems, and are handled, for all those systems,
  8. # in aout.
  9. #
  10. 0 name netbsd-detail
  11. >20 lelong x @%#x
  12. >4 lelong >0 \b+T=%d
  13. >8 lelong >0 \b+D=%d
  14. >12 lelong >0 \b+B=%d
  15. >16 lelong >0 \b+S=%d
  16. >24 lelong >0 \b+TR=%d
  17. >28 lelong >0 \b+TD=%d
  18. 0 name netbsd-4096
  19. >0 byte &0x80
  20. >>20 lelong <4096 shared library
  21. >>20 lelong =4096 dynamically linked executable
  22. >>20 lelong >4096 dynamically linked executable
  23. >0 byte ^0x80 executable
  24. >16 lelong >0 not stripped
  25. 0 name netbsd-8192
  26. >0 byte &0x80
  27. >>20 lelong <8192 shared library
  28. >>20 lelong =8192 dynamically linked executable
  29. >>20 lelong >8192 dynamically linked executable
  30. >0 byte ^0x80 executable
  31. >16 lelong >0 not stripped
  32. >0 use netbsd-detail
  33. 0 name netbsd-normal
  34. >0 byte &0x80 dynamically linked executable
  35. >0 byte ^0x80
  36. >>0 byte &0x40 position independent
  37. >>20 lelong !0 executable
  38. >>20 lelong =0 object file
  39. >16 lelong >0 not stripped
  40. >0 use netbsd-detail
  41. 0 name netbsd-pure
  42. >0 byte &0x80 dynamically linked executable
  43. >0 byte ^0x80 executable
  44. >16 lelong >0 not stripped
  45. >0 use netbsd-detail
  46. 0 name netbsd-core
  47. >12 string >\0 from '%s'
  48. >32 lelong !0 (signal %d)
  49. 0 belong&0377777777 041400413 a.out NetBSD/i386 demand paged
  50. >0 use netbsd-4096
  51. 0 belong&0377777777 041400410 a.out NetBSD/i386 pure
  52. >0 use netbsd-pure
  53. 0 belong&0377777777 041400407 a.out NetBSD/i386
  54. >0 use netbsd-normal
  55. 0 belong&0377777777 041400507 a.out NetBSD/i386 core
  56. >0 use netbsd-core
  57. 0 belong&0377777777 041600413 a.out NetBSD/m68k demand paged
  58. >0 use \^netbsd-8192
  59. 0 belong&0377777777 041600410 a.out NetBSD/m68k pure
  60. >0 use \^netbsd-pure
  61. 0 belong&0377777777 041600407 a.out NetBSD/m68k
  62. >0 use \^netbsd-normal
  63. 0 belong&0377777777 041600507 a.out NetBSD/m68k core
  64. >0 use \^netbsd-core
  65. 0 belong&0377777777 042000413 a.out NetBSD/m68k4k demand paged
  66. >0 use \^netbsd-4096
  67. 0 belong&0377777777 042000410 a.out NetBSD/m68k4k pure
  68. >0 use \^netbsd-pure
  69. 0 belong&0377777777 042000407 a.out NetBSD/m68k4k
  70. >0 use \^netbsd-normal
  71. 0 belong&0377777777 042000507 a.out NetBSD/m68k4k core
  72. >0 use \^netbsd-core
  73. 0 belong&0377777777 042200413 a.out NetBSD/ns32532 demand paged
  74. >0 use netbsd-4096
  75. 0 belong&0377777777 042200410 a.out NetBSD/ns32532 pure
  76. >0 use netbsd-pure
  77. 0 belong&0377777777 042200407 a.out NetBSD/ns32532
  78. >0 use netbsd-normal
  79. 0 belong&0377777777 042200507 a.out NetBSD/ns32532 core
  80. >0 use netbsd-core
  81. 0 belong&0377777777 045200507 a.out NetBSD/powerpc core
  82. >0 use netbsd-core
  83. 0 belong&0377777777 042400413 a.out NetBSD/SPARC demand paged
  84. >0 use \^netbsd-8192
  85. 0 belong&0377777777 042400410 a.out NetBSD/SPARC pure
  86. >0 use \^netbsd-pure
  87. 0 belong&0377777777 042400407 a.out NetBSD/SPARC
  88. >0 use \^netbsd-normal
  89. 0 belong&0377777777 042400507 a.out NetBSD/SPARC core
  90. >0 use \^netbsd-core
  91. 0 belong&0377777777 042600413 a.out NetBSD/pmax demand paged
  92. >0 use netbsd-4096
  93. 0 belong&0377777777 042600410 a.out NetBSD/pmax pure
  94. >0 use \^netbsd-pure
  95. 0 belong&0377777777 042600407 a.out NetBSD/pmax
  96. >0 use netbsd-normal
  97. 0 belong&0377777777 042600507 a.out NetBSD/pmax core
  98. >0 use netbsd-core
  99. 0 belong&0377777777 043000413 a.out NetBSD/vax 1k demand paged
  100. >0 use netbsd-4096
  101. 0 belong&0377777777 043000410 a.out NetBSD/vax 1k pure
  102. >0 use netbsd-pure
  103. 0 belong&0377777777 043000407 a.out NetBSD/vax 1k
  104. >0 use netbsd-normal
  105. 0 belong&0377777777 043000507 a.out NetBSD/vax 1k core
  106. >0 use netbsd-core
  107. 0 belong&0377777777 045400413 a.out NetBSD/vax 4k demand paged
  108. >0 use netbsd-4096
  109. 0 belong&0377777777 045400410 a.out NetBSD/vax 4k pure
  110. >0 use netbsd-pure
  111. 0 belong&0377777777 045400407 a.out NetBSD/vax 4k
  112. >0 use netbsd-normal
  113. 0 belong&0377777777 045400507 a.out NetBSD/vax 4k core
  114. >0 use netbsd-core
  115. # NetBSD/alpha does not support (and has never supported) a.out objects,
  116. # so no rules are provided for them. NetBSD/alpha ELF objects are
  117. # dealt with in "elf".
  118. 0 lelong 0x00070185 ECOFF NetBSD/alpha binary
  119. >10 leshort 0x0001 not stripped
  120. >10 leshort 0x0000 stripped
  121. 0 belong&0377777777 043200507 a.out NetBSD/alpha core
  122. >12 string >\0 from '%s'
  123. >32 lelong !0 (signal %d)
  124. 0 belong&0377777777 043400413 a.out NetBSD/mips demand paged
  125. >0 use \^netbsd-8192
  126. >16 belong >0 not stripped
  127. 0 belong&0377777777 043400410 a.out NetBSD/mips pure
  128. >0 use netbsd-pure
  129. 0 belong&0377777777 043400407 a.out NetBSD/mips
  130. >0 use netbsd-normal
  131. 0 belong&0377777777 043400507 a.out NetBSD/mips core
  132. >0 use netbsd-core
  133. 0 belong&0377777777 043600413 a.out NetBSD/arm32 demand paged
  134. >0 use netbsd-4096
  135. 0 belong&0377777777 043600410 a.out NetBSD/arm32 pure
  136. >0 use netbsd-pure
  137. 0 belong&0377777777 043600407 a.out NetBSD/arm32
  138. >0 use netbsd-normal
  139. # NetBSD/arm26 has always used ELF objects, but it shares a core file
  140. # format with NetBSD/arm32.
  141. 0 belong&0377777777 043600507 a.out NetBSD/arm core
  142. >0 use netbsd-core
  143. # Kernel core dump format
  144. 0 belong&0x0000ffff 0x00008fca NetBSD kernel core file
  145. >0 belong&0x03ff0000 0x00000000 \b, Unknown
  146. >0 belong&0x03ff0000 0x00010000 \b, sun 68010/68020
  147. >0 belong&0x03ff0000 0x00020000 \b, sun 68020
  148. >0 belong&0x03ff0000 0x00640000 \b, 386 PC
  149. >0 belong&0x03ff0000 0x00860000 \b, i386 BSD
  150. >0 belong&0x03ff0000 0x00870000 \b, m68k BSD (8K pages)
  151. >0 belong&0x03ff0000 0x00880000 \b, m68k BSD (4K pages)
  152. >0 belong&0x03ff0000 0x00890000 \b, ns32532 BSD
  153. >0 belong&0x03ff0000 0x008a0000 \b, SPARC/32 BSD
  154. >0 belong&0x03ff0000 0x008b0000 \b, pmax BSD
  155. >0 belong&0x03ff0000 0x008c0000 \b, vax BSD (1K pages)
  156. >0 belong&0x03ff0000 0x008d0000 \b, alpha BSD
  157. >0 belong&0x03ff0000 0x008e0000 \b, mips BSD (Big Endian)
  158. >0 belong&0x03ff0000 0x008f0000 \b, arm6 BSD
  159. >0 belong&0x03ff0000 0x00900000 \b, m68k BSD (2K pages)
  160. >0 belong&0x03ff0000 0x00910000 \b, sh3 BSD
  161. >0 belong&0x03ff0000 0x00950000 \b, ppc BSD (Big Endian)
  162. >0 belong&0x03ff0000 0x00960000 \b, vax BSD (4K pages)
  163. >0 belong&0x03ff0000 0x00970000 \b, mips1 BSD
  164. >0 belong&0x03ff0000 0x00980000 \b, mips2 BSD
  165. >0 belong&0x03ff0000 0x00990000 \b, m88k BSD
  166. >0 belong&0x03ff0000 0x00920000 \b, parisc BSD
  167. >0 belong&0x03ff0000 0x009b0000 \b, sh5/64 BSD
  168. >0 belong&0x03ff0000 0x009c0000 \b, SPARC/64 BSD
  169. >0 belong&0x03ff0000 0x009d0000 \b, amd64 BSD
  170. >0 belong&0x03ff0000 0x009e0000 \b, sh5/32 BSD
  171. >0 belong&0x03ff0000 0x009f0000 \b, ia64 BSD
  172. >0 belong&0x03ff0000 0x00b70000 \b, aarch64 BSD
  173. >0 belong&0x03ff0000 0x00b80000 \b, or1k BSD
  174. >0 belong&0x03ff0000 0x00b90000 \b, Risk-V BSD
  175. >0 belong&0x03ff0000 0x00c80000 \b, hp200 BSD
  176. >0 belong&0x03ff0000 0x012c0000 \b, hp300 BSD
  177. >0 belong&0x03ff0000 0x020b0000 \b, hp800 HP-UX
  178. >0 belong&0x03ff0000 0x020c0000 \b, hp200/hp300 HP-UX
  179. >0 belong&0xfc000000 0x04000000 \b, CPU
  180. >0 belong&0xfc000000 0x08000000 \b, DATA
  181. >0 belong&0xfc000000 0x10000000 \b, STACK
  182. >4 leshort x \b, (headersize = %d
  183. >6 leshort x \b, segmentsize = %d
  184. >8 lelong x \b, segments = %d)
  185. # little endian only for now.
  186. 0 name ktrace
  187. >4 leshort 7
  188. >>6 leshort <3 NetBSD ktrace file version %d
  189. >>>12 string x from %s
  190. >>>56 string x \b, emulation %s
  191. >>>8 lelong <65536 \b, pid=%d
  192. 56 string netbsd
  193. >0 use ktrace
  194. 56 string linux
  195. >0 use ktrace
  196. 56 string sunos
  197. >0 use ktrace
  198. 56 string hpux
  199. >0 use ktrace