Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: bfd/archures.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/archive64.c ('k') | bfd/bfd.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* BFD library support routines for architectures. 1 /* BFD library support routines for architectures.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
4 Free Software Foundation, Inc. 4 2012 Free Software Foundation, Inc.
5 Hacked by John Gilmore and Steve Chamberlain of Cygnus Support. 5 Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
6 6
7 This file is part of BFD, the Binary File Descriptor library. 7 This file is part of BFD, the Binary File Descriptor library.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
13 13
14 This program is distributed in the hope that it will be useful, 14 This program is distributed in the hope that it will be useful,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 .#define bfd_mach_ppc_630 630 234 .#define bfd_mach_ppc_630 630
235 .#define bfd_mach_ppc_750 750 235 .#define bfd_mach_ppc_750 750
236 .#define bfd_mach_ppc_860 860 236 .#define bfd_mach_ppc_860 860
237 .#define bfd_mach_ppc_a35 35 237 .#define bfd_mach_ppc_a35 35
238 .#define bfd_mach_ppc_rs64ii 642 238 .#define bfd_mach_ppc_rs64ii 642
239 .#define bfd_mach_ppc_rs64iii 643 239 .#define bfd_mach_ppc_rs64iii 643
240 .#define bfd_mach_ppc_7400 7400 240 .#define bfd_mach_ppc_7400 7400
241 .#define bfd_mach_ppc_e500 500 241 .#define bfd_mach_ppc_e500 500
242 .#define bfd_mach_ppc_e500mc 5001 242 .#define bfd_mach_ppc_e500mc 5001
243 .#define bfd_mach_ppc_e500mc64 5005 243 .#define bfd_mach_ppc_e500mc64 5005
244 .#define bfd_mach_ppc_e5500 5006
245 .#define bfd_mach_ppc_e6500 5007
244 .#define bfd_mach_ppc_titan 83 246 .#define bfd_mach_ppc_titan 83
247 .#define bfd_mach_ppc_vle 84
245 . bfd_arch_rs6000, {* IBM RS/6000 *} 248 . bfd_arch_rs6000, {* IBM RS/6000 *}
246 .#define bfd_mach_rs6k 6000 249 .#define bfd_mach_rs6k 6000
247 .#define bfd_mach_rs6k_rs1 6001 250 .#define bfd_mach_rs6k_rs1 6001
248 .#define bfd_mach_rs6k_rsc 6003 251 .#define bfd_mach_rs6k_rsc 6003
249 .#define bfd_mach_rs6k_rs2 6002 252 .#define bfd_mach_rs6k_rs2 6002
250 . bfd_arch_hppa, {* HP PA RISC *} 253 . bfd_arch_hppa, {* HP PA RISC *}
251 .#define bfd_mach_hppa10 10 254 .#define bfd_mach_hppa10 10
252 .#define bfd_mach_hppa11 11 255 .#define bfd_mach_hppa11 11
253 .#define bfd_mach_hppa20 20 256 .#define bfd_mach_hppa20 20
254 .#define bfd_mach_hppa20w 25 257 .#define bfd_mach_hppa20w 25
255 . bfd_arch_d10v, {* Mitsubishi D10V *} 258 . bfd_arch_d10v, {* Mitsubishi D10V *}
256 .#define bfd_mach_d10v 1 259 .#define bfd_mach_d10v 1
257 .#define bfd_mach_d10v_ts2 2 260 .#define bfd_mach_d10v_ts2 2
258 .#define bfd_mach_d10v_ts3 3 261 .#define bfd_mach_d10v_ts3 3
259 . bfd_arch_d30v, {* Mitsubishi D30V *} 262 . bfd_arch_d30v, {* Mitsubishi D30V *}
260 . bfd_arch_dlx, {* DLX *} 263 . bfd_arch_dlx, {* DLX *}
261 . bfd_arch_m68hc11, {* Motorola 68HC11 *} 264 . bfd_arch_m68hc11, {* Motorola 68HC11 *}
262 . bfd_arch_m68hc12, {* Motorola 68HC12 *} 265 . bfd_arch_m68hc12, {* Motorola 68HC12 *}
263 .#define bfd_mach_m6812_default 0 266 .#define bfd_mach_m6812_default 0
264 .#define bfd_mach_m6812 1 267 .#define bfd_mach_m6812 1
265 .#define bfd_mach_m6812s 2 268 .#define bfd_mach_m6812s 2
269 . bfd_arch_m9s12x, {* Freescale S12X *}
270 . bfd_arch_m9s12xg, {* Freescale XGATE *}
266 . bfd_arch_z8k, {* Zilog Z8000 *} 271 . bfd_arch_z8k, {* Zilog Z8000 *}
267 .#define bfd_mach_z8001 1 272 .#define bfd_mach_z8001 1
268 .#define bfd_mach_z8002 2 273 .#define bfd_mach_z8002 2
269 . bfd_arch_h8500, {* Renesas H8/500 (formerly Hitachi H8/500) *} 274 . bfd_arch_h8500, {* Renesas H8/500 (formerly Hitachi H8/500) *}
270 . bfd_arch_sh, {* Renesas / SuperH SH (formerly Hitachi SH) *} 275 . bfd_arch_sh, {* Renesas / SuperH SH (formerly Hitachi SH) *}
271 .#define bfd_mach_sh 1 276 .#define bfd_mach_sh 1
272 .#define bfd_mach_sh2 0x20 277 .#define bfd_mach_sh2 0x20
273 .#define bfd_mach_sh_dsp 0x2d 278 .#define bfd_mach_sh_dsp 0x2d
274 .#define bfd_mach_sh2a 0x2a 279 .#define bfd_mach_sh2a 0x2a
275 .#define bfd_mach_sh2a_nofpu 0x2b 280 .#define bfd_mach_sh2a_nofpu 0x2b
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 .#define bfd_mach_msp31 31 436 .#define bfd_mach_msp31 31
432 .#define bfd_mach_msp32 32 437 .#define bfd_mach_msp32 32
433 .#define bfd_mach_msp33 33 438 .#define bfd_mach_msp33 33
434 .#define bfd_mach_msp41 41 439 .#define bfd_mach_msp41 41
435 .#define bfd_mach_msp42 42 440 .#define bfd_mach_msp42 42
436 .#define bfd_mach_msp43 43 441 .#define bfd_mach_msp43 43
437 .#define bfd_mach_msp44 44 442 .#define bfd_mach_msp44 44
438 . bfd_arch_xc16x, {* Infineon's XC16X Series. *} 443 . bfd_arch_xc16x, {* Infineon's XC16X Series. *}
439 .#define bfd_mach_xc16x 1 444 .#define bfd_mach_xc16x 1
440 .#define bfd_mach_xc16xl 2 445 .#define bfd_mach_xc16xl 2
441 .#define bfd_mach_xc16xs 3 446 .#define bfd_mach_xc16xs 3
447 . bfd_arch_xgate, {* Freescale XGATE *}
448 .#define bfd_mach_xgate 1
442 . bfd_arch_xtensa, {* Tensilica's Xtensa cores. *} 449 . bfd_arch_xtensa, {* Tensilica's Xtensa cores. *}
443 .#define bfd_mach_xtensa 1 450 .#define bfd_mach_xtensa 1
444 . bfd_arch_z80, 451 . bfd_arch_z80,
445 .#define bfd_mach_z80strict 1 {* No undocumented opcodes. *} 452 .#define bfd_mach_z80strict 1 {* No undocumented opcodes. *}
446 .#define bfd_mach_z80 3 {* With ixl, ixh, iyl, and iyh. *} 453 .#define bfd_mach_z80 3 {* With ixl, ixh, iyl, and iyh. *}
447 .#define bfd_mach_z80full 7 {* All undocumented instructions. *} 454 .#define bfd_mach_z80full 7 {* All undocumented instructions. *}
448 .#define bfd_mach_r800 11 {* R800: successor with multiplication. *} 455 .#define bfd_mach_r800 11 {* R800: successor with multiplication. *}
449 . bfd_arch_lm32, {* Lattice Mico32 *} 456 . bfd_arch_lm32, {* Lattice Mico32 *}
450 .#define bfd_mach_lm32 1 457 .#define bfd_mach_lm32 1
451 . bfd_arch_microblaze,{* Xilinx MicroBlaze. *} 458 . bfd_arch_microblaze,{* Xilinx MicroBlaze. *}
452 . bfd_arch_tilepro, {* Tilera TILEPro *} 459 . bfd_arch_tilepro, {* Tilera TILEPro *}
453 . bfd_arch_tilegx, {* Tilera TILE-Gx *} 460 . bfd_arch_tilegx, {* Tilera TILE-Gx *}
454 .#define bfd_mach_tilepro 1 461 .#define bfd_mach_tilepro 1
455 .#define bfd_mach_tilegx 1 462 .#define bfd_mach_tilegx 1
463 .#define bfd_mach_tilegx32 2
456 . bfd_arch_last 464 . bfd_arch_last
457 . }; 465 . };
458 */ 466 */
459 467
460 /* 468 /*
461 SUBSECTION 469 SUBSECTION
462 bfd_arch_info 470 bfd_arch_info
463 471
464 DESCRIPTION 472 DESCRIPTION
465 This structure contains information on architectures for use 473 This structure contains information on architectures for use
(...skipping 12 matching lines...) Expand all
478 . unsigned int section_align_power; 486 . unsigned int section_align_power;
479 . {* TRUE if this is the default machine for the architecture. 487 . {* TRUE if this is the default machine for the architecture.
480 . The default arch should be the first entry for an arch so that 488 . The default arch should be the first entry for an arch so that
481 . all the entries for that arch can be accessed via <<next>>. *} 489 . all the entries for that arch can be accessed via <<next>>. *}
482 . bfd_boolean the_default; 490 . bfd_boolean the_default;
483 . const struct bfd_arch_info * (*compatible) 491 . const struct bfd_arch_info * (*compatible)
484 . (const struct bfd_arch_info *a, const struct bfd_arch_info *b); 492 . (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
485 . 493 .
486 . bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); 494 . bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
487 . 495 .
496 . {* Allocate via bfd_malloc and return a fill buffer of size COUNT. If
497 . IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is
498 . TRUE, the buffer contains code. *}
499 . void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian,
500 . bfd_boolean code);
501 .
488 . const struct bfd_arch_info *next; 502 . const struct bfd_arch_info *next;
489 .} 503 .}
490 .bfd_arch_info_type; 504 .bfd_arch_info_type;
491 . 505 .
492 */ 506 */
493 507
494 extern const bfd_arch_info_type bfd_alpha_arch; 508 extern const bfd_arch_info_type bfd_alpha_arch;
495 extern const bfd_arch_info_type bfd_arc_arch; 509 extern const bfd_arch_info_type bfd_arc_arch;
496 extern const bfd_arch_info_type bfd_arm_arch; 510 extern const bfd_arch_info_type bfd_arm_arch;
497 extern const bfd_arch_info_type bfd_avr_arch; 511 extern const bfd_arch_info_type bfd_avr_arch;
(...skipping 18 matching lines...) Expand all
516 extern const bfd_arch_info_type bfd_ia64_arch; 530 extern const bfd_arch_info_type bfd_ia64_arch;
517 extern const bfd_arch_info_type bfd_ip2k_arch; 531 extern const bfd_arch_info_type bfd_ip2k_arch;
518 extern const bfd_arch_info_type bfd_iq2000_arch; 532 extern const bfd_arch_info_type bfd_iq2000_arch;
519 extern const bfd_arch_info_type bfd_k1om_arch; 533 extern const bfd_arch_info_type bfd_k1om_arch;
520 extern const bfd_arch_info_type bfd_l1om_arch; 534 extern const bfd_arch_info_type bfd_l1om_arch;
521 extern const bfd_arch_info_type bfd_lm32_arch; 535 extern const bfd_arch_info_type bfd_lm32_arch;
522 extern const bfd_arch_info_type bfd_m32c_arch; 536 extern const bfd_arch_info_type bfd_m32c_arch;
523 extern const bfd_arch_info_type bfd_m32r_arch; 537 extern const bfd_arch_info_type bfd_m32r_arch;
524 extern const bfd_arch_info_type bfd_m68hc11_arch; 538 extern const bfd_arch_info_type bfd_m68hc11_arch;
525 extern const bfd_arch_info_type bfd_m68hc12_arch; 539 extern const bfd_arch_info_type bfd_m68hc12_arch;
540 extern const bfd_arch_info_type bfd_m9s12x_arch;
541 extern const bfd_arch_info_type bfd_m9s12xg_arch;
526 extern const bfd_arch_info_type bfd_m68k_arch; 542 extern const bfd_arch_info_type bfd_m68k_arch;
527 extern const bfd_arch_info_type bfd_m88k_arch; 543 extern const bfd_arch_info_type bfd_m88k_arch;
528 extern const bfd_arch_info_type bfd_mcore_arch; 544 extern const bfd_arch_info_type bfd_mcore_arch;
529 extern const bfd_arch_info_type bfd_mep_arch; 545 extern const bfd_arch_info_type bfd_mep_arch;
530 extern const bfd_arch_info_type bfd_mips_arch; 546 extern const bfd_arch_info_type bfd_mips_arch;
531 extern const bfd_arch_info_type bfd_microblaze_arch; 547 extern const bfd_arch_info_type bfd_microblaze_arch;
532 extern const bfd_arch_info_type bfd_mmix_arch; 548 extern const bfd_arch_info_type bfd_mmix_arch;
533 extern const bfd_arch_info_type bfd_mn10200_arch; 549 extern const bfd_arch_info_type bfd_mn10200_arch;
534 extern const bfd_arch_info_type bfd_mn10300_arch; 550 extern const bfd_arch_info_type bfd_mn10300_arch;
535 extern const bfd_arch_info_type bfd_moxie_arch; 551 extern const bfd_arch_info_type bfd_moxie_arch;
(...skipping 22 matching lines...) Expand all
558 extern const bfd_arch_info_type bfd_tic80_arch; 574 extern const bfd_arch_info_type bfd_tic80_arch;
559 extern const bfd_arch_info_type bfd_tilegx_arch; 575 extern const bfd_arch_info_type bfd_tilegx_arch;
560 extern const bfd_arch_info_type bfd_tilepro_arch; 576 extern const bfd_arch_info_type bfd_tilepro_arch;
561 extern const bfd_arch_info_type bfd_v850_arch; 577 extern const bfd_arch_info_type bfd_v850_arch;
562 extern const bfd_arch_info_type bfd_vax_arch; 578 extern const bfd_arch_info_type bfd_vax_arch;
563 extern const bfd_arch_info_type bfd_w65_arch; 579 extern const bfd_arch_info_type bfd_w65_arch;
564 extern const bfd_arch_info_type bfd_we32k_arch; 580 extern const bfd_arch_info_type bfd_we32k_arch;
565 extern const bfd_arch_info_type bfd_xstormy16_arch; 581 extern const bfd_arch_info_type bfd_xstormy16_arch;
566 extern const bfd_arch_info_type bfd_xtensa_arch; 582 extern const bfd_arch_info_type bfd_xtensa_arch;
567 extern const bfd_arch_info_type bfd_xc16x_arch; 583 extern const bfd_arch_info_type bfd_xc16x_arch;
584 extern const bfd_arch_info_type bfd_xgate_arch;
568 extern const bfd_arch_info_type bfd_z80_arch; 585 extern const bfd_arch_info_type bfd_z80_arch;
569 extern const bfd_arch_info_type bfd_z8k_arch; 586 extern const bfd_arch_info_type bfd_z8k_arch;
570 587
571 static const bfd_arch_info_type * const bfd_archures_list[] = 588 static const bfd_arch_info_type * const bfd_archures_list[] =
572 { 589 {
573 #ifdef SELECT_ARCHITECTURES 590 #ifdef SELECT_ARCHITECTURES
574 SELECT_ARCHITECTURES, 591 SELECT_ARCHITECTURES,
575 #else 592 #else
576 &bfd_alpha_arch, 593 &bfd_alpha_arch,
577 &bfd_arc_arch, 594 &bfd_arc_arch,
(...skipping 20 matching lines...) Expand all
598 &bfd_ia64_arch, 615 &bfd_ia64_arch,
599 &bfd_ip2k_arch, 616 &bfd_ip2k_arch,
600 &bfd_iq2000_arch, 617 &bfd_iq2000_arch,
601 &bfd_k1om_arch, 618 &bfd_k1om_arch,
602 &bfd_l1om_arch, 619 &bfd_l1om_arch,
603 &bfd_lm32_arch, 620 &bfd_lm32_arch,
604 &bfd_m32c_arch, 621 &bfd_m32c_arch,
605 &bfd_m32r_arch, 622 &bfd_m32r_arch,
606 &bfd_m68hc11_arch, 623 &bfd_m68hc11_arch,
607 &bfd_m68hc12_arch, 624 &bfd_m68hc12_arch,
625 &bfd_m9s12x_arch,
626 &bfd_m9s12xg_arch,
608 &bfd_m68k_arch, 627 &bfd_m68k_arch,
609 &bfd_m88k_arch, 628 &bfd_m88k_arch,
610 &bfd_mcore_arch, 629 &bfd_mcore_arch,
611 &bfd_mep_arch, 630 &bfd_mep_arch,
612 &bfd_microblaze_arch, 631 &bfd_microblaze_arch,
613 &bfd_mips_arch, 632 &bfd_mips_arch,
614 &bfd_mmix_arch, 633 &bfd_mmix_arch,
615 &bfd_mn10200_arch, 634 &bfd_mn10200_arch,
616 &bfd_mn10300_arch, 635 &bfd_mn10300_arch,
617 &bfd_moxie_arch, 636 &bfd_moxie_arch,
(...skipping 19 matching lines...) Expand all
637 &bfd_tic80_arch, 656 &bfd_tic80_arch,
638 &bfd_tilegx_arch, 657 &bfd_tilegx_arch,
639 &bfd_tilepro_arch, 658 &bfd_tilepro_arch,
640 &bfd_v850_arch, 659 &bfd_v850_arch,
641 &bfd_vax_arch, 660 &bfd_vax_arch,
642 &bfd_w65_arch, 661 &bfd_w65_arch,
643 &bfd_we32k_arch, 662 &bfd_we32k_arch,
644 &bfd_xstormy16_arch, 663 &bfd_xstormy16_arch,
645 &bfd_xtensa_arch, 664 &bfd_xtensa_arch,
646 &bfd_xc16x_arch, 665 &bfd_xc16x_arch,
666 &bfd_xgate_arch,
647 &bfd_z80_arch, 667 &bfd_z80_arch,
648 &bfd_z8k_arch, 668 &bfd_z8k_arch,
649 #endif 669 #endif
650 0 670 0
651 }; 671 };
652 672
653 /* 673 /*
654 FUNCTION 674 FUNCTION
655 bfd_printable_name 675 bfd_printable_name
656 676
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 structure, until the correct back end has determined the real 827 structure, until the correct back end has determined the real
808 architecture of the file. 828 architecture of the file.
809 829
810 .extern const bfd_arch_info_type bfd_default_arch_struct; 830 .extern const bfd_arch_info_type bfd_default_arch_struct;
811 */ 831 */
812 832
813 const bfd_arch_info_type bfd_default_arch_struct = { 833 const bfd_arch_info_type bfd_default_arch_struct = {
814 32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, TRUE, 834 32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, TRUE,
815 bfd_default_compatible, 835 bfd_default_compatible,
816 bfd_default_scan, 836 bfd_default_scan,
837 bfd_arch_default_fill,
817 0, 838 0,
818 }; 839 };
819 840
820 /* 841 /*
821 FUNCTION 842 FUNCTION
822 bfd_set_arch_info 843 bfd_set_arch_info
823 844
824 SYNOPSIS 845 SYNOPSIS
825 void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); 846 void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
826 847
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 unsigned int 1323 unsigned int
1303 bfd_arch_mach_octets_per_byte (enum bfd_architecture arch, 1324 bfd_arch_mach_octets_per_byte (enum bfd_architecture arch,
1304 unsigned long mach) 1325 unsigned long mach)
1305 { 1326 {
1306 const bfd_arch_info_type *ap = bfd_lookup_arch (arch, mach); 1327 const bfd_arch_info_type *ap = bfd_lookup_arch (arch, mach);
1307 1328
1308 if (ap) 1329 if (ap)
1309 return ap->bits_per_byte / 8; 1330 return ap->bits_per_byte / 8;
1310 return 1; 1331 return 1;
1311 } 1332 }
1333
1334 /*
1335 INTERNAL_FUNCTION
1336 bfd_arch_default_fill
1337
1338 SYNOPSIS
1339 void *bfd_arch_default_fill (bfd_size_type count,
1340 bfd_boolean is_bigendian,
1341 bfd_boolean code);
1342
1343 DESCRIPTION
1344 Allocate via bfd_malloc and return a fill buffer of size COUNT.
1345 If IS_BIGENDIAN is TRUE, the order of bytes is big endian. If
1346 CODE is TRUE, the buffer contains code.
1347 */
1348
1349 void *
1350 bfd_arch_default_fill (bfd_size_type count,
1351 bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
1352 bfd_boolean code ATTRIBUTE_UNUSED)
1353 {
1354 void *fill = bfd_malloc (count);
1355 if (fill != NULL)
1356 memset (fill, 0, count);
1357 return fill;
1358 }
OLDNEW
« no previous file with comments | « bfd/archive64.c ('k') | bfd/bfd.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698