laag-nasm 2.13.03.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +57 -0
  3. data/LICENSE.txt +29 -0
  4. data/README.org +34 -0
  5. data/ext/laag/nasm/extconf.rb +16 -0
  6. data/laag-nasm.gemspec +20 -0
  7. data/lib/laag/nasm.rb +29 -0
  8. data/patches/Makefile.in.patch +13 -0
  9. data/vendor/repo.or.cz/nasm/.gitignore +102 -0
  10. data/vendor/repo.or.cz/nasm/AUTHORS +137 -0
  11. data/vendor/repo.or.cz/nasm/CHANGES +2 -0
  12. data/vendor/repo.or.cz/nasm/ChangeLog +2905 -0
  13. data/vendor/repo.or.cz/nasm/INSTALL +102 -0
  14. data/vendor/repo.or.cz/nasm/LICENSE +29 -0
  15. data/vendor/repo.or.cz/nasm/Makefile.in +855 -0
  16. data/vendor/repo.or.cz/nasm/Mkfiles/README +46 -0
  17. data/vendor/repo.or.cz/nasm/Mkfiles/msvc.mak +732 -0
  18. data/vendor/repo.or.cz/nasm/Mkfiles/openwcom.mak +706 -0
  19. data/vendor/repo.or.cz/nasm/README +23 -0
  20. data/vendor/repo.or.cz/nasm/SubmittingPatches +116 -0
  21. data/vendor/repo.or.cz/nasm/TODO +376 -0
  22. data/vendor/repo.or.cz/nasm/aclocal.m4 +139 -0
  23. data/vendor/repo.or.cz/nasm/asm/assemble.c +2957 -0
  24. data/vendor/repo.or.cz/nasm/asm/assemble.h +54 -0
  25. data/vendor/repo.or.cz/nasm/asm/directiv.c +566 -0
  26. data/vendor/repo.or.cz/nasm/asm/directiv.dat +92 -0
  27. data/vendor/repo.or.cz/nasm/asm/error.c +202 -0
  28. data/vendor/repo.or.cz/nasm/asm/eval.c +1014 -0
  29. data/vendor/repo.or.cz/nasm/asm/eval.h +49 -0
  30. data/vendor/repo.or.cz/nasm/asm/exprdump.c +79 -0
  31. data/vendor/repo.or.cz/nasm/asm/exprlib.c +200 -0
  32. data/vendor/repo.or.cz/nasm/asm/float.c +952 -0
  33. data/vendor/repo.or.cz/nasm/asm/float.h +54 -0
  34. data/vendor/repo.or.cz/nasm/asm/labels.c +540 -0
  35. data/vendor/repo.or.cz/nasm/asm/listing.c +346 -0
  36. data/vendor/repo.or.cz/nasm/asm/listing.h +113 -0
  37. data/vendor/repo.or.cz/nasm/asm/nasm.c +1855 -0
  38. data/vendor/repo.or.cz/nasm/asm/parser.c +1167 -0
  39. data/vendor/repo.or.cz/nasm/asm/parser.h +45 -0
  40. data/vendor/repo.or.cz/nasm/asm/phash.pl +109 -0
  41. data/vendor/repo.or.cz/nasm/asm/pptok.dat +96 -0
  42. data/vendor/repo.or.cz/nasm/asm/pptok.pl +271 -0
  43. data/vendor/repo.or.cz/nasm/asm/pragma.c +218 -0
  44. data/vendor/repo.or.cz/nasm/asm/preproc-nop.c +188 -0
  45. data/vendor/repo.or.cz/nasm/asm/preproc.c +5459 -0
  46. data/vendor/repo.or.cz/nasm/asm/preproc.h +55 -0
  47. data/vendor/repo.or.cz/nasm/asm/quote.c +479 -0
  48. data/vendor/repo.or.cz/nasm/asm/quote.h +44 -0
  49. data/vendor/repo.or.cz/nasm/asm/rdstrnum.c +68 -0
  50. data/vendor/repo.or.cz/nasm/asm/segalloc.c +51 -0
  51. data/vendor/repo.or.cz/nasm/asm/stdscan.c +345 -0
  52. data/vendor/repo.or.cz/nasm/asm/stdscan.h +49 -0
  53. data/vendor/repo.or.cz/nasm/asm/strfunc.c +359 -0
  54. data/vendor/repo.or.cz/nasm/asm/tokens.dat +135 -0
  55. data/vendor/repo.or.cz/nasm/asm/tokhash.pl +284 -0
  56. data/vendor/repo.or.cz/nasm/autogen.sh +9 -0
  57. data/vendor/repo.or.cz/nasm/common/common.c +122 -0
  58. data/vendor/repo.or.cz/nasm/config/msvc.h +192 -0
  59. data/vendor/repo.or.cz/nasm/config/unknown.h +51 -0
  60. data/vendor/repo.or.cz/nasm/config/watcom.h +74 -0
  61. data/vendor/repo.or.cz/nasm/configure.ac +253 -0
  62. data/vendor/repo.or.cz/nasm/contrib/MSVC6.txt +25 -0
  63. data/vendor/repo.or.cz/nasm/contrib/VSrules/nasm.README +16 -0
  64. data/vendor/repo.or.cz/nasm/contrib/VSrules/nasm.rules +79 -0
  65. data/vendor/repo.or.cz/nasm/disasm/disasm.c +1735 -0
  66. data/vendor/repo.or.cz/nasm/disasm/disasm.h +49 -0
  67. data/vendor/repo.or.cz/nasm/disasm/ndisasm.c +397 -0
  68. data/vendor/repo.or.cz/nasm/disasm/sync.c +132 -0
  69. data/vendor/repo.or.cz/nasm/disasm/sync.h +45 -0
  70. data/vendor/repo.or.cz/nasm/doc/Makefile.in +86 -0
  71. data/vendor/repo.or.cz/nasm/doc/README +20 -0
  72. data/vendor/repo.or.cz/nasm/doc/afmmetrics.ph +102 -0
  73. data/vendor/repo.or.cz/nasm/doc/changes.src +2588 -0
  74. data/vendor/repo.or.cz/nasm/doc/findfont.ph +180 -0
  75. data/vendor/repo.or.cz/nasm/doc/genps.pl +1294 -0
  76. data/vendor/repo.or.cz/nasm/doc/inslist.pl +108 -0
  77. data/vendor/repo.or.cz/nasm/doc/internal.doc +290 -0
  78. data/vendor/repo.or.cz/nasm/doc/local.css +1 -0
  79. data/vendor/repo.or.cz/nasm/doc/nasmdoc.css +150 -0
  80. data/vendor/repo.or.cz/nasm/doc/nasmdoc.src +8309 -0
  81. data/vendor/repo.or.cz/nasm/doc/nasmlogo.eps +212 -0
  82. data/vendor/repo.or.cz/nasm/doc/nasmlogw.png +0 -0
  83. data/vendor/repo.or.cz/nasm/doc/psfonts.ph +53 -0
  84. data/vendor/repo.or.cz/nasm/doc/pspdf.pl +98 -0
  85. data/vendor/repo.or.cz/nasm/doc/pswidth.ph +25 -0
  86. data/vendor/repo.or.cz/nasm/doc/rdsrc.pl +1111 -0
  87. data/vendor/repo.or.cz/nasm/doc/ttfmetrics.ph +63 -0
  88. data/vendor/repo.or.cz/nasm/headers/c +33 -0
  89. data/vendor/repo.or.cz/nasm/headers/doc +33 -0
  90. data/vendor/repo.or.cz/nasm/headers/mac +33 -0
  91. data/vendor/repo.or.cz/nasm/headers/perl +33 -0
  92. data/vendor/repo.or.cz/nasm/include/compiler.h +277 -0
  93. data/vendor/repo.or.cz/nasm/include/disp8.h +45 -0
  94. data/vendor/repo.or.cz/nasm/include/error.h +135 -0
  95. data/vendor/repo.or.cz/nasm/include/hashtbl.h +85 -0
  96. data/vendor/repo.or.cz/nasm/include/iflag.h +173 -0
  97. data/vendor/repo.or.cz/nasm/include/insns.h +76 -0
  98. data/vendor/repo.or.cz/nasm/include/labels.h +60 -0
  99. data/vendor/repo.or.cz/nasm/include/md5.h +21 -0
  100. data/vendor/repo.or.cz/nasm/include/nasm.h +1246 -0
  101. data/vendor/repo.or.cz/nasm/include/nasmint.h +219 -0
  102. data/vendor/repo.or.cz/nasm/include/nasmlib.h +524 -0
  103. data/vendor/repo.or.cz/nasm/include/opflags.h +271 -0
  104. data/vendor/repo.or.cz/nasm/include/perfhash.h +52 -0
  105. data/vendor/repo.or.cz/nasm/include/raa.h +46 -0
  106. data/vendor/repo.or.cz/nasm/include/rbtree.h +51 -0
  107. data/vendor/repo.or.cz/nasm/include/rdoff.h +169 -0
  108. data/vendor/repo.or.cz/nasm/include/saa.h +94 -0
  109. data/vendor/repo.or.cz/nasm/include/strlist.h +55 -0
  110. data/vendor/repo.or.cz/nasm/include/tables.h +70 -0
  111. data/vendor/repo.or.cz/nasm/include/ver.h +47 -0
  112. data/vendor/repo.or.cz/nasm/install-sh +250 -0
  113. data/vendor/repo.or.cz/nasm/macros/altreg.mac +107 -0
  114. data/vendor/repo.or.cz/nasm/macros/fp.mac +54 -0
  115. data/vendor/repo.or.cz/nasm/macros/ifunc.mac +48 -0
  116. data/vendor/repo.or.cz/nasm/macros/macros.pl +294 -0
  117. data/vendor/repo.or.cz/nasm/macros/smartalign.mac +189 -0
  118. data/vendor/repo.or.cz/nasm/macros/standard.mac +226 -0
  119. data/vendor/repo.or.cz/nasm/misc/Doxyfile +752 -0
  120. data/vendor/repo.or.cz/nasm/misc/Nindent +18 -0
  121. data/vendor/repo.or.cz/nasm/misc/README +2 -0
  122. data/vendor/repo.or.cz/nasm/misc/c16.mac +82 -0
  123. data/vendor/repo.or.cz/nasm/misc/c32.mac +52 -0
  124. data/vendor/repo.or.cz/nasm/misc/crcgen.c +44 -0
  125. data/vendor/repo.or.cz/nasm/misc/exebin.mac +57 -0
  126. data/vendor/repo.or.cz/nasm/misc/exebin2.mac +114 -0
  127. data/vendor/repo.or.cz/nasm/misc/fmtinsns.pl +40 -0
  128. data/vendor/repo.or.cz/nasm/misc/genfma.pl +63 -0
  129. data/vendor/repo.or.cz/nasm/misc/hints.txt +26 -0
  130. data/vendor/repo.or.cz/nasm/misc/magic +6 -0
  131. data/vendor/repo.or.cz/nasm/misc/myC32.mac +121 -0
  132. data/vendor/repo.or.cz/nasm/misc/nasm.sl +320 -0
  133. data/vendor/repo.or.cz/nasm/misc/nasmstab +296 -0
  134. data/vendor/repo.or.cz/nasm/misc/omfdump.c +517 -0
  135. data/vendor/repo.or.cz/nasm/misc/pmw.bat +9 -0
  136. data/vendor/repo.or.cz/nasm/misc/proc32.ash +441 -0
  137. data/vendor/repo.or.cz/nasm/misc/scitech.mac +1223 -0
  138. data/vendor/repo.or.cz/nasm/misc/xcrcgen.c +80 -0
  139. data/vendor/repo.or.cz/nasm/nasm.spec.in +83 -0
  140. data/vendor/repo.or.cz/nasm/nasm.spec.sed +3 -0
  141. data/vendor/repo.or.cz/nasm/nasm.txt +306 -0
  142. data/vendor/repo.or.cz/nasm/nasmlib/badenum.c +43 -0
  143. data/vendor/repo.or.cz/nasm/nasmlib/bsi.c +77 -0
  144. data/vendor/repo.or.cz/nasm/nasmlib/crc64.c +189 -0
  145. data/vendor/repo.or.cz/nasm/nasmlib/file.c +259 -0
  146. data/vendor/repo.or.cz/nasm/nasmlib/file.h +128 -0
  147. data/vendor/repo.or.cz/nasm/nasmlib/filename.c +69 -0
  148. data/vendor/repo.or.cz/nasm/nasmlib/hashtbl.c +232 -0
  149. data/vendor/repo.or.cz/nasm/nasmlib/ilog2.c +168 -0
  150. data/vendor/repo.or.cz/nasm/nasmlib/malloc.c +108 -0
  151. data/vendor/repo.or.cz/nasm/nasmlib/md5c.c +247 -0
  152. data/vendor/repo.or.cz/nasm/nasmlib/mmap.c +139 -0
  153. data/vendor/repo.or.cz/nasm/nasmlib/path.c +186 -0
  154. data/vendor/repo.or.cz/nasm/nasmlib/perfhash.c +55 -0
  155. data/vendor/repo.or.cz/nasm/nasmlib/perfhash.pl +362 -0
  156. data/vendor/repo.or.cz/nasm/nasmlib/raa.c +173 -0
  157. data/vendor/repo.or.cz/nasm/nasmlib/rbtree.c +119 -0
  158. data/vendor/repo.or.cz/nasm/nasmlib/readnum.c +172 -0
  159. data/vendor/repo.or.cz/nasm/nasmlib/realpath.c +135 -0
  160. data/vendor/repo.or.cz/nasm/nasmlib/saa.c +431 -0
  161. data/vendor/repo.or.cz/nasm/nasmlib/srcfile.c +128 -0
  162. data/vendor/repo.or.cz/nasm/nasmlib/string.c +242 -0
  163. data/vendor/repo.or.cz/nasm/nasmlib/strlist.c +100 -0
  164. data/vendor/repo.or.cz/nasm/nasmlib/ver.c +51 -0
  165. data/vendor/repo.or.cz/nasm/nasmlib/zerobuf.c +42 -0
  166. data/vendor/repo.or.cz/nasm/ndisasm.txt +94 -0
  167. data/vendor/repo.or.cz/nasm/nsis/NASMMultiUser.nsh +478 -0
  168. data/vendor/repo.or.cz/nasm/nsis/getpearch.pl +76 -0
  169. data/vendor/repo.or.cz/nasm/nsis/nasm-un.ico +0 -0
  170. data/vendor/repo.or.cz/nasm/nsis/nasm.ico +0 -0
  171. data/vendor/repo.or.cz/nasm/nsis/nasm.nsi +241 -0
  172. data/vendor/repo.or.cz/nasm/output/codeview.c +814 -0
  173. data/vendor/repo.or.cz/nasm/output/dwarf.h +566 -0
  174. data/vendor/repo.or.cz/nasm/output/elf.h +537 -0
  175. data/vendor/repo.or.cz/nasm/output/legacy.c +112 -0
  176. data/vendor/repo.or.cz/nasm/output/nulldbg.c +93 -0
  177. data/vendor/repo.or.cz/nasm/output/nullout.c +51 -0
  178. data/vendor/repo.or.cz/nasm/output/outaout.c +954 -0
  179. data/vendor/repo.or.cz/nasm/output/outaout.mac +37 -0
  180. data/vendor/repo.or.cz/nasm/output/outas86.c +650 -0
  181. data/vendor/repo.or.cz/nasm/output/outas86.mac +37 -0
  182. data/vendor/repo.or.cz/nasm/output/outbin.c +1713 -0
  183. data/vendor/repo.or.cz/nasm/output/outbin.mac +40 -0
  184. data/vendor/repo.or.cz/nasm/output/outcoff.c +1242 -0
  185. data/vendor/repo.or.cz/nasm/output/outcoff.mac +43 -0
  186. data/vendor/repo.or.cz/nasm/output/outdbg.c +425 -0
  187. data/vendor/repo.or.cz/nasm/output/outelf.c +3370 -0
  188. data/vendor/repo.or.cz/nasm/output/outelf.h +156 -0
  189. data/vendor/repo.or.cz/nasm/output/outelf.mac +41 -0
  190. data/vendor/repo.or.cz/nasm/output/outform.c +120 -0
  191. data/vendor/repo.or.cz/nasm/output/outform.h +379 -0
  192. data/vendor/repo.or.cz/nasm/output/outieee.c +1528 -0
  193. data/vendor/repo.or.cz/nasm/output/outlib.c +58 -0
  194. data/vendor/repo.or.cz/nasm/output/outlib.h +63 -0
  195. data/vendor/repo.or.cz/nasm/output/outmacho.c +2387 -0
  196. data/vendor/repo.or.cz/nasm/output/outmacho.mac +49 -0
  197. data/vendor/repo.or.cz/nasm/output/outobj.c +2725 -0
  198. data/vendor/repo.or.cz/nasm/output/outobj.mac +49 -0
  199. data/vendor/repo.or.cz/nasm/output/outrdf.mac +40 -0
  200. data/vendor/repo.or.cz/nasm/output/outrdf2.c +791 -0
  201. data/vendor/repo.or.cz/nasm/output/outrdf2.mac +43 -0
  202. data/vendor/repo.or.cz/nasm/output/pecoff.h +532 -0
  203. data/vendor/repo.or.cz/nasm/output/stabs.h +144 -0
  204. data/vendor/repo.or.cz/nasm/perllib/crc64.ph +158 -0
  205. data/vendor/repo.or.cz/nasm/perllib/gensv.pl +34 -0
  206. data/vendor/repo.or.cz/nasm/perllib/phash.ph +200 -0
  207. data/vendor/repo.or.cz/nasm/perllib/random_sv_vectors.ph +67 -0
  208. data/vendor/repo.or.cz/nasm/rdoff/README +185 -0
  209. data/vendor/repo.or.cz/nasm/rdoff/collectn.c +44 -0
  210. data/vendor/repo.or.cz/nasm/rdoff/collectn.h +22 -0
  211. data/vendor/repo.or.cz/nasm/rdoff/doc/Makefile +37 -0
  212. data/vendor/repo.or.cz/nasm/rdoff/doc/rdoff.texi +137 -0
  213. data/vendor/repo.or.cz/nasm/rdoff/doc/v1-v2.txt +62 -0
  214. data/vendor/repo.or.cz/nasm/rdoff/hash.c +122 -0
  215. data/vendor/repo.or.cz/nasm/rdoff/hash.h +17 -0
  216. data/vendor/repo.or.cz/nasm/rdoff/ldrdf.1 +41 -0
  217. data/vendor/repo.or.cz/nasm/rdoff/ldrdf.c +1395 -0
  218. data/vendor/repo.or.cz/nasm/rdoff/ldsegs.h +59 -0
  219. data/vendor/repo.or.cz/nasm/rdoff/rdf2bin.1 +65 -0
  220. data/vendor/repo.or.cz/nasm/rdoff/rdf2bin.c +431 -0
  221. data/vendor/repo.or.cz/nasm/rdoff/rdf2com.1 +1 -0
  222. data/vendor/repo.or.cz/nasm/rdoff/rdf2ihx.1 +1 -0
  223. data/vendor/repo.or.cz/nasm/rdoff/rdf2ith.1 +1 -0
  224. data/vendor/repo.or.cz/nasm/rdoff/rdf2srec.1 +1 -0
  225. data/vendor/repo.or.cz/nasm/rdoff/rdfdump.1 +24 -0
  226. data/vendor/repo.or.cz/nasm/rdoff/rdfdump.c +347 -0
  227. data/vendor/repo.or.cz/nasm/rdoff/rdflib.1 +39 -0
  228. data/vendor/repo.or.cz/nasm/rdoff/rdflib.c +434 -0
  229. data/vendor/repo.or.cz/nasm/rdoff/rdfload.c +213 -0
  230. data/vendor/repo.or.cz/nasm/rdoff/rdfload.h +29 -0
  231. data/vendor/repo.or.cz/nasm/rdoff/rdfutils.h +165 -0
  232. data/vendor/repo.or.cz/nasm/rdoff/rdlar.c +492 -0
  233. data/vendor/repo.or.cz/nasm/rdoff/rdlar.h +34 -0
  234. data/vendor/repo.or.cz/nasm/rdoff/rdlib.c +290 -0
  235. data/vendor/repo.or.cz/nasm/rdoff/rdlib.h +62 -0
  236. data/vendor/repo.or.cz/nasm/rdoff/rdoff.c +621 -0
  237. data/vendor/repo.or.cz/nasm/rdoff/rdx.1 +21 -0
  238. data/vendor/repo.or.cz/nasm/rdoff/rdx.c +90 -0
  239. data/vendor/repo.or.cz/nasm/rdoff/segtab.c +172 -0
  240. data/vendor/repo.or.cz/nasm/rdoff/segtab.h +45 -0
  241. data/vendor/repo.or.cz/nasm/rdoff/symtab.c +159 -0
  242. data/vendor/repo.or.cz/nasm/rdoff/symtab.h +55 -0
  243. data/vendor/repo.or.cz/nasm/rdoff/test/Makefile +10 -0
  244. data/vendor/repo.or.cz/nasm/rdoff/test/makelib.sh +14 -0
  245. data/vendor/repo.or.cz/nasm/rdoff/test/rdfseg.asm +20 -0
  246. data/vendor/repo.or.cz/nasm/rdoff/test/rdfseg2.asm +12 -0
  247. data/vendor/repo.or.cz/nasm/rdoff/test/rdftest1.asm +54 -0
  248. data/vendor/repo.or.cz/nasm/rdoff/test/rdftest2.asm +33 -0
  249. data/vendor/repo.or.cz/nasm/rdoff/test/rdtlib.asm +48 -0
  250. data/vendor/repo.or.cz/nasm/rdoff/test/rdtmain.asm +47 -0
  251. data/vendor/repo.or.cz/nasm/rdoff/test/testlib.asm +18 -0
  252. data/vendor/repo.or.cz/nasm/stdlib/snprintf.c +29 -0
  253. data/vendor/repo.or.cz/nasm/stdlib/strlcpy.c +51 -0
  254. data/vendor/repo.or.cz/nasm/stdlib/strnlen.c +46 -0
  255. data/vendor/repo.or.cz/nasm/stdlib/vsnprintf.c +51 -0
  256. data/vendor/repo.or.cz/nasm/test/Makefile +106 -0
  257. data/vendor/repo.or.cz/nasm/test/_file_.asm +5 -0
  258. data/vendor/repo.or.cz/nasm/test/_version.asm +2 -0
  259. data/vendor/repo.or.cz/nasm/test/a32offs.asm +9 -0
  260. data/vendor/repo.or.cz/nasm/test/absolute.asm +40 -0
  261. data/vendor/repo.or.cz/nasm/test/addr64x.asm +18 -0
  262. data/vendor/repo.or.cz/nasm/test/align13.asm +19 -0
  263. data/vendor/repo.or.cz/nasm/test/align13s.asm +20 -0
  264. data/vendor/repo.or.cz/nasm/test/alonesym-obj.asm +166 -0
  265. data/vendor/repo.or.cz/nasm/test/andbyte.asm +15 -0
  266. data/vendor/repo.or.cz/nasm/test/aoutso.asm +99 -0
  267. data/vendor/repo.or.cz/nasm/test/aouttest.asm +86 -0
  268. data/vendor/repo.or.cz/nasm/test/aouttest.c +36 -0
  269. data/vendor/repo.or.cz/nasm/test/avx.asm +46 -0
  270. data/vendor/repo.or.cz/nasm/test/avx005.asm +529 -0
  271. data/vendor/repo.or.cz/nasm/test/avx2.asm +1608 -0
  272. data/vendor/repo.or.cz/nasm/test/avx512cd.asm +106 -0
  273. data/vendor/repo.or.cz/nasm/test/avx512er.asm +144 -0
  274. data/vendor/repo.or.cz/nasm/test/avx512f.asm +7000 -0
  275. data/vendor/repo.or.cz/nasm/test/avx512pf.asm +88 -0
  276. data/vendor/repo.or.cz/nasm/test/bcd.asm +23 -0
  277. data/vendor/repo.or.cz/nasm/test/binexe.asm +35 -0
  278. data/vendor/repo.or.cz/nasm/test/bintest.asm +59 -0
  279. data/vendor/repo.or.cz/nasm/test/bisect.sh +22 -0
  280. data/vendor/repo.or.cz/nasm/test/br1879590.asm +25 -0
  281. data/vendor/repo.or.cz/nasm/test/br2003451.asm +17 -0
  282. data/vendor/repo.or.cz/nasm/test/br2030823.asm +7 -0
  283. data/vendor/repo.or.cz/nasm/test/br2148476.asm +221 -0
  284. data/vendor/repo.or.cz/nasm/test/br2222615.asm +19 -0
  285. data/vendor/repo.or.cz/nasm/test/br2496848.asm +42 -0
  286. data/vendor/repo.or.cz/nasm/test/br3005117.asm +26 -0
  287. data/vendor/repo.or.cz/nasm/test/br3026808.asm +20 -0
  288. data/vendor/repo.or.cz/nasm/test/br3028880.asm +8 -0
  289. data/vendor/repo.or.cz/nasm/test/br3041451.asm +59 -0
  290. data/vendor/repo.or.cz/nasm/test/br3058845.asm +14 -0
  291. data/vendor/repo.or.cz/nasm/test/br3066383.asm +70 -0
  292. data/vendor/repo.or.cz/nasm/test/br3074517.asm +12 -0
  293. data/vendor/repo.or.cz/nasm/test/br3092924.asm +25 -0
  294. data/vendor/repo.or.cz/nasm/test/br3104312.asm +11 -0
  295. data/vendor/repo.or.cz/nasm/test/br3109604.asm +9 -0
  296. data/vendor/repo.or.cz/nasm/test/br3174983.asm +9 -0
  297. data/vendor/repo.or.cz/nasm/test/br3187743.asm +7 -0
  298. data/vendor/repo.or.cz/nasm/test/br3189064.asm +7 -0
  299. data/vendor/repo.or.cz/nasm/test/br3200749.asm +9 -0
  300. data/vendor/repo.or.cz/nasm/test/br3385573.asm +11 -0
  301. data/vendor/repo.or.cz/nasm/test/br3392252.asm +43 -0
  302. data/vendor/repo.or.cz/nasm/test/br3392259.asm +8 -0
  303. data/vendor/repo.or.cz/nasm/test/br3392363.asm +4 -0
  304. data/vendor/repo.or.cz/nasm/test/br3392392.asm +16 -0
  305. data/vendor/repo.or.cz/nasm/test/br3392396.asm +5 -0
  306. data/vendor/repo.or.cz/nasm/test/br3392411.asm +22 -0
  307. data/vendor/repo.or.cz/nasm/test/br3392418.asm +3 -0
  308. data/vendor/repo.or.cz/nasm/test/br3392439.asm +25 -0
  309. data/vendor/repo.or.cz/nasm/test/br3392442.asm +6 -0
  310. data/vendor/repo.or.cz/nasm/test/br560575.asm +17 -0
  311. data/vendor/repo.or.cz/nasm/test/br560873.asm +27 -0
  312. data/vendor/repo.or.cz/nasm/test/br890790.asm +7 -0
  313. data/vendor/repo.or.cz/nasm/test/br890790_i.asm +1 -0
  314. data/vendor/repo.or.cz/nasm/test/br978756.asm +7 -0
  315. data/vendor/repo.or.cz/nasm/test/changed.asm +383 -0
  316. data/vendor/repo.or.cz/nasm/test/cofftest.asm +85 -0
  317. data/vendor/repo.or.cz/nasm/test/cofftest.c +35 -0
  318. data/vendor/repo.or.cz/nasm/test/crc32.asm +37 -0
  319. data/vendor/repo.or.cz/nasm/test/cv8struc.asm +14 -0
  320. data/vendor/repo.or.cz/nasm/test/dtbcd.asm +72 -0
  321. data/vendor/repo.or.cz/nasm/test/elf64so.asm +118 -0
  322. data/vendor/repo.or.cz/nasm/test/elfso.asm +100 -0
  323. data/vendor/repo.or.cz/nasm/test/elftest.asm +87 -0
  324. data/vendor/repo.or.cz/nasm/test/elftest.c +38 -0
  325. data/vendor/repo.or.cz/nasm/test/elftest64.c +43 -0
  326. data/vendor/repo.or.cz/nasm/test/elif.asm +39 -0
  327. data/vendor/repo.or.cz/nasm/test/expimp.asm +90 -0
  328. data/vendor/repo.or.cz/nasm/test/far64.asm +10 -0
  329. data/vendor/repo.or.cz/nasm/test/float.asm +186 -0
  330. data/vendor/repo.or.cz/nasm/test/float8.asm +135 -0
  331. data/vendor/repo.or.cz/nasm/test/floatb.asm +35 -0
  332. data/vendor/repo.or.cz/nasm/test/floatexp.asm +382 -0
  333. data/vendor/repo.or.cz/nasm/test/floatize.asm +19 -0
  334. data/vendor/repo.or.cz/nasm/test/floattest.asm +28 -0
  335. data/vendor/repo.or.cz/nasm/test/floatx.asm +525 -0
  336. data/vendor/repo.or.cz/nasm/test/fpu.asm +127 -0
  337. data/vendor/repo.or.cz/nasm/test/fwdopt.asm +133 -0
  338. data/vendor/repo.or.cz/nasm/test/fwdoptpp.asm +150 -0
  339. data/vendor/repo.or.cz/nasm/test/gas2nasm.py +104 -0
  340. data/vendor/repo.or.cz/nasm/test/gather.asm +11 -0
  341. data/vendor/repo.or.cz/nasm/test/gotoff64.asm +25 -0
  342. data/vendor/repo.or.cz/nasm/test/hexfp.asm +25 -0
  343. data/vendor/repo.or.cz/nasm/test/hle.asm +19 -0
  344. data/vendor/repo.or.cz/nasm/test/ifelse.asm +46 -0
  345. data/vendor/repo.or.cz/nasm/test/ifenv.asm +31 -0
  346. data/vendor/repo.or.cz/nasm/test/ifmacro.asm +413 -0
  347. data/vendor/repo.or.cz/nasm/test/iftoken.asm +317 -0
  348. data/vendor/repo.or.cz/nasm/test/iftoken.pl +32 -0
  349. data/vendor/repo.or.cz/nasm/test/ilog2.asm +271 -0
  350. data/vendor/repo.or.cz/nasm/test/imacro.asm +8 -0
  351. data/vendor/repo.or.cz/nasm/test/imm.asm +23 -0
  352. data/vendor/repo.or.cz/nasm/test/imm64.asm +61 -0
  353. data/vendor/repo.or.cz/nasm/test/immwarn.asm +91 -0
  354. data/vendor/repo.or.cz/nasm/test/imul.asm +117 -0
  355. data/vendor/repo.or.cz/nasm/test/inc1.asm +6 -0
  356. data/vendor/repo.or.cz/nasm/test/inc2.asm +8 -0
  357. data/vendor/repo.or.cz/nasm/test/incbin.asm +7 -0
  358. data/vendor/repo.or.cz/nasm/test/incbin.data +2 -0
  359. data/vendor/repo.or.cz/nasm/test/inctest.asm +15 -0
  360. data/vendor/repo.or.cz/nasm/test/insnlbl.asm +12 -0
  361. data/vendor/repo.or.cz/nasm/test/invlpga.asm +11 -0
  362. data/vendor/repo.or.cz/nasm/test/jmp64.asm +19 -0
  363. data/vendor/repo.or.cz/nasm/test/lar_lsl.asm +124 -0
  364. data/vendor/repo.or.cz/nasm/test/larlsl.asm +23 -0
  365. data/vendor/repo.or.cz/nasm/test/lnxhello.asm +54 -0
  366. data/vendor/repo.or.cz/nasm/test/local.asm +19 -0
  367. data/vendor/repo.or.cz/nasm/test/loopoffs.asm +12 -0
  368. data/vendor/repo.or.cz/nasm/test/lwp.asm +213 -0
  369. data/vendor/repo.or.cz/nasm/test/macro-defaults.asm +64 -0
  370. data/vendor/repo.or.cz/nasm/test/macroerr.asm +12 -0
  371. data/vendor/repo.or.cz/nasm/test/macroerr.inc +3 -0
  372. data/vendor/repo.or.cz/nasm/test/mmxsize.asm +38 -0
  373. data/vendor/repo.or.cz/nasm/test/movd.asm +12 -0
  374. data/vendor/repo.or.cz/nasm/test/movd64.asm +15 -0
  375. data/vendor/repo.or.cz/nasm/test/movimm.asm +28 -0
  376. data/vendor/repo.or.cz/nasm/test/movnti.asm +10 -0
  377. data/vendor/repo.or.cz/nasm/test/mpx-64.asm +120 -0
  378. data/vendor/repo.or.cz/nasm/test/mpx.asm +89 -0
  379. data/vendor/repo.or.cz/nasm/test/multisection.asm +96 -0
  380. data/vendor/repo.or.cz/nasm/test/nasmformat.asm +17 -0
  381. data/vendor/repo.or.cz/nasm/test/new +9 -0
  382. data/vendor/repo.or.cz/nasm/test/newrdwr.asm +24 -0
  383. data/vendor/repo.or.cz/nasm/test/nop.asm +17 -0
  384. data/vendor/repo.or.cz/nasm/test/nullfile.asm +4 -0
  385. data/vendor/repo.or.cz/nasm/test/objexe.asm +30 -0
  386. data/vendor/repo.or.cz/nasm/test/objlink.c +33 -0
  387. data/vendor/repo.or.cz/nasm/test/objtest.asm +85 -0
  388. data/vendor/repo.or.cz/nasm/test/optimization.asm +104 -0
  389. data/vendor/repo.or.cz/nasm/test/org.asm +18 -0
  390. data/vendor/repo.or.cz/nasm/test/paste.asm +12 -0
  391. data/vendor/repo.or.cz/nasm/test/pcrel.asm +52 -0
  392. data/vendor/repo.or.cz/nasm/test/perf/label.pl +18 -0
  393. data/vendor/repo.or.cz/nasm/test/perf/macro.pl +18 -0
  394. data/vendor/repo.or.cz/nasm/test/perf/token.pl +23 -0
  395. data/vendor/repo.or.cz/nasm/test/performtest.pl +192 -0
  396. data/vendor/repo.or.cz/nasm/test/pextrw.asm +3 -0
  397. data/vendor/repo.or.cz/nasm/test/pinsr16.asm +53 -0
  398. data/vendor/repo.or.cz/nasm/test/pinsr32.asm +53 -0
  399. data/vendor/repo.or.cz/nasm/test/pinsr64.asm +68 -0
  400. data/vendor/repo.or.cz/nasm/test/popcnt.asm +32 -0
  401. data/vendor/repo.or.cz/nasm/test/ppindirect.asm +42 -0
  402. data/vendor/repo.or.cz/nasm/test/pragma.asm +12 -0
  403. data/vendor/repo.or.cz/nasm/test/prefix66.asm +28 -0
  404. data/vendor/repo.or.cz/nasm/test/ptr.asm +4 -0
  405. data/vendor/repo.or.cz/nasm/test/pushseg.asm +17 -0
  406. data/vendor/repo.or.cz/nasm/test/r13.asm +15 -0
  407. data/vendor/repo.or.cz/nasm/test/radix.asm +54 -0
  408. data/vendor/repo.or.cz/nasm/test/rdpid.asm +21 -0
  409. data/vendor/repo.or.cz/nasm/test/reldef.asm +57 -0
  410. data/vendor/repo.or.cz/nasm/test/relocs.asm +20 -0
  411. data/vendor/repo.or.cz/nasm/test/riprel.asm +5357 -0
  412. data/vendor/repo.or.cz/nasm/test/riprel.pl +29 -0
  413. data/vendor/repo.or.cz/nasm/test/riprel2.asm +11 -0
  414. data/vendor/repo.or.cz/nasm/test/sha-64.asm +30 -0
  415. data/vendor/repo.or.cz/nasm/test/sha.asm +31 -0
  416. data/vendor/repo.or.cz/nasm/test/smartalign16.asm +36 -0
  417. data/vendor/repo.or.cz/nasm/test/smartalign32.asm +36 -0
  418. data/vendor/repo.or.cz/nasm/test/smartalign64.asm +36 -0
  419. data/vendor/repo.or.cz/nasm/test/splitea.asm +11 -0
  420. data/vendor/repo.or.cz/nasm/test/sreg.asm +65 -0
  421. data/vendor/repo.or.cz/nasm/test/strlen.asm +5 -0
  422. data/vendor/repo.or.cz/nasm/test/struc.asm +33 -0
  423. data/vendor/repo.or.cz/nasm/test/test67.asm +38 -0
  424. data/vendor/repo.or.cz/nasm/test/testdos.asm +13 -0
  425. data/vendor/repo.or.cz/nasm/test/testnos3.asm +973 -0
  426. data/vendor/repo.or.cz/nasm/test/time.asm +11 -0
  427. data/vendor/repo.or.cz/nasm/test/times.asm +21 -0
  428. data/vendor/repo.or.cz/nasm/test/timesneg.asm +3 -0
  429. data/vendor/repo.or.cz/nasm/test/tmap.nas +1447 -0
  430. data/vendor/repo.or.cz/nasm/test/uscore.asm +15 -0
  431. data/vendor/repo.or.cz/nasm/test/utf.asm +82 -0
  432. data/vendor/repo.or.cz/nasm/test/vaesenc.asm +22 -0
  433. data/vendor/repo.or.cz/nasm/test/vex.asm +9 -0
  434. data/vendor/repo.or.cz/nasm/test/vgather.asm +76 -0
  435. data/vendor/repo.or.cz/nasm/test/vmread.asm +26 -0
  436. data/vendor/repo.or.cz/nasm/test/weirdpaste.asm +29 -0
  437. data/vendor/repo.or.cz/nasm/test/xchg.asm +96 -0
  438. data/vendor/repo.or.cz/nasm/test/xcrypt.asm +24 -0
  439. data/vendor/repo.or.cz/nasm/test/xmm0.asm +12 -0
  440. data/vendor/repo.or.cz/nasm/test/zerobyte.asm +22 -0
  441. data/vendor/repo.or.cz/nasm/tools/cleanfile +176 -0
  442. data/vendor/repo.or.cz/nasm/tools/cleanpatch +258 -0
  443. data/vendor/repo.or.cz/nasm/tools/mkdep.pl +261 -0
  444. data/vendor/repo.or.cz/nasm/tools/release +105 -0
  445. data/vendor/repo.or.cz/nasm/tools/syncfiles.pl +137 -0
  446. data/vendor/repo.or.cz/nasm/tools/tag-release +58 -0
  447. data/vendor/repo.or.cz/nasm/version +1 -0
  448. data/vendor/repo.or.cz/nasm/version.pl +189 -0
  449. data/vendor/repo.or.cz/nasm/x86/disp8.c +131 -0
  450. data/vendor/repo.or.cz/nasm/x86/insns-iflags.ph +280 -0
  451. data/vendor/repo.or.cz/nasm/x86/insns.dat +5371 -0
  452. data/vendor/repo.or.cz/nasm/x86/insns.pl +1043 -0
  453. data/vendor/repo.or.cz/nasm/x86/regs.dat +138 -0
  454. data/vendor/repo.or.cz/nasm/x86/regs.pl +204 -0
  455. metadata +520 -0
@@ -0,0 +1,156 @@
1
+ /* ----------------------------------------------------------------------- *
2
+ *
3
+ * Copyright 1996-2009 The NASM Authors - All Rights Reserved
4
+ * See the file AUTHORS included with the NASM distribution for
5
+ * the specific copyright holders.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following
9
+ * conditions are met:
10
+ *
11
+ * * Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * * Redistributions in binary form must reproduce the above
14
+ * copyright notice, this list of conditions and the following
15
+ * disclaimer in the documentation and/or other materials provided
16
+ * with the distribution.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ *
32
+ * ----------------------------------------------------------------------- */
33
+
34
+ /*
35
+ * Internal definitions common to outelf32 and outelf64
36
+ */
37
+ #ifndef OUTPUT_OUTELF_H
38
+ #define OUTPUT_OUTELF_H
39
+
40
+ #include "elf.h"
41
+ #include "rbtree.h"
42
+ #include "saa.h"
43
+
44
+ /* symbol binding */
45
+ #define SYM_GLOBAL ELF32_ST_MKBIND(STB_GLOBAL)
46
+ #define SYM_LOCAL ELF32_ST_MKBIND(STB_LOCAL)
47
+
48
+ #define GLOBAL_TEMP_BASE 0x40000000 /* bigger than any sane symbol index */
49
+
50
+ /* alignment of sections in file */
51
+ #define SEC_FILEALIGN 16
52
+
53
+ /* this stuff is needed for the dwarf/stabs debugging format */
54
+ #define TY_DEBUGSYMLIN 0x40 /* internal call to debug_out */
55
+
56
+ /* Known sections with nonstandard defaults */
57
+ struct elf_known_section {
58
+ const char *name; /* Name of section */
59
+ int type; /* Section type (SHT_) */
60
+ uint32_t flags; /* Section flags (SHF_) */
61
+ uint32_t align; /* Section alignment */
62
+ };
63
+ extern const struct elf_known_section elf_known_sections[];
64
+
65
+ /*
66
+ * Special ELF sections (after the real sections but before debugging ones)
67
+ */
68
+ #define sec_shstrtab (nsects + 1)
69
+ #define sec_symtab (nsects + 2)
70
+ #define sec_strtab (nsects + 3)
71
+ #define sec_numspecial 3
72
+
73
+ /*
74
+ * Debugging ELF sections (last in the file)
75
+ */
76
+
77
+ /* stabs */
78
+ #define sec_stab (nsections-3)
79
+ #define sec_stabstr (nsections-2)
80
+ #define sec_rel_stab (nsections-1)
81
+
82
+ /* stabs symbol table format */
83
+ struct stabentry {
84
+ uint32_t n_strx;
85
+ uint8_t n_type;
86
+ uint8_t n_other;
87
+ uint16_t n_desc;
88
+ uint32_t n_value;
89
+ };
90
+
91
+ /* dwarf */
92
+ #define sec_debug_aranges (nsections-10)
93
+ #define sec_rela_debug_aranges (nsections-9)
94
+ #define sec_debug_pubnames (nsections-8)
95
+ #define sec_debug_info (nsections-7)
96
+ #define sec_rela_debug_info (nsections-6)
97
+ #define sec_debug_abbrev (nsections-5)
98
+ #define sec_debug_line (nsections-4)
99
+ #define sec_rela_debug_line (nsections-3)
100
+ #define sec_debug_frame (nsections-2)
101
+ #define sec_debug_loc (nsections-1)
102
+
103
+ extern uint8_t elf_osabi;
104
+ extern uint8_t elf_abiver;
105
+
106
+ void elf_section_attrib(char *name, char *attr, int pass,
107
+ uint32_t *flags_and, uint32_t *flags_or,
108
+ uint64_t *align, int *type);
109
+
110
+ #define WRITE_STAB(p,n_strx,n_type,n_other,n_desc,n_value) \
111
+ do { \
112
+ WRITELONG(p, n_strx); \
113
+ WRITECHAR(p, n_type); \
114
+ WRITECHAR(p, n_other); \
115
+ WRITESHORT(p, n_desc); \
116
+ WRITELONG(p, n_value); \
117
+ } while (0)
118
+
119
+ struct elf_reloc {
120
+ struct elf_reloc *next;
121
+ int64_t address; /* relative to _start_ of section */
122
+ int64_t symbol; /* symbol index */
123
+ int64_t offset; /* symbol addend */
124
+ int type; /* type of relocation */
125
+ };
126
+
127
+ struct elf_symbol {
128
+ struct rbtree symv; /* symbol value and symbol rbtree */
129
+ int32_t strpos; /* string table position of name */
130
+ int32_t section; /* section ID of the symbol */
131
+ int type; /* symbol type */
132
+ int other; /* symbol visibility */
133
+ int32_t size; /* size of symbol */
134
+ int32_t globnum; /* symbol table offset if global */
135
+ struct elf_symbol *nextfwd; /* list of unresolved-size symbols */
136
+ char *name; /* used temporarily if in above list */
137
+ };
138
+
139
+ struct elf_section {
140
+ struct SAA *data;
141
+ uint64_t len;
142
+ uint64_t size;
143
+ uint64_t nrelocs;
144
+ int32_t index;
145
+ int type; /* SHT_PROGBITS or SHT_NOBITS */
146
+ uint64_t align; /* alignment: power of two */
147
+ uint64_t flags; /* section flags */
148
+ char *name;
149
+ struct SAA *rel;
150
+ uint64_t rellen;
151
+ struct elf_reloc *head;
152
+ struct elf_reloc **tail;
153
+ struct rbtree *gsyms; /* global symbols in section */
154
+ };
155
+
156
+ #endif /* OUTPUT_OUTELF_H */
@@ -0,0 +1,41 @@
1
+ ;; --------------------------------------------------------------------------
2
+ ;;
3
+ ;; Copyright 1996-2017 The NASM Authors - All Rights Reserved
4
+ ;; See the file AUTHORS included with the NASM distribution for
5
+ ;; the specific copyright holders.
6
+ ;;
7
+ ;; Redistribution and use in source and binary forms, with or without
8
+ ;; modification, are permitted provided that the following
9
+ ;; conditions are met:
10
+ ;;
11
+ ;; * Redistributions of source code must retain the above copyright
12
+ ;; notice, this list of conditions and the following disclaimer.
13
+ ;; * Redistributions in binary form must reproduce the above
14
+ ;; copyright notice, this list of conditions and the following
15
+ ;; disclaimer in the documentation and/or other materials provided
16
+ ;; with the distribution.
17
+ ;;
18
+ ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19
+ ;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
+ ;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
+ ;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ ;; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ ;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25
+ ;; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
+ ;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
+ ;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ ;; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29
+ ;; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
+ ;; EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ ;;
32
+ ;; --------------------------------------------------------------------------
33
+
34
+ OUT: elf elf32 elf64
35
+ %define __SECT__ [section .text]
36
+ %macro __NASM_CDecl__ 1
37
+ %define $_%1 $%1
38
+ %endmacro
39
+ %imacro osabi 1+.nolist
40
+ [%? %1]
41
+ %endmacro
@@ -0,0 +1,120 @@
1
+ /* ----------------------------------------------------------------------- *
2
+ *
3
+ * Copyright 1996-2011 The NASM Authors - All Rights Reserved
4
+ * See the file AUTHORS included with the NASM distribution for
5
+ * the specific copyright holders.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following
9
+ * conditions are met:
10
+ *
11
+ * * Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * * Redistributions in binary form must reproduce the above
14
+ * copyright notice, this list of conditions and the following
15
+ * disclaimer in the documentation and/or other materials provided
16
+ * with the distribution.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ *
32
+ * ----------------------------------------------------------------------- */
33
+
34
+ /*
35
+ * outform.c manages a list of output formats, and associates
36
+ * them with their relevant drivers. Also has a
37
+ * routine to find the correct driver given a name
38
+ * for it
39
+ */
40
+
41
+ #include "compiler.h"
42
+
43
+ #include <stdio.h>
44
+ #include <string.h>
45
+
46
+ #define BUILD_DRIVERS_ARRAY
47
+ #include "outform.h"
48
+
49
+ const struct ofmt *ofmt_find(const char *name,
50
+ const struct ofmt_alias **ofmt_alias)
51
+ {
52
+ const struct ofmt * const *ofp;
53
+ const struct ofmt *of;
54
+ unsigned int i;
55
+
56
+ *ofmt_alias = NULL;
57
+
58
+ /* primary targets first */
59
+ for (ofp = drivers; (of = *ofp); ofp++) {
60
+ if (!nasm_stricmp(name, of->shortname))
61
+ return of;
62
+ }
63
+
64
+ /* lets walk thru aliases then */
65
+ for (i = 0; i < ARRAY_SIZE(ofmt_aliases); i++) {
66
+ if (ofmt_aliases[i].shortname &&
67
+ !nasm_stricmp(name, ofmt_aliases[i].shortname)) {
68
+ *ofmt_alias = &ofmt_aliases[i];
69
+ return ofmt_aliases[i].ofmt;
70
+ }
71
+ }
72
+
73
+ return NULL;
74
+ }
75
+
76
+ const struct dfmt *dfmt_find(const struct ofmt *ofmt, const char *name)
77
+ {
78
+ const struct dfmt * const *dfp;
79
+ const struct dfmt *df;
80
+
81
+ for (dfp = ofmt->debug_formats; (df = *dfp); dfp++) {
82
+ if (!nasm_stricmp(name, df->shortname))
83
+ return df;
84
+ }
85
+ return NULL;
86
+ }
87
+
88
+ void ofmt_list(const struct ofmt *deffmt, FILE * fp)
89
+ {
90
+ const struct ofmt * const *ofp, *of;
91
+ unsigned int i;
92
+
93
+ /* primary targets first */
94
+ for (ofp = drivers; (of = *ofp); ofp++) {
95
+ fprintf(fp, " %c %-10s%s\n",
96
+ of == deffmt ? '*' : ' ',
97
+ of->shortname, of->fullname);
98
+ }
99
+
100
+ /* lets walk through aliases then */
101
+ for (i = 0; i < ARRAY_SIZE(ofmt_aliases); i++) {
102
+ if (!ofmt_aliases[i].shortname)
103
+ continue;
104
+ fprintf(fp, " %-10s%s\n",
105
+ ofmt_aliases[i].shortname,
106
+ ofmt_aliases[i].fullname);
107
+ }
108
+ }
109
+
110
+ void dfmt_list(const struct ofmt *ofmt, FILE *fp)
111
+ {
112
+ const struct dfmt * const *dfp;
113
+ const struct dfmt *df;
114
+
115
+ for (dfp = ofmt->debug_formats; (df = *dfp); dfp++) {
116
+ fprintf(fp, " %c %-10s%s\n",
117
+ df == dfmt ? '*' : ' ',
118
+ df->shortname, df->fullname);
119
+ }
120
+ }
@@ -0,0 +1,379 @@
1
+ /* ----------------------------------------------------------------------- *
2
+ *
3
+ * Copyright 1996-2011 The NASM Authors - All Rights Reserved
4
+ * See the file AUTHORS included with the NASM distribution for
5
+ * the specific copyright holders.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following
9
+ * conditions are met:
10
+ *
11
+ * * Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * * Redistributions in binary form must reproduce the above
14
+ * copyright notice, this list of conditions and the following
15
+ * disclaimer in the documentation and/or other materials provided
16
+ * with the distribution.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ *
32
+ * ----------------------------------------------------------------------- */
33
+
34
+ /*
35
+ * outform.h header file for binding output format drivers to the
36
+ * remainder of the code in the Netwide Assembler
37
+ */
38
+
39
+ /*
40
+ * This header file allows configuration of which output formats
41
+ * get compiled into the NASM binary. You can configure by defining
42
+ * various preprocessor symbols beginning with "OF_", either on the
43
+ * compiler command line or at the top of this file.
44
+ *
45
+ * OF_ONLY -- only include specified object formats
46
+ * OF_name -- ensure that output format 'name' is included
47
+ * OF_NO_name -- remove output format 'name'
48
+ * OF_DOS -- ensure that 'obj', 'bin', 'win32' & 'win64' are included.
49
+ * OF_UNIX -- ensure that 'aout', 'aoutb', 'coff', 'elf32' & 'elf64' are in.
50
+ * OF_OTHERS -- ensure that 'bin', 'as86', 'rdf' 'macho32' & 'macho64' are in.
51
+ * OF_ALL -- ensure that all formats are included.
52
+ * note that this doesn't include 'dbg', which is
53
+ * only really useful if you're doing development
54
+ * work on NASM. Define OF_DBG if you want this.
55
+ *
56
+ * OF_DEFAULT=of_name -- ensure that 'name' is the default format.
57
+ *
58
+ * eg: -DOF_UNIX -DOF_ELF32 -DOF_DEFAULT=of_elf32 would be a suitable config
59
+ * for an average linux system.
60
+ *
61
+ * Default config = -DOF_ALL -DOF_DEFAULT=of_bin
62
+ *
63
+ * You probably only want to set these options while compiling 'nasm.c'. */
64
+
65
+ #ifndef NASM_OUTFORM_H
66
+ #define NASM_OUTFORM_H
67
+
68
+ #include "nasm.h"
69
+
70
+ /* -------------- USER MODIFIABLE PART ---------------- */
71
+
72
+ /*
73
+ * Insert #defines here in accordance with the configuration
74
+ * instructions above.
75
+ *
76
+ * E.g.
77
+ *
78
+ * #define OF_ONLY
79
+ * #define OF_OBJ
80
+ * #define OF_BIN
81
+ *
82
+ * for a 16-bit DOS assembler with no extraneous formats.
83
+ */
84
+
85
+ /* ------------ END USER MODIFIABLE PART -------------- */
86
+
87
+ /* ====configurable info begins here==== */
88
+ /* formats configurable:
89
+ * bin,obj,elf32,elf64,aout,aoutb,coff,win32,as86,rdf2,macho32,macho64 */
90
+
91
+ /* process options... */
92
+
93
+ #ifndef OF_ONLY
94
+ #ifndef OF_ALL
95
+ #define OF_ALL /* default is to have all formats */
96
+ #endif
97
+ #endif
98
+
99
+ #ifdef OF_ALL /* set all formats on... */
100
+ #ifndef OF_BIN
101
+ #define OF_BIN
102
+ #endif
103
+ #ifndef OF_OBJ
104
+ #define OF_OBJ
105
+ #endif
106
+ #ifndef OF_ELF32
107
+ #define OF_ELF32
108
+ #endif
109
+ #ifndef OF_ELFX32
110
+ #define OF_ELFX32
111
+ #endif
112
+ #ifndef OF_ELF64
113
+ #define OF_ELF64
114
+ #endif
115
+ #ifndef OF_COFF
116
+ #define OF_COFF
117
+ #endif
118
+ #ifndef OF_AOUT
119
+ #define OF_AOUT
120
+ #endif
121
+ #ifndef OF_AOUTB
122
+ #define OF_AOUTB
123
+ #endif
124
+ #ifndef OF_WIN32
125
+ #define OF_WIN32
126
+ #endif
127
+ #ifndef OF_WIN64
128
+ #define OF_WIN64
129
+ #endif
130
+ #ifndef OF_AS86
131
+ #define OF_AS86
132
+ #endif
133
+ #ifndef OF_RDF2
134
+ #define OF_RDF2
135
+ #endif
136
+ #ifndef OF_IEEE
137
+ #define OF_IEEE
138
+ #endif
139
+ #ifndef OF_MACHO32
140
+ #define OF_MACHO32
141
+ #endif
142
+ #ifndef OF_MACHO64
143
+ #define OF_MACHO64
144
+ #endif
145
+ #ifndef OF_DBG
146
+ #define OF_DBG
147
+ #endif
148
+ #endif /* OF_ALL */
149
+
150
+ /* turn on groups of formats specified.... */
151
+ #ifdef OF_DOS
152
+ #ifndef OF_OBJ
153
+ #define OF_OBJ
154
+ #endif
155
+ #ifndef OF_BIN
156
+ #define OF_BIN
157
+ #endif
158
+ #ifndef OF_COFF
159
+ #define OF_COFF /* COFF is used by DJGPP */
160
+ #endif
161
+ #ifndef OF_WIN32
162
+ #define OF_WIN32
163
+ #endif
164
+ #ifndef OF_WIN64
165
+ #define OF_WIN64
166
+ #endif
167
+ #endif
168
+
169
+ #ifdef OF_UNIX
170
+ #ifndef OF_AOUT
171
+ #define OF_AOUT
172
+ #endif
173
+ #ifndef OF_AOUTB
174
+ #define OF_AOUTB
175
+ #endif
176
+ #ifndef OF_COFF
177
+ #define OF_COFF
178
+ #endif
179
+ #ifndef OF_ELF32
180
+ #define OF_ELF32
181
+ #endif
182
+ #ifndef OF_ELF64
183
+ #define OF_ELF64
184
+ #endif
185
+ #ifndef OF_ELFX32
186
+ #define OF_ELFX32
187
+ #endif
188
+ #endif
189
+
190
+ #ifdef OF_OTHERS
191
+ #ifndef OF_BIN
192
+ #define OF_BIN
193
+ #endif
194
+ #ifndef OF_AS86
195
+ #define OF_AS86
196
+ #endif
197
+ #ifndef OF_RDF2
198
+ #define OF_RDF2
199
+ #endif
200
+ #ifndef OF_IEEE
201
+ #define OF_IEEE
202
+ #endif
203
+ #ifndef OF_MACHO32
204
+ #define OF_MACHO32
205
+ #endif
206
+ #ifndef OF_MACHO64
207
+ #define OF_MACHO64
208
+ #endif
209
+ #endif
210
+
211
+ /* finally... override any format specifically specified to be off */
212
+ #ifdef OF_NO_BIN
213
+ #undef OF_BIN
214
+ #endif
215
+ #ifdef OF_NO_OBJ
216
+ #undef OF_OBJ
217
+ #endif
218
+ #ifdef OF_NO_ELF32
219
+ #undef OF_ELF32
220
+ #endif
221
+ #ifdef OF_NO_ELF64
222
+ #undef OF_ELF64
223
+ #endif
224
+ #ifdef OF_NO_ELFX32
225
+ #undef OF_ELFX32
226
+ #endif
227
+ #ifdef OF_NO_AOUT
228
+ #undef OF_AOUT
229
+ #endif
230
+ #ifdef OF_NO_AOUTB
231
+ #undef OF_AOUTB
232
+ #endif
233
+ #ifdef OF_NO_COFF
234
+ #undef OF_COFF
235
+ #endif
236
+ #ifdef OF_NO_WIN32
237
+ #undef OF_WIN32
238
+ #endif
239
+ #ifdef OF_NO_WIN64
240
+ #undef OF_WIN64
241
+ #endif
242
+ #ifdef OF_NO_AS86
243
+ #undef OF_AS86
244
+ #endif
245
+ #ifdef OF_NO_RDF2
246
+ #undef OF_RDF2
247
+ #endif
248
+ #ifdef OF_NO_IEEE
249
+ #undef OF_IEEE
250
+ #endif
251
+ #ifdef OF_NO_MACHO32
252
+ #undef OF_MACHO32
253
+ #endif
254
+ #ifdef OF_NO_MACHO64
255
+ #undef OF_MACHO64
256
+ #endif
257
+ #ifdef OF_NO_DBG
258
+ #undef OF_DBG
259
+ #endif
260
+
261
+ #ifndef OF_DEFAULT
262
+ #define OF_DEFAULT of_bin
263
+ #endif
264
+
265
+ extern const struct ofmt of_bin;
266
+ extern const struct ofmt of_ith;
267
+ extern const struct ofmt of_srec;
268
+ extern const struct ofmt of_aout;
269
+ extern const struct ofmt of_aoutb;
270
+ extern const struct ofmt of_coff;
271
+ extern const struct ofmt of_elf32;
272
+ extern const struct ofmt of_elfx32;
273
+ extern const struct ofmt of_elf64;
274
+ extern const struct ofmt of_as86;
275
+ extern const struct ofmt of_obj;
276
+ extern const struct ofmt of_win32;
277
+ extern const struct ofmt of_win64;
278
+ extern const struct ofmt of_rdf2;
279
+ extern const struct ofmt of_ieee;
280
+ extern const struct ofmt of_macho32;
281
+ extern const struct ofmt of_macho64;
282
+ extern const struct ofmt of_dbg;
283
+
284
+ #ifdef BUILD_DRIVERS_ARRAY /* only if included from outform.c */
285
+
286
+ /*
287
+ * pull in the externs for the different formats, then make the
288
+ * drivers array based on the above defines
289
+ */
290
+
291
+ static const struct ofmt * const drivers[] = {
292
+ #ifdef OF_BIN
293
+ &of_bin,
294
+ &of_ith,
295
+ &of_srec,
296
+ #endif
297
+ #ifdef OF_AOUT
298
+ &of_aout,
299
+ #endif
300
+ #ifdef OF_AOUTB
301
+ &of_aoutb,
302
+ #endif
303
+ #ifdef OF_COFF
304
+ &of_coff,
305
+ #endif
306
+ #ifdef OF_ELF32
307
+ &of_elf32,
308
+ #endif
309
+ #ifdef OF_ELF64
310
+ &of_elf64,
311
+ #endif
312
+ #ifdef OF_ELFX32
313
+ &of_elfx32,
314
+ #endif
315
+ #ifdef OF_AS86
316
+ &of_as86,
317
+ #endif
318
+ #ifdef OF_OBJ
319
+ &of_obj,
320
+ #endif
321
+ #ifdef OF_WIN32
322
+ &of_win32,
323
+ #endif
324
+ #ifdef OF_WIN64
325
+ &of_win64,
326
+ #endif
327
+ #ifdef OF_RDF2
328
+ &of_rdf2,
329
+ #endif
330
+ #ifdef OF_IEEE
331
+ &of_ieee,
332
+ #endif
333
+ #ifdef OF_MACHO32
334
+ &of_macho32,
335
+ #endif
336
+ #ifdef OF_MACHO64
337
+ &of_macho64,
338
+ #endif
339
+ #ifdef OF_DBG
340
+ &of_dbg,
341
+ #endif
342
+
343
+ NULL
344
+ };
345
+
346
+ static const struct ofmt_alias ofmt_aliases[] = {
347
+ #ifdef OF_ELF32
348
+ {
349
+ "elf",
350
+ "ELF (short name for ELF32)",
351
+ &of_elf32,
352
+ },
353
+ #endif
354
+ #ifdef OF_MACHO32
355
+ {
356
+ "macho",
357
+ "MACHO (short name for MACHO32)",
358
+ &of_macho32,
359
+ },
360
+ #endif
361
+ #ifdef OF_WIN32
362
+ {
363
+ "win",
364
+ "WIN (short name for WIN32)",
365
+ &of_win32,
366
+ },
367
+ #endif
368
+ { NULL, NULL, NULL }
369
+ };
370
+
371
+ #endif /* BUILD_DRIVERS_ARRAY */
372
+
373
+ const struct ofmt *ofmt_find(const char *name, const struct ofmt_alias **ofmt_alias);
374
+ const struct dfmt *dfmt_find(const struct ofmt *, const char *);
375
+ void ofmt_list(const struct ofmt *, FILE *);
376
+ void dfmt_list(const struct ofmt *ofmt, FILE * fp);
377
+ extern const struct dfmt null_debug_form;
378
+
379
+ #endif /* NASM_OUTFORM_H */