您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

902 行
37KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the BFD library.
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3 or
  7. any later version published by the Free Software Foundation; with the
  8. Invariant Sections being "GNU General Public License" and "Funding
  9. Free Software", the Front-Cover texts being (a) (see below), and with
  10. the Back-Cover Texts being (b) (see below). A copy of the license is
  11. included in the section entitled "GNU Free Documentation License".
  12. (a) The FSF's Front-Cover Text is:
  13. A GNU Manual
  14. (b) The FSF's Back-Cover Text is:
  15. You have freedom to copy and modify this GNU Manual, like GNU
  16. software. Copies published by the Free Software Foundation raise
  17. funds for GNU development. -->
  18. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  21. <title>Architectures (Untitled Document)</title>
  22. <meta name="description" content="Architectures (Untitled Document)">
  23. <meta name="keywords" content="Architectures (Untitled Document)">
  24. <meta name="resource-type" content="document">
  25. <meta name="distribution" content="global">
  26. <meta name="Generator" content="makeinfo">
  27. <link href="index.html#Top" rel="start" title="Top">
  28. <link href="BFD-Index.html#BFD-Index" rel="index" title="BFD Index">
  29. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  30. <link href="BFD-front-end.html#BFD-front-end" rel="up" title="BFD front end">
  31. <link href="Opening-and-Closing.html#Opening-and-Closing" rel="next" title="Opening and Closing">
  32. <link href="bfd_005ftarget.html#bfd_005ftarget" rel="prev" title="bfd_target">
  33. <style type="text/css">
  34. <!--
  35. a.summary-letter {text-decoration: none}
  36. blockquote.indentedblock {margin-right: 0em}
  37. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  38. blockquote.smallquotation {font-size: smaller}
  39. div.display {margin-left: 3.2em}
  40. div.example {margin-left: 3.2em}
  41. div.lisp {margin-left: 3.2em}
  42. div.smalldisplay {margin-left: 3.2em}
  43. div.smallexample {margin-left: 3.2em}
  44. div.smalllisp {margin-left: 3.2em}
  45. kbd {font-style: oblique}
  46. pre.display {font-family: inherit}
  47. pre.format {font-family: inherit}
  48. pre.menu-comment {font-family: serif}
  49. pre.menu-preformatted {font-family: serif}
  50. pre.smalldisplay {font-family: inherit; font-size: smaller}
  51. pre.smallexample {font-size: smaller}
  52. pre.smallformat {font-family: inherit; font-size: smaller}
  53. pre.smalllisp {font-size: smaller}
  54. span.nolinebreak {white-space: nowrap}
  55. span.roman {font-family: initial; font-weight: normal}
  56. span.sansserif {font-family: sans-serif; font-weight: normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en">
  62. <a name="Architectures"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Opening-and-Closing.html#Opening-and-Closing" accesskey="n" rel="next">Opening and Closing</a>, Previous: <a href="Targets.html#Targets" accesskey="p" rel="prev">Targets</a>, Up: <a href="BFD-front-end.html#BFD-front-end" accesskey="u" rel="up">BFD front end</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="BFD-Index.html#BFD-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="Architectures-1"></a>
  69. <h3 class="section">2.13 Architectures</h3>
  70. <p>BFD keeps one atom in a BFD describing the
  71. architecture of the data attached to the BFD: a pointer to a
  72. <code>bfd_arch_info_type</code>.
  73. </p>
  74. <p>Pointers to structures can be requested independently of a BFD
  75. so that an architecture&rsquo;s information can be interrogated
  76. without access to an open BFD.
  77. </p>
  78. <p>The architecture information is provided by each architecture package.
  79. The set of default architectures is selected by the macro
  80. <code>SELECT_ARCHITECTURES</code>. This is normally set up in the
  81. <samp>config/<var>target</var>.mt</samp> file of your choice. If the name is not
  82. defined, then all the architectures supported are included.
  83. </p>
  84. <p>When BFD starts up, all the architectures are called with an
  85. initialize method. It is up to the architecture back end to
  86. insert as many items into the list of architectures as it wants to;
  87. generally this would be one for each machine and one for the
  88. default case (an item with a machine field of 0).
  89. </p>
  90. <p>BFD&rsquo;s idea of an architecture is implemented in <samp>archures.c</samp>.
  91. </p>
  92. <a name="bfd_005farchitecture"></a>
  93. <h4 class="subsection">2.13.1 bfd_architecture</h4>
  94. <p><strong>Description</strong><br>
  95. This enum gives the object file&rsquo;s CPU architecture, in a
  96. global sense&mdash;i.e., what processor family does it belong to?
  97. Another field indicates which processor within
  98. the family is in use. The machine gives a number which
  99. distinguishes different versions of the architecture,
  100. containing, for example, 68020 for Motorola 68020.
  101. </p><div class="example">
  102. <pre class="example">enum bfd_architecture
  103. {
  104. bfd_arch_unknown, /* File arch not known. */
  105. bfd_arch_obscure, /* Arch known, not one of these. */
  106. bfd_arch_m68k, /* Motorola 68xxx. */
  107. #define bfd_mach_m68000 1
  108. #define bfd_mach_m68008 2
  109. #define bfd_mach_m68010 3
  110. #define bfd_mach_m68020 4
  111. #define bfd_mach_m68030 5
  112. #define bfd_mach_m68040 6
  113. #define bfd_mach_m68060 7
  114. #define bfd_mach_cpu32 8
  115. #define bfd_mach_fido 9
  116. #define bfd_mach_mcf_isa_a_nodiv 10
  117. #define bfd_mach_mcf_isa_a 11
  118. #define bfd_mach_mcf_isa_a_mac 12
  119. #define bfd_mach_mcf_isa_a_emac 13
  120. #define bfd_mach_mcf_isa_aplus 14
  121. #define bfd_mach_mcf_isa_aplus_mac 15
  122. #define bfd_mach_mcf_isa_aplus_emac 16
  123. #define bfd_mach_mcf_isa_b_nousp 17
  124. #define bfd_mach_mcf_isa_b_nousp_mac 18
  125. #define bfd_mach_mcf_isa_b_nousp_emac 19
  126. #define bfd_mach_mcf_isa_b 20
  127. #define bfd_mach_mcf_isa_b_mac 21
  128. #define bfd_mach_mcf_isa_b_emac 22
  129. #define bfd_mach_mcf_isa_b_float 23
  130. #define bfd_mach_mcf_isa_b_float_mac 24
  131. #define bfd_mach_mcf_isa_b_float_emac 25
  132. #define bfd_mach_mcf_isa_c 26
  133. #define bfd_mach_mcf_isa_c_mac 27
  134. #define bfd_mach_mcf_isa_c_emac 28
  135. #define bfd_mach_mcf_isa_c_nodiv 29
  136. #define bfd_mach_mcf_isa_c_nodiv_mac 30
  137. #define bfd_mach_mcf_isa_c_nodiv_emac 31
  138. bfd_arch_vax, /* DEC Vax. */
  139. bfd_arch_or1k, /* OpenRISC 1000. */
  140. #define bfd_mach_or1k 1
  141. #define bfd_mach_or1knd 2
  142. bfd_arch_sparc, /* SPARC. */
  143. #define bfd_mach_sparc 1
  144. /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
  145. #define bfd_mach_sparc_sparclet 2
  146. #define bfd_mach_sparc_sparclite 3
  147. #define bfd_mach_sparc_v8plus 4
  148. #define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
  149. #define bfd_mach_sparc_sparclite_le 6
  150. #define bfd_mach_sparc_v9 7
  151. #define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
  152. #define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
  153. #define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
  154. #define bfd_mach_sparc_v8plusc 11 /* with UA2005 and T1 add'ns. */
  155. #define bfd_mach_sparc_v9c 12 /* with UA2005 and T1 add'ns. */
  156. #define bfd_mach_sparc_v8plusd 13 /* with UA2007 and T3 add'ns. */
  157. #define bfd_mach_sparc_v9d 14 /* with UA2007 and T3 add'ns. */
  158. #define bfd_mach_sparc_v8pluse 15 /* with OSA2001 and T4 add'ns (no IMA). */
  159. #define bfd_mach_sparc_v9e 16 /* with OSA2001 and T4 add'ns (no IMA). */
  160. #define bfd_mach_sparc_v8plusv 17 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
  161. #define bfd_mach_sparc_v9v 18 /* with OSA2011 and T4 and IMA and FJMAU add'ns. */
  162. #define bfd_mach_sparc_v8plusm 19 /* with OSA2015 and M7 add'ns. */
  163. #define bfd_mach_sparc_v9m 20 /* with OSA2015 and M7 add'ns. */
  164. #define bfd_mach_sparc_v8plusm8 21 /* with OSA2017 and M8 add'ns. */
  165. #define bfd_mach_sparc_v9m8 22 /* with OSA2017 and M8 add'ns. */
  166. /* Nonzero if MACH has the v9 instruction set. */
  167. #define bfd_mach_sparc_v9_p(mach) \
  168. ((mach) &gt;= bfd_mach_sparc_v8plus &amp;&amp; (mach) &lt;= bfd_mach_sparc_v9m8 \
  169. &amp;&amp; (mach) != bfd_mach_sparc_sparclite_le)
  170. /* Nonzero if MACH is a 64 bit sparc architecture. */
  171. #define bfd_mach_sparc_64bit_p(mach) \
  172. ((mach) &gt;= bfd_mach_sparc_v9 \
  173. &amp;&amp; (mach) != bfd_mach_sparc_v8plusb \
  174. &amp;&amp; (mach) != bfd_mach_sparc_v8plusc \
  175. &amp;&amp; (mach) != bfd_mach_sparc_v8plusd \
  176. &amp;&amp; (mach) != bfd_mach_sparc_v8pluse \
  177. &amp;&amp; (mach) != bfd_mach_sparc_v8plusv \
  178. &amp;&amp; (mach) != bfd_mach_sparc_v8plusm \
  179. &amp;&amp; (mach) != bfd_mach_sparc_v8plusm8)
  180. bfd_arch_spu, /* PowerPC SPU. */
  181. #define bfd_mach_spu 256
  182. bfd_arch_mips, /* MIPS Rxxxx. */
  183. #define bfd_mach_mips3000 3000
  184. #define bfd_mach_mips3900 3900
  185. #define bfd_mach_mips4000 4000
  186. #define bfd_mach_mips4010 4010
  187. #define bfd_mach_mips4100 4100
  188. #define bfd_mach_mips4111 4111
  189. #define bfd_mach_mips4120 4120
  190. #define bfd_mach_mips4300 4300
  191. #define bfd_mach_mips4400 4400
  192. #define bfd_mach_mips4600 4600
  193. #define bfd_mach_mips4650 4650
  194. #define bfd_mach_mips5000 5000
  195. #define bfd_mach_mips5400 5400
  196. #define bfd_mach_mips5500 5500
  197. #define bfd_mach_mips5900 5900
  198. #define bfd_mach_mips6000 6000
  199. #define bfd_mach_mips7000 7000
  200. #define bfd_mach_mips8000 8000
  201. #define bfd_mach_mips9000 9000
  202. #define bfd_mach_mips10000 10000
  203. #define bfd_mach_mips12000 12000
  204. #define bfd_mach_mips14000 14000
  205. #define bfd_mach_mips16000 16000
  206. #define bfd_mach_mips16 16
  207. #define bfd_mach_mips5 5
  208. #define bfd_mach_mips_loongson_2e 3001
  209. #define bfd_mach_mips_loongson_2f 3002
  210. #define bfd_mach_mips_gs464 3003
  211. #define bfd_mach_mips_gs464e 3004
  212. #define bfd_mach_mips_gs264e 3005
  213. #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01. */
  214. #define bfd_mach_mips_octeon 6501
  215. #define bfd_mach_mips_octeonp 6601
  216. #define bfd_mach_mips_octeon2 6502
  217. #define bfd_mach_mips_octeon3 6503
  218. #define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
  219. #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
  220. #define bfd_mach_mipsisa32 32
  221. #define bfd_mach_mipsisa32r2 33
  222. #define bfd_mach_mipsisa32r3 34
  223. #define bfd_mach_mipsisa32r5 36
  224. #define bfd_mach_mipsisa32r6 37
  225. #define bfd_mach_mipsisa64 64
  226. #define bfd_mach_mipsisa64r2 65
  227. #define bfd_mach_mipsisa64r3 66
  228. #define bfd_mach_mipsisa64r5 68
  229. #define bfd_mach_mipsisa64r6 69
  230. #define bfd_mach_mips_micromips 96
  231. bfd_arch_i386, /* Intel 386. */
  232. #define bfd_mach_i386_intel_syntax (1 &lt;&lt; 0)
  233. #define bfd_mach_i386_i8086 (1 &lt;&lt; 1)
  234. #define bfd_mach_i386_i386 (1 &lt;&lt; 2)
  235. #define bfd_mach_x86_64 (1 &lt;&lt; 3)
  236. #define bfd_mach_x64_32 (1 &lt;&lt; 4)
  237. #define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
  238. #define bfd_mach_x86_64_intel_syntax (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
  239. #define bfd_mach_x64_32_intel_syntax (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
  240. bfd_arch_l1om, /* Intel L1OM. */
  241. #define bfd_mach_l1om (1 &lt;&lt; 5)
  242. #define bfd_mach_l1om_intel_syntax (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
  243. bfd_arch_k1om, /* Intel K1OM. */
  244. #define bfd_mach_k1om (1 &lt;&lt; 6)
  245. #define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
  246. bfd_arch_iamcu, /* Intel MCU. */
  247. #define bfd_mach_iamcu (1 &lt;&lt; 8)
  248. #define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
  249. #define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
  250. bfd_arch_romp, /* IBM ROMP PC/RT. */
  251. bfd_arch_convex, /* Convex. */
  252. bfd_arch_m98k, /* Motorola 98xxx. */
  253. bfd_arch_pyramid, /* Pyramid Technology. */
  254. bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300). */
  255. #define bfd_mach_h8300 1
  256. #define bfd_mach_h8300h 2
  257. #define bfd_mach_h8300s 3
  258. #define bfd_mach_h8300hn 4
  259. #define bfd_mach_h8300sn 5
  260. #define bfd_mach_h8300sx 6
  261. #define bfd_mach_h8300sxn 7
  262. bfd_arch_pdp11, /* DEC PDP-11. */
  263. bfd_arch_powerpc, /* PowerPC. */
  264. #define bfd_mach_ppc 32
  265. #define bfd_mach_ppc64 64
  266. #define bfd_mach_ppc_403 403
  267. #define bfd_mach_ppc_403gc 4030
  268. #define bfd_mach_ppc_405 405
  269. #define bfd_mach_ppc_505 505
  270. #define bfd_mach_ppc_601 601
  271. #define bfd_mach_ppc_602 602
  272. #define bfd_mach_ppc_603 603
  273. #define bfd_mach_ppc_ec603e 6031
  274. #define bfd_mach_ppc_604 604
  275. #define bfd_mach_ppc_620 620
  276. #define bfd_mach_ppc_630 630
  277. #define bfd_mach_ppc_750 750
  278. #define bfd_mach_ppc_860 860
  279. #define bfd_mach_ppc_a35 35
  280. #define bfd_mach_ppc_rs64ii 642
  281. #define bfd_mach_ppc_rs64iii 643
  282. #define bfd_mach_ppc_7400 7400
  283. #define bfd_mach_ppc_e500 500
  284. #define bfd_mach_ppc_e500mc 5001
  285. #define bfd_mach_ppc_e500mc64 5005
  286. #define bfd_mach_ppc_e5500 5006
  287. #define bfd_mach_ppc_e6500 5007
  288. #define bfd_mach_ppc_titan 83
  289. #define bfd_mach_ppc_vle 84
  290. bfd_arch_rs6000, /* IBM RS/6000. */
  291. #define bfd_mach_rs6k 6000
  292. #define bfd_mach_rs6k_rs1 6001
  293. #define bfd_mach_rs6k_rsc 6003
  294. #define bfd_mach_rs6k_rs2 6002
  295. bfd_arch_hppa, /* HP PA RISC. */
  296. #define bfd_mach_hppa10 10
  297. #define bfd_mach_hppa11 11
  298. #define bfd_mach_hppa20 20
  299. #define bfd_mach_hppa20w 25
  300. bfd_arch_d10v, /* Mitsubishi D10V. */
  301. #define bfd_mach_d10v 1
  302. #define bfd_mach_d10v_ts2 2
  303. #define bfd_mach_d10v_ts3 3
  304. bfd_arch_d30v, /* Mitsubishi D30V. */
  305. bfd_arch_dlx, /* DLX. */
  306. bfd_arch_m68hc11, /* Motorola 68HC11. */
  307. bfd_arch_m68hc12, /* Motorola 68HC12. */
  308. #define bfd_mach_m6812_default 0
  309. #define bfd_mach_m6812 1
  310. #define bfd_mach_m6812s 2
  311. bfd_arch_m9s12x, /* Freescale S12X. */
  312. bfd_arch_m9s12xg, /* Freescale XGATE. */
  313. bfd_arch_s12z, /* Freescale S12Z. */
  314. #define bfd_mach_s12z_default 0
  315. bfd_arch_z8k, /* Zilog Z8000. */
  316. #define bfd_mach_z8001 1
  317. #define bfd_mach_z8002 2
  318. bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH). */
  319. #define bfd_mach_sh 1
  320. #define bfd_mach_sh2 0x20
  321. #define bfd_mach_sh_dsp 0x2d
  322. #define bfd_mach_sh2a 0x2a
  323. #define bfd_mach_sh2a_nofpu 0x2b
  324. #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
  325. #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
  326. #define bfd_mach_sh2a_or_sh4 0x2a3
  327. #define bfd_mach_sh2a_or_sh3e 0x2a4
  328. #define bfd_mach_sh2e 0x2e
  329. #define bfd_mach_sh3 0x30
  330. #define bfd_mach_sh3_nommu 0x31
  331. #define bfd_mach_sh3_dsp 0x3d
  332. #define bfd_mach_sh3e 0x3e
  333. #define bfd_mach_sh4 0x40
  334. #define bfd_mach_sh4_nofpu 0x41
  335. #define bfd_mach_sh4_nommu_nofpu 0x42
  336. #define bfd_mach_sh4a 0x4a
  337. #define bfd_mach_sh4a_nofpu 0x4b
  338. #define bfd_mach_sh4al_dsp 0x4d
  339. bfd_arch_alpha, /* Dec Alpha. */
  340. #define bfd_mach_alpha_ev4 0x10
  341. #define bfd_mach_alpha_ev5 0x20
  342. #define bfd_mach_alpha_ev6 0x30
  343. bfd_arch_arm, /* Advanced Risc Machines ARM. */
  344. #define bfd_mach_arm_unknown 0
  345. #define bfd_mach_arm_2 1
  346. #define bfd_mach_arm_2a 2
  347. #define bfd_mach_arm_3 3
  348. #define bfd_mach_arm_3M 4
  349. #define bfd_mach_arm_4 5
  350. #define bfd_mach_arm_4T 6
  351. #define bfd_mach_arm_5 7
  352. #define bfd_mach_arm_5T 8
  353. #define bfd_mach_arm_5TE 9
  354. #define bfd_mach_arm_XScale 10
  355. #define bfd_mach_arm_ep9312 11
  356. #define bfd_mach_arm_iWMMXt 12
  357. #define bfd_mach_arm_iWMMXt2 13
  358. #define bfd_mach_arm_5TEJ 14
  359. #define bfd_mach_arm_6 15
  360. #define bfd_mach_arm_6KZ 16
  361. #define bfd_mach_arm_6T2 17
  362. #define bfd_mach_arm_6K 18
  363. #define bfd_mach_arm_7 19
  364. #define bfd_mach_arm_6M 20
  365. #define bfd_mach_arm_6SM 21
  366. #define bfd_mach_arm_7EM 22
  367. #define bfd_mach_arm_8 23
  368. #define bfd_mach_arm_8R 24
  369. #define bfd_mach_arm_8M_BASE 25
  370. #define bfd_mach_arm_8M_MAIN 26
  371. #define bfd_mach_arm_8_1M_MAIN 27
  372. bfd_arch_nds32, /* Andes NDS32. */
  373. #define bfd_mach_n1 1
  374. #define bfd_mach_n1h 2
  375. #define bfd_mach_n1h_v2 3
  376. #define bfd_mach_n1h_v3 4
  377. #define bfd_mach_n1h_v3m 5
  378. bfd_arch_ns32k, /* National Semiconductors ns32000. */
  379. bfd_arch_tic30, /* Texas Instruments TMS320C30. */
  380. bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X. */
  381. #define bfd_mach_tic3x 30
  382. #define bfd_mach_tic4x 40
  383. bfd_arch_tic54x, /* Texas Instruments TMS320C54X. */
  384. bfd_arch_tic6x, /* Texas Instruments TMS320C6X. */
  385. bfd_arch_v850, /* NEC V850. */
  386. bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI). */
  387. #define bfd_mach_v850 1
  388. #define bfd_mach_v850e 'E'
  389. #define bfd_mach_v850e1 '1'
  390. #define bfd_mach_v850e2 0x4532
  391. #define bfd_mach_v850e2v3 0x45325633
  392. #define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5'). */
  393. bfd_arch_arc, /* ARC Cores. */
  394. #define bfd_mach_arc_a4 0
  395. #define bfd_mach_arc_a5 1
  396. #define bfd_mach_arc_arc600 2
  397. #define bfd_mach_arc_arc601 4
  398. #define bfd_mach_arc_arc700 3
  399. #define bfd_mach_arc_arcv2 5
  400. bfd_arch_m32c, /* Renesas M16C/M32C. */
  401. #define bfd_mach_m16c 0x75
  402. #define bfd_mach_m32c 0x78
  403. bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D). */
  404. #define bfd_mach_m32r 1 /* For backwards compatibility. */
  405. #define bfd_mach_m32rx 'x'
  406. #define bfd_mach_m32r2 '2'
  407. bfd_arch_mn10200, /* Matsushita MN10200. */
  408. bfd_arch_mn10300, /* Matsushita MN10300. */
  409. #define bfd_mach_mn10300 300
  410. #define bfd_mach_am33 330
  411. #define bfd_mach_am33_2 332
  412. bfd_arch_fr30,
  413. #define bfd_mach_fr30 0x46523330
  414. bfd_arch_frv,
  415. #define bfd_mach_frv 1
  416. #define bfd_mach_frvsimple 2
  417. #define bfd_mach_fr300 300
  418. #define bfd_mach_fr400 400
  419. #define bfd_mach_fr450 450
  420. #define bfd_mach_frvtomcat 499 /* fr500 prototype. */
  421. #define bfd_mach_fr500 500
  422. #define bfd_mach_fr550 550
  423. bfd_arch_moxie, /* The moxie processor. */
  424. #define bfd_mach_moxie 1
  425. bfd_arch_ft32, /* The ft32 processor. */
  426. #define bfd_mach_ft32 1
  427. #define bfd_mach_ft32b 2
  428. bfd_arch_mcore,
  429. bfd_arch_mep,
  430. #define bfd_mach_mep 1
  431. #define bfd_mach_mep_h1 0x6831
  432. #define bfd_mach_mep_c5 0x6335
  433. bfd_arch_metag,
  434. #define bfd_mach_metag 1
  435. bfd_arch_ia64, /* HP/Intel ia64. */
  436. #define bfd_mach_ia64_elf64 64
  437. #define bfd_mach_ia64_elf32 32
  438. bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
  439. #define bfd_mach_ip2022 1
  440. #define bfd_mach_ip2022ext 2
  441. bfd_arch_iq2000, /* Vitesse IQ2000. */
  442. #define bfd_mach_iq2000 1
  443. #define bfd_mach_iq10 2
  444. bfd_arch_bpf, /* Linux eBPF. */
  445. #define bfd_mach_bpf 1
  446. #define bfd_mach_xbpf 2
  447. bfd_arch_epiphany, /* Adapteva EPIPHANY. */
  448. #define bfd_mach_epiphany16 1
  449. #define bfd_mach_epiphany32 2
  450. bfd_arch_mt,
  451. #define bfd_mach_ms1 1
  452. #define bfd_mach_mrisc2 2
  453. #define bfd_mach_ms2 3
  454. bfd_arch_pj,
  455. bfd_arch_avr, /* Atmel AVR microcontrollers. */
  456. #define bfd_mach_avr1 1
  457. #define bfd_mach_avr2 2
  458. #define bfd_mach_avr25 25
  459. #define bfd_mach_avr3 3
  460. #define bfd_mach_avr31 31
  461. #define bfd_mach_avr35 35
  462. #define bfd_mach_avr4 4
  463. #define bfd_mach_avr5 5
  464. #define bfd_mach_avr51 51
  465. #define bfd_mach_avr6 6
  466. #define bfd_mach_avrtiny 100
  467. #define bfd_mach_avrxmega1 101
  468. #define bfd_mach_avrxmega2 102
  469. #define bfd_mach_avrxmega3 103
  470. #define bfd_mach_avrxmega4 104
  471. #define bfd_mach_avrxmega5 105
  472. #define bfd_mach_avrxmega6 106
  473. #define bfd_mach_avrxmega7 107
  474. bfd_arch_bfin, /* ADI Blackfin. */
  475. #define bfd_mach_bfin 1
  476. bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
  477. #define bfd_mach_cr16 1
  478. bfd_arch_crx, /* National Semiconductor CRX. */
  479. #define bfd_mach_crx 1
  480. bfd_arch_cris, /* Axis CRIS. */
  481. #define bfd_mach_cris_v0_v10 255
  482. #define bfd_mach_cris_v32 32
  483. #define bfd_mach_cris_v10_v32 1032
  484. bfd_arch_riscv,
  485. #define bfd_mach_riscv32 132
  486. #define bfd_mach_riscv64 164
  487. bfd_arch_rl78,
  488. #define bfd_mach_rl78 0x75
  489. bfd_arch_rx, /* Renesas RX. */
  490. #define bfd_mach_rx 0x75
  491. #define bfd_mach_rx_v2 0x76
  492. #define bfd_mach_rx_v3 0x77
  493. bfd_arch_s390, /* IBM s390. */
  494. #define bfd_mach_s390_31 31
  495. #define bfd_mach_s390_64 64
  496. bfd_arch_score, /* Sunplus score. */
  497. #define bfd_mach_score3 3
  498. #define bfd_mach_score7 7
  499. bfd_arch_mmix, /* Donald Knuth's educational processor. */
  500. bfd_arch_xstormy16,
  501. #define bfd_mach_xstormy16 1
  502. bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
  503. #define bfd_mach_msp11 11
  504. #define bfd_mach_msp110 110
  505. #define bfd_mach_msp12 12
  506. #define bfd_mach_msp13 13
  507. #define bfd_mach_msp14 14
  508. #define bfd_mach_msp15 15
  509. #define bfd_mach_msp16 16
  510. #define bfd_mach_msp20 20
  511. #define bfd_mach_msp21 21
  512. #define bfd_mach_msp22 22
  513. #define bfd_mach_msp23 23
  514. #define bfd_mach_msp24 24
  515. #define bfd_mach_msp26 26
  516. #define bfd_mach_msp31 31
  517. #define bfd_mach_msp32 32
  518. #define bfd_mach_msp33 33
  519. #define bfd_mach_msp41 41
  520. #define bfd_mach_msp42 42
  521. #define bfd_mach_msp43 43
  522. #define bfd_mach_msp44 44
  523. #define bfd_mach_msp430x 45
  524. #define bfd_mach_msp46 46
  525. #define bfd_mach_msp47 47
  526. #define bfd_mach_msp54 54
  527. bfd_arch_xc16x, /* Infineon's XC16X Series. */
  528. #define bfd_mach_xc16x 1
  529. #define bfd_mach_xc16xl 2
  530. #define bfd_mach_xc16xs 3
  531. bfd_arch_xgate, /* Freescale XGATE. */
  532. #define bfd_mach_xgate 1
  533. bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
  534. #define bfd_mach_xtensa 1
  535. bfd_arch_z80,
  536. /* Zilog Z80 without undocumented opcodes. */
  537. #define bfd_mach_z80strict 1
  538. /* Zilog Z180: successor with additional instructions, but without
  539. halves of ix and iy. */
  540. #define bfd_mach_z180 2
  541. /* Zilog Z80 with ixl, ixh, iyl, and iyh. */
  542. #define bfd_mach_z80 3
  543. /* Zilog eZ80 (successor of Z80 &amp; Z180) in Z80 (16-bit address) mode. */
  544. #define bfd_mach_ez80_z80 4
  545. /* Zilog eZ80 (successor of Z80 &amp; Z180) in ADL (24-bit address) mode. */
  546. #define bfd_mach_ez80_adl 5
  547. /* Z80N */
  548. #define bfd_mach_z80n 6
  549. /* Zilog Z80 with all undocumented instructions. */
  550. #define bfd_mach_z80full 7
  551. /* GameBoy Z80 (reduced instruction set). */
  552. #define bfd_mach_gbz80 8
  553. /* ASCII R800: successor with multiplication. */
  554. #define bfd_mach_r800 11
  555. bfd_arch_lm32, /* Lattice Mico32. */
  556. #define bfd_mach_lm32 1
  557. bfd_arch_microblaze,/* Xilinx MicroBlaze. */
  558. bfd_arch_tilepro, /* Tilera TILEPro. */
  559. bfd_arch_tilegx, /* Tilera TILE-Gx. */
  560. #define bfd_mach_tilepro 1
  561. #define bfd_mach_tilegx 1
  562. #define bfd_mach_tilegx32 2
  563. bfd_arch_aarch64, /* AArch64. */
  564. #define bfd_mach_aarch64 0
  565. #define bfd_mach_aarch64_8R 1
  566. #define bfd_mach_aarch64_ilp32 32
  567. bfd_arch_nios2, /* Nios II. */
  568. #define bfd_mach_nios2 0
  569. #define bfd_mach_nios2r1 1
  570. #define bfd_mach_nios2r2 2
  571. bfd_arch_visium, /* Visium. */
  572. #define bfd_mach_visium 1
  573. bfd_arch_wasm32, /* WebAssembly. */
  574. #define bfd_mach_wasm32 1
  575. bfd_arch_pru, /* PRU. */
  576. #define bfd_mach_pru 0
  577. bfd_arch_nfp, /* Netronome Flow Processor */
  578. #define bfd_mach_nfp3200 0x3200
  579. #define bfd_mach_nfp6000 0x6000
  580. bfd_arch_csky, /* C-SKY. */
  581. #define bfd_mach_ck_unknown 0
  582. #define bfd_mach_ck510 1
  583. #define bfd_mach_ck610 2
  584. #define bfd_mach_ck801 3
  585. #define bfd_mach_ck802 4
  586. #define bfd_mach_ck803 5
  587. #define bfd_mach_ck807 6
  588. #define bfd_mach_ck810 7
  589. #define bfd_mach_ck860 8
  590. bfd_arch_last
  591. };
  592. </pre></div>
  593. <a name="bfd_005farch_005finfo"></a>
  594. <h4 class="subsection">2.13.2 bfd_arch_info</h4>
  595. <p><strong>Description</strong><br>
  596. This structure contains information on architectures for use
  597. within BFD.
  598. </p><div class="example">
  599. <pre class="example">
  600. typedef struct bfd_arch_info
  601. {
  602. int bits_per_word;
  603. int bits_per_address;
  604. int bits_per_byte;
  605. enum bfd_architecture arch;
  606. unsigned long mach;
  607. const char *arch_name;
  608. const char *printable_name;
  609. unsigned int section_align_power;
  610. /* TRUE if this is the default machine for the architecture.
  611. The default arch should be the first entry for an arch so that
  612. all the entries for that arch can be accessed via <code>next</code>. */
  613. bfd_boolean the_default;
  614. const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
  615. const struct bfd_arch_info *);
  616. bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
  617. /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
  618. IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
  619. TRUE, the buffer contains code. */
  620. void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
  621. bfd_boolean code);
  622. const struct bfd_arch_info *next;
  623. /* On some architectures the offset for a relocation can point into
  624. the middle of an instruction. This field specifies the maximum
  625. offset such a relocation can have (in octets). This affects the
  626. behaviour of the disassembler, since a value greater than zero
  627. means that it may need to disassemble an instruction twice, once
  628. to get its length and then a second time to display it. If the
  629. value is negative then this has to be done for every single
  630. instruction, regardless of the offset of the reloc. */
  631. signed int max_reloc_offset_into_insn;
  632. }
  633. bfd_arch_info_type;
  634. </pre></div>
  635. <a name="index-bfd_005fprintable_005fname"></a>
  636. <a name="bfd_005fprintable_005fname"></a>
  637. <h4 class="subsubsection">2.13.2.1 <code>bfd_printable_name</code></h4>
  638. <p><strong>Synopsis</strong>
  639. </p><div class="example">
  640. <pre class="example">const char *bfd_printable_name (bfd *abfd);
  641. </pre></div>
  642. <p><strong>Description</strong><br>
  643. Return a printable string representing the architecture and machine
  644. from the pointer to the architecture info structure.
  645. </p>
  646. <a name="index-bfd_005fscan_005farch"></a>
  647. <a name="bfd_005fscan_005farch"></a>
  648. <h4 class="subsubsection">2.13.2.2 <code>bfd_scan_arch</code></h4>
  649. <p><strong>Synopsis</strong>
  650. </p><div class="example">
  651. <pre class="example">const bfd_arch_info_type *bfd_scan_arch (const char *string);
  652. </pre></div>
  653. <p><strong>Description</strong><br>
  654. Figure out if BFD supports any cpu which could be described with
  655. the name <var>string</var>. Return a pointer to an <code>arch_info</code>
  656. structure if a machine is found, otherwise NULL.
  657. </p>
  658. <a name="index-bfd_005farch_005flist"></a>
  659. <a name="bfd_005farch_005flist"></a>
  660. <h4 class="subsubsection">2.13.2.3 <code>bfd_arch_list</code></h4>
  661. <p><strong>Synopsis</strong>
  662. </p><div class="example">
  663. <pre class="example">const char **bfd_arch_list (void);
  664. </pre></div>
  665. <p><strong>Description</strong><br>
  666. Return a freshly malloced NULL-terminated vector of the names
  667. of all the valid BFD architectures. Do not modify the names.
  668. </p>
  669. <a name="index-bfd_005farch_005fget_005fcompatible"></a>
  670. <a name="bfd_005farch_005fget_005fcompatible"></a>
  671. <h4 class="subsubsection">2.13.2.4 <code>bfd_arch_get_compatible</code></h4>
  672. <p><strong>Synopsis</strong>
  673. </p><div class="example">
  674. <pre class="example">const bfd_arch_info_type *bfd_arch_get_compatible
  675. (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
  676. </pre></div>
  677. <p><strong>Description</strong><br>
  678. Determine whether two BFDs&rsquo; architectures and machine types
  679. are compatible. Calculates the lowest common denominator
  680. between the two architectures and machine types implied by
  681. the BFDs and returns a pointer to an <code>arch_info</code> structure
  682. describing the compatible machine.
  683. </p>
  684. <a name="index-bfd_005fdefault_005farch_005fstruct"></a>
  685. <a name="bfd_005fdefault_005farch_005fstruct"></a>
  686. <h4 class="subsubsection">2.13.2.5 <code>bfd_default_arch_struct</code></h4>
  687. <p><strong>Description</strong><br>
  688. The <code>bfd_default_arch_struct</code> is an item of
  689. <code>bfd_arch_info_type</code> which has been initialized to a fairly
  690. generic state. A BFD starts life by pointing to this
  691. structure, until the correct back end has determined the real
  692. architecture of the file.
  693. </p><div class="example">
  694. <pre class="example">extern const bfd_arch_info_type bfd_default_arch_struct;
  695. </pre></div>
  696. <a name="index-bfd_005fset_005farch_005finfo"></a>
  697. <a name="bfd_005fset_005farch_005finfo"></a>
  698. <h4 class="subsubsection">2.13.2.6 <code>bfd_set_arch_info</code></h4>
  699. <p><strong>Synopsis</strong>
  700. </p><div class="example">
  701. <pre class="example">void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
  702. </pre></div>
  703. <p><strong>Description</strong><br>
  704. Set the architecture info of <var>abfd</var> to <var>arg</var>.
  705. </p>
  706. <a name="index-bfd_005fdefault_005fset_005farch_005fmach"></a>
  707. <a name="bfd_005fdefault_005fset_005farch_005fmach"></a>
  708. <h4 class="subsubsection">2.13.2.7 <code>bfd_default_set_arch_mach</code></h4>
  709. <p><strong>Synopsis</strong>
  710. </p><div class="example">
  711. <pre class="example">bfd_boolean bfd_default_set_arch_mach
  712. (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
  713. </pre></div>
  714. <p><strong>Description</strong><br>
  715. Set the architecture and machine type in BFD <var>abfd</var>
  716. to <var>arch</var> and <var>mach</var>. Find the correct
  717. pointer to a structure and insert it into the <code>arch_info</code>
  718. pointer.
  719. </p>
  720. <a name="index-bfd_005fget_005farch"></a>
  721. <a name="bfd_005fget_005farch"></a>
  722. <h4 class="subsubsection">2.13.2.8 <code>bfd_get_arch</code></h4>
  723. <p><strong>Synopsis</strong>
  724. </p><div class="example">
  725. <pre class="example">enum bfd_architecture bfd_get_arch (const bfd *abfd);
  726. </pre></div>
  727. <p><strong>Description</strong><br>
  728. Return the enumerated type which describes the BFD <var>abfd</var>&rsquo;s
  729. architecture.
  730. </p>
  731. <a name="index-bfd_005fget_005fmach"></a>
  732. <a name="bfd_005fget_005fmach"></a>
  733. <h4 class="subsubsection">2.13.2.9 <code>bfd_get_mach</code></h4>
  734. <p><strong>Synopsis</strong>
  735. </p><div class="example">
  736. <pre class="example">unsigned long bfd_get_mach (const bfd *abfd);
  737. </pre></div>
  738. <p><strong>Description</strong><br>
  739. Return the long type which describes the BFD <var>abfd</var>&rsquo;s
  740. machine.
  741. </p>
  742. <a name="index-bfd_005farch_005fbits_005fper_005fbyte"></a>
  743. <a name="bfd_005farch_005fbits_005fper_005fbyte"></a>
  744. <h4 class="subsubsection">2.13.2.10 <code>bfd_arch_bits_per_byte</code></h4>
  745. <p><strong>Synopsis</strong>
  746. </p><div class="example">
  747. <pre class="example">unsigned int bfd_arch_bits_per_byte (const bfd *abfd);
  748. </pre></div>
  749. <p><strong>Description</strong><br>
  750. Return the number of bits in one of the BFD <var>abfd</var>&rsquo;s
  751. architecture&rsquo;s bytes.
  752. </p>
  753. <a name="index-bfd_005farch_005fbits_005fper_005faddress"></a>
  754. <a name="bfd_005farch_005fbits_005fper_005faddress"></a>
  755. <h4 class="subsubsection">2.13.2.11 <code>bfd_arch_bits_per_address</code></h4>
  756. <p><strong>Synopsis</strong>
  757. </p><div class="example">
  758. <pre class="example">unsigned int bfd_arch_bits_per_address (const bfd *abfd);
  759. </pre></div>
  760. <p><strong>Description</strong><br>
  761. Return the number of bits in one of the BFD <var>abfd</var>&rsquo;s
  762. architecture&rsquo;s addresses.
  763. </p>
  764. <a name="index-bfd_005fdefault_005fcompatible"></a>
  765. <a name="bfd_005fdefault_005fcompatible"></a>
  766. <h4 class="subsubsection">2.13.2.12 <code>bfd_default_compatible</code></h4>
  767. <p><strong>Synopsis</strong>
  768. </p><div class="example">
  769. <pre class="example">const bfd_arch_info_type *bfd_default_compatible
  770. (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
  771. </pre></div>
  772. <p><strong>Description</strong><br>
  773. The default function for testing for compatibility.
  774. </p>
  775. <a name="index-bfd_005fdefault_005fscan"></a>
  776. <a name="bfd_005fdefault_005fscan"></a>
  777. <h4 class="subsubsection">2.13.2.13 <code>bfd_default_scan</code></h4>
  778. <p><strong>Synopsis</strong>
  779. </p><div class="example">
  780. <pre class="example">bfd_boolean bfd_default_scan
  781. (const struct bfd_arch_info *info, const char *string);
  782. </pre></div>
  783. <p><strong>Description</strong><br>
  784. The default function for working out whether this is an
  785. architecture hit and a machine hit.
  786. </p>
  787. <a name="index-bfd_005fget_005farch_005finfo"></a>
  788. <a name="bfd_005fget_005farch_005finfo"></a>
  789. <h4 class="subsubsection">2.13.2.14 <code>bfd_get_arch_info</code></h4>
  790. <p><strong>Synopsis</strong>
  791. </p><div class="example">
  792. <pre class="example">const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
  793. </pre></div>
  794. <p><strong>Description</strong><br>
  795. Return the architecture info struct in <var>abfd</var>.
  796. </p>
  797. <a name="index-bfd_005flookup_005farch"></a>
  798. <a name="bfd_005flookup_005farch"></a>
  799. <h4 class="subsubsection">2.13.2.15 <code>bfd_lookup_arch</code></h4>
  800. <p><strong>Synopsis</strong>
  801. </p><div class="example">
  802. <pre class="example">const bfd_arch_info_type *bfd_lookup_arch
  803. (enum bfd_architecture arch, unsigned long machine);
  804. </pre></div>
  805. <p><strong>Description</strong><br>
  806. Look for the architecture info structure which matches the
  807. arguments <var>arch</var> and <var>machine</var>. A machine of 0 matches the
  808. machine/architecture structure which marks itself as the
  809. default.
  810. </p>
  811. <a name="index-bfd_005fprintable_005farch_005fmach"></a>
  812. <a name="bfd_005fprintable_005farch_005fmach"></a>
  813. <h4 class="subsubsection">2.13.2.16 <code>bfd_printable_arch_mach</code></h4>
  814. <p><strong>Synopsis</strong>
  815. </p><div class="example">
  816. <pre class="example">const char *bfd_printable_arch_mach
  817. (enum bfd_architecture arch, unsigned long machine);
  818. </pre></div>
  819. <p><strong>Description</strong><br>
  820. Return a printable string representing the architecture and
  821. machine type.
  822. </p>
  823. <p>This routine is depreciated.
  824. </p>
  825. <a name="index-bfd_005foctets_005fper_005fbyte"></a>
  826. <a name="bfd_005foctets_005fper_005fbyte"></a>
  827. <h4 class="subsubsection">2.13.2.17 <code>bfd_octets_per_byte</code></h4>
  828. <p><strong>Synopsis</strong>
  829. </p><div class="example">
  830. <pre class="example">unsigned int bfd_octets_per_byte (const bfd *abfd,
  831. const asection *sec);
  832. </pre></div>
  833. <p><strong>Description</strong><br>
  834. Return the number of octets (8-bit quantities) per target byte
  835. (minimum addressable unit). In most cases, this will be one, but some
  836. DSP targets have 16, 32, or even 48 bits per byte.
  837. </p>
  838. <a name="index-bfd_005farch_005fmach_005foctets_005fper_005fbyte"></a>
  839. <a name="bfd_005farch_005fmach_005foctets_005fper_005fbyte"></a>
  840. <h4 class="subsubsection">2.13.2.18 <code>bfd_arch_mach_octets_per_byte</code></h4>
  841. <p><strong>Synopsis</strong>
  842. </p><div class="example">
  843. <pre class="example">unsigned int bfd_arch_mach_octets_per_byte
  844. (enum bfd_architecture arch, unsigned long machine);
  845. </pre></div>
  846. <p><strong>Description</strong><br>
  847. See bfd_octets_per_byte.
  848. </p>
  849. <p>This routine is provided for those cases where a bfd * is not
  850. available
  851. </p>
  852. <a name="index-bfd_005farch_005fdefault_005ffill"></a>
  853. <a name="bfd_005farch_005fdefault_005ffill"></a>
  854. <h4 class="subsubsection">2.13.2.19 <code>bfd_arch_default_fill</code></h4>
  855. <p><strong>Synopsis</strong>
  856. </p><div class="example">
  857. <pre class="example">void *bfd_arch_default_fill (bfd_size_type count,
  858. bfd_boolean is_bigendian,
  859. bfd_boolean code);
  860. </pre></div>
  861. <p><strong>Description</strong><br>
  862. Allocate via bfd_malloc and return a fill buffer of size COUNT.
  863. If IS_BIGENDIAN is TRUE, the order of bytes is big endian. If
  864. CODE is TRUE, the buffer contains code.
  865. </p>
  866. <hr>
  867. <div class="header">
  868. <p>
  869. Next: <a href="Opening-and-Closing.html#Opening-and-Closing" accesskey="n" rel="next">Opening and Closing</a>, Previous: <a href="Targets.html#Targets" accesskey="p" rel="prev">Targets</a>, Up: <a href="BFD-front-end.html#BFD-front-end" accesskey="u" rel="up">BFD front end</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="BFD-Index.html#BFD-Index" title="Index" rel="index">Index</a>]</p>
  870. </div>
  871. </body>
  872. </html>