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