archures.texi revision 1.1.1.7
1@section Architectures
2BFD keeps one atom in a BFD describing the
3architecture of the data attached to the BFD: a pointer to a
4@code{bfd_arch_info_type}.
5
6Pointers to structures can be requested independently of a BFD
7so that an architecture's information can be interrogated
8without access to an open BFD.
9
10The architecture information is provided by each architecture package.
11The 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
14defined, then all the architectures supported are included.
15
16When BFD starts up, all the architectures are called with an
17initialize method.  It is up to the architecture back end to
18insert as many items into the list of architectures as it wants to;
19generally this would be one for each machine and one for the
20default case (an item with a machine field of 0).
21
22BFD's idea of an architecture is implemented in @file{archures.c}.
23
24@subsection bfd_architecture
25
26
27@strong{Description}@*
28This enum gives the object file's CPU architecture, in a
29global sense---i.e., what processor family does it belong to?
30Another field indicates which processor within
31the family is in use.  The machine gives a number which
32distinguishes different versions of the architecture,
33containing, for example, 68020 for Motorola 68020.
34@example
35enum 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_loongson_3a      3003
146#define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01.  */
147#define bfd_mach_mips_octeon           6501
148#define bfd_mach_mips_octeonp          6601
149#define bfd_mach_mips_octeon2          6502
150#define bfd_mach_mips_octeon3          6503
151#define bfd_mach_mips_xlr              887682   /* decimal 'XLR'.  */
152#define bfd_mach_mips_interaptiv_mr2   736550   /* decimal 'IA2'.  */
153#define bfd_mach_mipsisa32             32
154#define bfd_mach_mipsisa32r2           33
155#define bfd_mach_mipsisa32r3           34
156#define bfd_mach_mipsisa32r5           36
157#define bfd_mach_mipsisa32r6           37
158#define bfd_mach_mipsisa64             64
159#define bfd_mach_mipsisa64r2           65
160#define bfd_mach_mipsisa64r3           66
161#define bfd_mach_mipsisa64r5           68
162#define bfd_mach_mipsisa64r6           69
163#define bfd_mach_mips_micromips        96
164  bfd_arch_i386,      /* Intel 386.  */
165#define bfd_mach_i386_intel_syntax     (1 << 0)
166#define bfd_mach_i386_i8086            (1 << 1)
167#define bfd_mach_i386_i386             (1 << 2)
168#define bfd_mach_x86_64                (1 << 3)
169#define bfd_mach_x64_32                (1 << 4)
170#define bfd_mach_i386_i386_intel_syntax (bfd_mach_i386_i386 | bfd_mach_i386_intel_syntax)
171#define bfd_mach_x86_64_intel_syntax   (bfd_mach_x86_64 | bfd_mach_i386_intel_syntax)
172#define bfd_mach_x64_32_intel_syntax   (bfd_mach_x64_32 | bfd_mach_i386_intel_syntax)
173  bfd_arch_l1om,      /* Intel L1OM.  */
174#define bfd_mach_l1om                  (1 << 5)
175#define bfd_mach_l1om_intel_syntax     (bfd_mach_l1om | bfd_mach_i386_intel_syntax)
176  bfd_arch_k1om,      /* Intel K1OM.  */
177#define bfd_mach_k1om                  (1 << 6)
178#define bfd_mach_k1om_intel_syntax     (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
179#define bfd_mach_i386_nacl             (1 << 7)
180#define bfd_mach_i386_i386_nacl        (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
181#define bfd_mach_x86_64_nacl           (bfd_mach_x86_64 | bfd_mach_i386_nacl)
182#define bfd_mach_x64_32_nacl           (bfd_mach_x64_32 | bfd_mach_i386_nacl)
183  bfd_arch_iamcu,     /* Intel MCU.  */
184#define bfd_mach_iamcu                 (1 << 8)
185#define bfd_mach_i386_iamcu            (bfd_mach_i386_i386 | bfd_mach_iamcu)
186#define bfd_mach_i386_iamcu_intel_syntax (bfd_mach_i386_iamcu | bfd_mach_i386_intel_syntax)
187  bfd_arch_romp,      /* IBM ROMP PC/RT.  */
188  bfd_arch_convex,    /* Convex.  */
189  bfd_arch_m98k,      /* Motorola 98xxx.  */
190  bfd_arch_pyramid,   /* Pyramid Technology.  */
191  bfd_arch_h8300,     /* Renesas H8/300 (formerly Hitachi H8/300).  */
192#define bfd_mach_h8300         1
193#define bfd_mach_h8300h        2
194#define bfd_mach_h8300s        3
195#define bfd_mach_h8300hn       4
196#define bfd_mach_h8300sn       5
197#define bfd_mach_h8300sx       6
198#define bfd_mach_h8300sxn      7
199  bfd_arch_pdp11,     /* DEC PDP-11.  */
200  bfd_arch_plugin,
201  bfd_arch_powerpc,   /* PowerPC.  */
202#define bfd_mach_ppc           32
203#define bfd_mach_ppc64         64
204#define bfd_mach_ppc_403       403
205#define bfd_mach_ppc_403gc     4030
206#define bfd_mach_ppc_405       405
207#define bfd_mach_ppc_505       505
208#define bfd_mach_ppc_601       601
209#define bfd_mach_ppc_602       602
210#define bfd_mach_ppc_603       603
211#define bfd_mach_ppc_ec603e    6031
212#define bfd_mach_ppc_604       604
213#define bfd_mach_ppc_620       620
214#define bfd_mach_ppc_630       630
215#define bfd_mach_ppc_750       750
216#define bfd_mach_ppc_860       860
217#define bfd_mach_ppc_a35       35
218#define bfd_mach_ppc_rs64ii    642
219#define bfd_mach_ppc_rs64iii   643
220#define bfd_mach_ppc_7400      7400
221#define bfd_mach_ppc_e500      500
222#define bfd_mach_ppc_e500mc    5001
223#define bfd_mach_ppc_e500mc64  5005
224#define bfd_mach_ppc_e5500     5006
225#define bfd_mach_ppc_e6500     5007
226#define bfd_mach_ppc_titan     83
227#define bfd_mach_ppc_vle       84
228  bfd_arch_rs6000,    /* IBM RS/6000.  */
229#define bfd_mach_rs6k          6000
230#define bfd_mach_rs6k_rs1      6001
231#define bfd_mach_rs6k_rsc      6003
232#define bfd_mach_rs6k_rs2      6002
233  bfd_arch_hppa,      /* HP PA RISC.  */
234#define bfd_mach_hppa10        10
235#define bfd_mach_hppa11        11
236#define bfd_mach_hppa20        20
237#define bfd_mach_hppa20w       25
238  bfd_arch_d10v,      /* Mitsubishi D10V.  */
239#define bfd_mach_d10v          1
240#define bfd_mach_d10v_ts2      2
241#define bfd_mach_d10v_ts3      3
242  bfd_arch_d30v,      /* Mitsubishi D30V.  */
243  bfd_arch_dlx,       /* DLX.  */
244  bfd_arch_m68hc11,   /* Motorola 68HC11.  */
245  bfd_arch_m68hc12,   /* Motorola 68HC12.  */
246#define bfd_mach_m6812_default 0
247#define bfd_mach_m6812         1
248#define bfd_mach_m6812s        2
249  bfd_arch_m9s12x,    /* Freescale S12X.  */
250  bfd_arch_m9s12xg,   /* Freescale XGATE.  */
251  bfd_arch_s12z,    /* Freescale S12Z.  */
252#define bfd_mach_s12z_default 0
253  bfd_arch_z8k,       /* Zilog Z8000.  */
254#define bfd_mach_z8001         1
255#define bfd_mach_z8002         2
256  bfd_arch_sh,        /* Renesas / SuperH SH (formerly Hitachi SH).  */
257#define bfd_mach_sh                            1
258#define bfd_mach_sh2                           0x20
259#define bfd_mach_sh_dsp                        0x2d
260#define bfd_mach_sh2a                          0x2a
261#define bfd_mach_sh2a_nofpu                    0x2b
262#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
263#define bfd_mach_sh2a_nofpu_or_sh3_nommu       0x2a2
264#define bfd_mach_sh2a_or_sh4                   0x2a3
265#define bfd_mach_sh2a_or_sh3e                  0x2a4
266#define bfd_mach_sh2e                          0x2e
267#define bfd_mach_sh3                           0x30
268#define bfd_mach_sh3_nommu                     0x31
269#define bfd_mach_sh3_dsp                       0x3d
270#define bfd_mach_sh3e                          0x3e
271#define bfd_mach_sh4                           0x40
272#define bfd_mach_sh4_nofpu                     0x41
273#define bfd_mach_sh4_nommu_nofpu               0x42
274#define bfd_mach_sh4a                          0x4a
275#define bfd_mach_sh4a_nofpu                    0x4b
276#define bfd_mach_sh4al_dsp                     0x4d
277  bfd_arch_alpha,     /* Dec Alpha.  */
278#define bfd_mach_alpha_ev4     0x10
279#define bfd_mach_alpha_ev5     0x20
280#define bfd_mach_alpha_ev6     0x30
281  bfd_arch_arm,       /* Advanced Risc Machines ARM.  */
282#define bfd_mach_arm_unknown   0
283#define bfd_mach_arm_2         1
284#define bfd_mach_arm_2a        2
285#define bfd_mach_arm_3         3
286#define bfd_mach_arm_3M        4
287#define bfd_mach_arm_4         5
288#define bfd_mach_arm_4T        6
289#define bfd_mach_arm_5         7
290#define bfd_mach_arm_5T        8
291#define bfd_mach_arm_5TE       9
292#define bfd_mach_arm_XScale    10
293#define bfd_mach_arm_ep9312    11
294#define bfd_mach_arm_iWMMXt    12
295#define bfd_mach_arm_iWMMXt2   13
296  bfd_arch_nds32,     /* Andes NDS32.  */
297#define bfd_mach_n1            1
298#define bfd_mach_n1h           2
299#define bfd_mach_n1h_v2        3
300#define bfd_mach_n1h_v3        4
301#define bfd_mach_n1h_v3m       5
302  bfd_arch_ns32k,     /* National Semiconductors ns32000.  */
303  bfd_arch_tic30,     /* Texas Instruments TMS320C30.  */
304  bfd_arch_tic4x,     /* Texas Instruments TMS320C3X/4X.  */
305#define bfd_mach_tic3x         30
306#define bfd_mach_tic4x         40
307  bfd_arch_tic54x,    /* Texas Instruments TMS320C54X.  */
308  bfd_arch_tic6x,     /* Texas Instruments TMS320C6X.  */
309  bfd_arch_tic80,     /* TI TMS320c80 (MVP).  */
310  bfd_arch_v850,      /* NEC V850.  */
311  bfd_arch_v850_rh850,/* NEC V850 (using RH850 ABI).  */
312#define bfd_mach_v850          1
313#define bfd_mach_v850e         'E'
314#define bfd_mach_v850e1        '1'
315#define bfd_mach_v850e2        0x4532
316#define bfd_mach_v850e2v3      0x45325633
317#define bfd_mach_v850e3v5      0x45335635 /* ('E'|'3'|'V'|'5').  */
318  bfd_arch_arc,       /* ARC Cores.  */
319#define bfd_mach_arc_a4        0
320#define bfd_mach_arc_a5        1
321#define bfd_mach_arc_arc600    2
322#define bfd_mach_arc_arc601    4
323#define bfd_mach_arc_arc700    3
324#define bfd_mach_arc_arcv2     5
325 bfd_arch_m32c,       /* Renesas M16C/M32C.  */
326#define bfd_mach_m16c          0x75
327#define bfd_mach_m32c          0x78
328  bfd_arch_m32r,      /* Renesas M32R (formerly Mitsubishi M32R/D).  */
329#define bfd_mach_m32r          1 /* For backwards compatibility.  */
330#define bfd_mach_m32rx         'x'
331#define bfd_mach_m32r2         '2'
332  bfd_arch_mn10200,   /* Matsushita MN10200.  */
333  bfd_arch_mn10300,   /* Matsushita MN10300.  */
334#define bfd_mach_mn10300       300
335#define bfd_mach_am33          330
336#define bfd_mach_am33_2        332
337  bfd_arch_fr30,
338#define bfd_mach_fr30          0x46523330
339  bfd_arch_frv,
340#define bfd_mach_frv           1
341#define bfd_mach_frvsimple     2
342#define bfd_mach_fr300         300
343#define bfd_mach_fr400         400
344#define bfd_mach_fr450         450
345#define bfd_mach_frvtomcat     499     /* fr500 prototype.  */
346#define bfd_mach_fr500         500
347#define bfd_mach_fr550         550
348  bfd_arch_moxie,     /* The moxie processor.  */
349#define bfd_mach_moxie         1
350  bfd_arch_ft32,      /* The ft32 processor.  */
351#define bfd_mach_ft32          1
352#define bfd_mach_ft32b         2
353  bfd_arch_mcore,
354  bfd_arch_mep,
355#define bfd_mach_mep           1
356#define bfd_mach_mep_h1        0x6831
357#define bfd_mach_mep_c5        0x6335
358  bfd_arch_metag,
359#define bfd_mach_metag         1
360  bfd_arch_ia64,      /* HP/Intel ia64.  */
361#define bfd_mach_ia64_elf64    64
362#define bfd_mach_ia64_elf32    32
363  bfd_arch_ip2k,      /* Ubicom IP2K microcontrollers. */
364#define bfd_mach_ip2022        1
365#define bfd_mach_ip2022ext     2
366 bfd_arch_iq2000,     /* Vitesse IQ2000.  */
367#define bfd_mach_iq2000        1
368#define bfd_mach_iq10          2
369  bfd_arch_epiphany,  /* Adapteva EPIPHANY.  */
370#define bfd_mach_epiphany16    1
371#define bfd_mach_epiphany32    2
372  bfd_arch_mt,
373#define bfd_mach_ms1           1
374#define bfd_mach_mrisc2        2
375#define bfd_mach_ms2           3
376  bfd_arch_pj,
377  bfd_arch_avr,       /* Atmel AVR microcontrollers.  */
378#define bfd_mach_avr1          1
379#define bfd_mach_avr2          2
380#define bfd_mach_avr25         25
381#define bfd_mach_avr3          3
382#define bfd_mach_avr31         31
383#define bfd_mach_avr35         35
384#define bfd_mach_avr4          4
385#define bfd_mach_avr5          5
386#define bfd_mach_avr51         51
387#define bfd_mach_avr6          6
388#define bfd_mach_avrtiny       100
389#define bfd_mach_avrxmega1     101
390#define bfd_mach_avrxmega2     102
391#define bfd_mach_avrxmega3     103
392#define bfd_mach_avrxmega4     104
393#define bfd_mach_avrxmega5     105
394#define bfd_mach_avrxmega6     106
395#define bfd_mach_avrxmega7     107
396  bfd_arch_bfin,      /* ADI Blackfin.  */
397#define bfd_mach_bfin          1
398  bfd_arch_cr16,      /* National Semiconductor CompactRISC (ie CR16).  */
399#define bfd_mach_cr16          1
400  bfd_arch_cr16c,     /* National Semiconductor CompactRISC.  */
401#define bfd_mach_cr16c         1
402  bfd_arch_crx,       /*  National Semiconductor CRX.  */
403#define bfd_mach_crx           1
404  bfd_arch_cris,      /* Axis CRIS.  */
405#define bfd_mach_cris_v0_v10   255
406#define bfd_mach_cris_v32      32
407#define bfd_mach_cris_v10_v32  1032
408  bfd_arch_riscv,
409#define bfd_mach_riscv32       132
410#define bfd_mach_riscv64       164
411  bfd_arch_rl78,
412#define bfd_mach_rl78          0x75
413  bfd_arch_rx,        /* Renesas RX.  */
414#define bfd_mach_rx            0x75
415  bfd_arch_s390,      /* IBM s390.  */
416#define bfd_mach_s390_31       31
417#define bfd_mach_s390_64       64
418  bfd_arch_score,     /* Sunplus score.  */
419#define bfd_mach_score3        3
420#define bfd_mach_score7        7
421  bfd_arch_mmix,      /* Donald Knuth's educational processor.  */
422  bfd_arch_xstormy16,
423#define bfd_mach_xstormy16     1
424  bfd_arch_msp430,    /* Texas Instruments MSP430 architecture.  */
425#define bfd_mach_msp11         11
426#define bfd_mach_msp110        110
427#define bfd_mach_msp12         12
428#define bfd_mach_msp13         13
429#define bfd_mach_msp14         14
430#define bfd_mach_msp15         15
431#define bfd_mach_msp16         16
432#define bfd_mach_msp20         20
433#define bfd_mach_msp21         21
434#define bfd_mach_msp22         22
435#define bfd_mach_msp23         23
436#define bfd_mach_msp24         24
437#define bfd_mach_msp26         26
438#define bfd_mach_msp31         31
439#define bfd_mach_msp32         32
440#define bfd_mach_msp33         33
441#define bfd_mach_msp41         41
442#define bfd_mach_msp42         42
443#define bfd_mach_msp43         43
444#define bfd_mach_msp44         44
445#define bfd_mach_msp430x       45
446#define bfd_mach_msp46         46
447#define bfd_mach_msp47         47
448#define bfd_mach_msp54         54
449  bfd_arch_xc16x,     /* Infineon's XC16X Series.  */
450#define bfd_mach_xc16x         1
451#define bfd_mach_xc16xl        2
452#define bfd_mach_xc16xs        3
453  bfd_arch_xgate,     /* Freescale XGATE.  */
454#define bfd_mach_xgate         1
455  bfd_arch_xtensa,    /* Tensilica's Xtensa cores.  */
456#define bfd_mach_xtensa        1
457  bfd_arch_z80,
458#define bfd_mach_z80strict     1 /* No undocumented opcodes.  */
459#define bfd_mach_z80           3 /* With ixl, ixh, iyl, and iyh.  */
460#define bfd_mach_z80full       7 /* All undocumented instructions.  */
461#define bfd_mach_r800          11 /* R800: successor with multiplication.  */
462  bfd_arch_lm32,      /* Lattice Mico32.  */
463#define bfd_mach_lm32          1
464  bfd_arch_microblaze,/* Xilinx MicroBlaze.  */
465  bfd_arch_tilepro,   /* Tilera TILEPro.  */
466  bfd_arch_tilegx,    /* Tilera TILE-Gx.  */
467#define bfd_mach_tilepro       1
468#define bfd_mach_tilegx        1
469#define bfd_mach_tilegx32      2
470  bfd_arch_aarch64,   /* AArch64.  */
471#define bfd_mach_aarch64 0
472#define bfd_mach_aarch64_ilp32 32
473  bfd_arch_nios2,     /* Nios II.  */
474#define bfd_mach_nios2         0
475#define bfd_mach_nios2r1       1
476#define bfd_mach_nios2r2       2
477  bfd_arch_visium,    /* Visium.  */
478#define bfd_mach_visium        1
479  bfd_arch_wasm32,    /* WebAssembly.  */
480#define bfd_mach_wasm32        1
481  bfd_arch_pru,       /* PRU.  */
482#define bfd_mach_pru           0
483  bfd_arch_nfp,       /* Netronome Flow Processor */
484#define bfd_mach_nfp3200       0x3200
485#define bfd_mach_nfp6000       0x6000
486  bfd_arch_last
487  @};
488@end example
489
490@subsection bfd_arch_info
491
492
493@strong{Description}@*
494This structure contains information on architectures for use
495within BFD.
496@example
497
498typedef struct bfd_arch_info
499@{
500  int bits_per_word;
501  int bits_per_address;
502  int bits_per_byte;
503  enum bfd_architecture arch;
504  unsigned long mach;
505  const char *arch_name;
506  const char *printable_name;
507  unsigned int section_align_power;
508  /* TRUE if this is the default machine for the architecture.
509     The default arch should be the first entry for an arch so that
510     all the entries for that arch can be accessed via @code{next}.  */
511  bfd_boolean the_default;
512  const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *,
513                                              const struct bfd_arch_info *);
514
515  bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
516
517  /* Allocate via bfd_malloc and return a fill buffer of size COUNT.  If
518     IS_BIGENDIAN is TRUE, the order of bytes is big endian.  If CODE is
519     TRUE, the buffer contains code.  */
520  void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
521                 bfd_boolean code);
522
523  const struct bfd_arch_info *next;
524@}
525bfd_arch_info_type;
526
527@end example
528
529@findex bfd_printable_name
530@subsubsection @code{bfd_printable_name}
531@strong{Synopsis}
532@example
533const char *bfd_printable_name (bfd *abfd);
534@end example
535@strong{Description}@*
536Return a printable string representing the architecture and machine
537from the pointer to the architecture info structure.
538
539@findex bfd_scan_arch
540@subsubsection @code{bfd_scan_arch}
541@strong{Synopsis}
542@example
543const bfd_arch_info_type *bfd_scan_arch (const char *string);
544@end example
545@strong{Description}@*
546Figure out if BFD supports any cpu which could be described with
547the name @var{string}.  Return a pointer to an @code{arch_info}
548structure if a machine is found, otherwise NULL.
549
550@findex bfd_arch_list
551@subsubsection @code{bfd_arch_list}
552@strong{Synopsis}
553@example
554const char **bfd_arch_list (void);
555@end example
556@strong{Description}@*
557Return a freshly malloced NULL-terminated vector of the names
558of all the valid BFD architectures.  Do not modify the names.
559
560@findex bfd_arch_get_compatible
561@subsubsection @code{bfd_arch_get_compatible}
562@strong{Synopsis}
563@example
564const bfd_arch_info_type *bfd_arch_get_compatible
565   (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
566@end example
567@strong{Description}@*
568Determine whether two BFDs' architectures and machine types
569are compatible.  Calculates the lowest common denominator
570between the two architectures and machine types implied by
571the BFDs and returns a pointer to an @code{arch_info} structure
572describing the compatible machine.
573
574@findex bfd_default_arch_struct
575@subsubsection @code{bfd_default_arch_struct}
576@strong{Description}@*
577The @code{bfd_default_arch_struct} is an item of
578@code{bfd_arch_info_type} which has been initialized to a fairly
579generic state.  A BFD starts life by pointing to this
580structure, until the correct back end has determined the real
581architecture of the file.
582@example
583extern const bfd_arch_info_type bfd_default_arch_struct;
584@end example
585
586@findex bfd_set_arch_info
587@subsubsection @code{bfd_set_arch_info}
588@strong{Synopsis}
589@example
590void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
591@end example
592@strong{Description}@*
593Set the architecture info of @var{abfd} to @var{arg}.
594
595@findex bfd_default_set_arch_mach
596@subsubsection @code{bfd_default_set_arch_mach}
597@strong{Synopsis}
598@example
599bfd_boolean bfd_default_set_arch_mach
600   (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
601@end example
602@strong{Description}@*
603Set the architecture and machine type in BFD @var{abfd}
604to @var{arch} and @var{mach}.  Find the correct
605pointer to a structure and insert it into the @code{arch_info}
606pointer.
607
608@findex bfd_get_arch
609@subsubsection @code{bfd_get_arch}
610@strong{Synopsis}
611@example
612enum bfd_architecture bfd_get_arch (bfd *abfd);
613@end example
614@strong{Description}@*
615Return the enumerated type which describes the BFD @var{abfd}'s
616architecture.
617
618@findex bfd_get_mach
619@subsubsection @code{bfd_get_mach}
620@strong{Synopsis}
621@example
622unsigned long bfd_get_mach (bfd *abfd);
623@end example
624@strong{Description}@*
625Return the long type which describes the BFD @var{abfd}'s
626machine.
627
628@findex bfd_arch_bits_per_byte
629@subsubsection @code{bfd_arch_bits_per_byte}
630@strong{Synopsis}
631@example
632unsigned int bfd_arch_bits_per_byte (bfd *abfd);
633@end example
634@strong{Description}@*
635Return the number of bits in one of the BFD @var{abfd}'s
636architecture's bytes.
637
638@findex bfd_arch_bits_per_address
639@subsubsection @code{bfd_arch_bits_per_address}
640@strong{Synopsis}
641@example
642unsigned int bfd_arch_bits_per_address (bfd *abfd);
643@end example
644@strong{Description}@*
645Return the number of bits in one of the BFD @var{abfd}'s
646architecture's addresses.
647
648@findex bfd_default_compatible
649@subsubsection @code{bfd_default_compatible}
650@strong{Synopsis}
651@example
652const bfd_arch_info_type *bfd_default_compatible
653   (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
654@end example
655@strong{Description}@*
656The default function for testing for compatibility.
657
658@findex bfd_default_scan
659@subsubsection @code{bfd_default_scan}
660@strong{Synopsis}
661@example
662bfd_boolean bfd_default_scan
663   (const struct bfd_arch_info *info, const char *string);
664@end example
665@strong{Description}@*
666The default function for working out whether this is an
667architecture hit and a machine hit.
668
669@findex bfd_get_arch_info
670@subsubsection @code{bfd_get_arch_info}
671@strong{Synopsis}
672@example
673const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
674@end example
675@strong{Description}@*
676Return the architecture info struct in @var{abfd}.
677
678@findex bfd_lookup_arch
679@subsubsection @code{bfd_lookup_arch}
680@strong{Synopsis}
681@example
682const bfd_arch_info_type *bfd_lookup_arch
683   (enum bfd_architecture arch, unsigned long machine);
684@end example
685@strong{Description}@*
686Look for the architecture info structure which matches the
687arguments @var{arch} and @var{machine}. A machine of 0 matches the
688machine/architecture structure which marks itself as the
689default.
690
691@findex bfd_printable_arch_mach
692@subsubsection @code{bfd_printable_arch_mach}
693@strong{Synopsis}
694@example
695const char *bfd_printable_arch_mach
696   (enum bfd_architecture arch, unsigned long machine);
697@end example
698@strong{Description}@*
699Return a printable string representing the architecture and
700machine type.
701
702This routine is depreciated.
703
704@findex bfd_octets_per_byte
705@subsubsection @code{bfd_octets_per_byte}
706@strong{Synopsis}
707@example
708unsigned int bfd_octets_per_byte (bfd *abfd);
709@end example
710@strong{Description}@*
711Return the number of octets (8-bit quantities) per target byte
712(minimum addressable unit).  In most cases, this will be one, but some
713DSP targets have 16, 32, or even 48 bits per byte.
714
715@findex bfd_arch_mach_octets_per_byte
716@subsubsection @code{bfd_arch_mach_octets_per_byte}
717@strong{Synopsis}
718@example
719unsigned int bfd_arch_mach_octets_per_byte
720   (enum bfd_architecture arch, unsigned long machine);
721@end example
722@strong{Description}@*
723See bfd_octets_per_byte.
724
725This routine is provided for those cases where a bfd * is not
726available
727
728@findex bfd_arch_default_fill
729@subsubsection @code{bfd_arch_default_fill}
730@strong{Synopsis}
731@example
732void *bfd_arch_default_fill (bfd_size_type count,
733    bfd_boolean is_bigendian,
734    bfd_boolean code);
735@end example
736@strong{Description}@*
737Allocate via bfd_malloc and return a fill buffer of size COUNT.
738If IS_BIGENDIAN is TRUE, the order of bytes is big endian.  If
739CODE is TRUE, the buffer contains code.
740
741