OLD | NEW |
1 /* BFD support for the ARC processor | 1 /* BFD support for the ARC processor |
2 Copyright 1994, 1995, 1997, 2001, 2002, 2005, 2007 | 2 Copyright 1994, 1995, 1997, 2001, 2002, 2005, 2007, 2012 |
3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
4 Contributed by Doug Evans (dje@cygnus.com). | 4 Contributed by Doug Evans (dje@cygnus.com). |
5 | 5 |
6 This file is part of BFD, the Binary File Descriptor library. | 6 This file is part of BFD, the Binary File Descriptor library. |
7 | 7 |
8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
11 (at your option) any later version. | 11 (at your option) any later version. |
12 | 12 |
(...skipping 17 matching lines...) Expand all Loading... |
30 32, /* 32 bits in an address */ \ | 30 32, /* 32 bits in an address */ \ |
31 8, /* 8 bits in a byte */ \ | 31 8, /* 8 bits in a byte */ \ |
32 bfd_arch_arc, \ | 32 bfd_arch_arc, \ |
33 mach, \ | 33 mach, \ |
34 "arc", \ | 34 "arc", \ |
35 print_name, \ | 35 print_name, \ |
36 4, /* section alignment power */ \ | 36 4, /* section alignment power */ \ |
37 default_p, \ | 37 default_p, \ |
38 bfd_default_compatible, \ | 38 bfd_default_compatible, \ |
39 bfd_default_scan, \ | 39 bfd_default_scan, \ |
| 40 bfd_arch_default_fill, \ |
40 next, \ | 41 next, \ |
41 } | 42 } |
42 | 43 |
43 static const bfd_arch_info_type arch_info_struct[] = | 44 static const bfd_arch_info_type arch_info_struct[] = |
44 { | 45 { |
45 ARC ( bfd_mach_arc_5, "arc5", FALSE, &arch_info_struct[1] ), | 46 ARC ( bfd_mach_arc_5, "arc5", FALSE, &arch_info_struct[1] ), |
46 ARC ( bfd_mach_arc_5, "base", FALSE, &arch_info_struct[2] ), | 47 ARC ( bfd_mach_arc_5, "base", FALSE, &arch_info_struct[2] ), |
47 ARC ( bfd_mach_arc_6, "arc6", FALSE, &arch_info_struct[3] ), | 48 ARC ( bfd_mach_arc_6, "arc6", FALSE, &arch_info_struct[3] ), |
48 ARC ( bfd_mach_arc_7, "arc7", FALSE, &arch_info_struct[4] ), | 49 ARC ( bfd_mach_arc_7, "arc7", FALSE, &arch_info_struct[4] ), |
49 ARC ( bfd_mach_arc_8, "arc8", FALSE, NULL ), | 50 ARC ( bfd_mach_arc_8, "arc8", FALSE, NULL ), |
50 }; | 51 }; |
51 | 52 |
52 const bfd_arch_info_type bfd_arc_arch = | 53 const bfd_arch_info_type bfd_arc_arch = |
53 ARC ( bfd_mach_arc_6, "arc", TRUE, &arch_info_struct[0] ); | 54 ARC ( bfd_mach_arc_6, "arc", TRUE, &arch_info_struct[0] ); |
54 | 55 |
55 /* Utility routines. */ | 56 /* Utility routines. */ |
56 | 57 |
57 /* Given cpu type NAME, return its bfd_mach_arc_xxx value. | 58 /* Given cpu type NAME, return its bfd_mach_arc_xxx value. |
58 Returns -1 if not found. */ | 59 Returns -1 if not found. */ |
59 | 60 |
60 int arc_get_mach PARAMS ((char *)); | 61 int arc_get_mach (char *); |
61 | 62 |
62 int | 63 int |
63 arc_get_mach (name) | 64 arc_get_mach (char *name) |
64 char *name; | |
65 { | 65 { |
66 const bfd_arch_info_type *p; | 66 const bfd_arch_info_type *p; |
67 | 67 |
68 for (p = &bfd_arc_arch; p != NULL; p = p->next) | 68 for (p = &bfd_arc_arch; p != NULL; p = p->next) |
69 if (strcmp (name, p->printable_name) == 0) | 69 if (strcmp (name, p->printable_name) == 0) |
70 return p->mach; | 70 return p->mach; |
71 return -1; | 71 return -1; |
72 } | 72 } |
OLD | NEW |