diff options
author | obrien <obrien@FreeBSD.org> | 2002-01-27 12:00:11 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-01-27 12:00:11 +0000 |
commit | fc89183cdc6be5afa8deb7250fd15a20832ab528 (patch) | |
tree | 5c493199a70976c54e1b9c6a7804a3de85b43e84 /contrib/binutils/bfd/archures.c | |
parent | 94820fd8060f6f43089d1a3ddb8a482402e7e494 (diff) | |
download | FreeBSD-src-fc89183cdc6be5afa8deb7250fd15a20832ab528.zip FreeBSD-src-fc89183cdc6be5afa8deb7250fd15a20832ab528.tar.gz |
Enlist the FreeBSD-CURRENT users as testers of what is to become Binutils
version 2.12.0. These bits are taken from the FSF anoncvs repo on
27-January-2002 03:41 PST.
Diffstat (limited to 'contrib/binutils/bfd/archures.c')
-rw-r--r-- | contrib/binutils/bfd/archures.c | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c index 8f7f9de..19d862e 100644 --- a/contrib/binutils/bfd/archures.c +++ b/contrib/binutils/bfd/archures.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" #include "libbfd.h" -#include <ctype.h> +#include "safe-ctype.h" /* @@ -137,11 +137,10 @@ DESCRIPTION .#define bfd_mach_mips10000 10000 .#define bfd_mach_mips12000 12000 .#define bfd_mach_mips16 16 -.#define bfd_mach_mips32 32 -.#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *} .#define bfd_mach_mips5 5 -.#define bfd_mach_mips64 64 .#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *} +.#define bfd_mach_mipsisa32 32 +.#define bfd_mach_mipsisa64 64 . bfd_arch_i386, {* Intel 386 *} .#define bfd_mach_i386_i386 0 .#define bfd_mach_i386_i8086 1 @@ -161,6 +160,7 @@ DESCRIPTION .#define bfd_mach_h8300 1 .#define bfd_mach_h8300h 2 .#define bfd_mach_h8300s 3 +. bfd_arch_pdp11, {* DEC PDP-11 *} . bfd_arch_powerpc, {* PowerPC *} .#define bfd_mach_ppc 0 .#define bfd_mach_ppc_403 403 @@ -254,6 +254,13 @@ DESCRIPTION .#define bfd_mach_avr4 4 .#define bfd_mach_avr5 5 . bfd_arch_cris, {* Axis CRIS *} +. bfd_arch_s390, {* IBM s390 *} +.#define bfd_mach_s390_esa 0 +.#define bfd_mach_s390_esame 1 +. bfd_arch_openrisc, {* OpenRISC *} +. bfd_arch_mmix, {* Donald Knuth's educational processor *} +. bfd_arch_xstormy16, +.#define bfd_mach_xstormy16 0 . bfd_arch_last . }; */ @@ -311,6 +318,7 @@ extern const bfd_arch_info_type bfd_m88k_arch; extern const bfd_arch_info_type bfd_mips_arch; extern const bfd_arch_info_type bfd_mn10200_arch; extern const bfd_arch_info_type bfd_mn10300_arch; +extern const bfd_arch_info_type bfd_pdp11_arch; extern const bfd_arch_info_type bfd_powerpc_arch; extern const bfd_arch_info_type bfd_rs6000_arch; extern const bfd_arch_info_type bfd_pj_arch; @@ -329,6 +337,10 @@ extern const bfd_arch_info_type bfd_fr30_arch; extern const bfd_arch_info_type bfd_mcore_arch; extern const bfd_arch_info_type bfd_avr_arch; extern const bfd_arch_info_type bfd_ia64_arch; +extern const bfd_arch_info_type bfd_s390_arch; +extern const bfd_arch_info_type bfd_openrisc_arch; +extern const bfd_arch_info_type bfd_mmix_arch; +extern const bfd_arch_info_type bfd_xstormy16_arch; static const bfd_arch_info_type * const bfd_archures_list[] = { #ifdef SELECT_ARCHITECTURES @@ -356,6 +368,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = { &bfd_mips_arch, &bfd_mn10200_arch, &bfd_mn10300_arch, + &bfd_pdp11_arch, &bfd_powerpc_arch, &bfd_rs6000_arch, &bfd_sh_arch, @@ -373,6 +386,10 @@ static const bfd_arch_info_type * const bfd_archures_list[] = { &bfd_mcore_arch, &bfd_avr_arch, &bfd_ia64_arch, + &bfd_s390_arch, + &bfd_openrisc_arch, + &bfd_mmix_arch, + &bfd_xstormy16_arch, #endif 0 }; @@ -448,6 +465,7 @@ bfd_arch_list () const char **name_ptr; const char **name_list; const bfd_arch_info_type * const *app; + bfd_size_type amt; /* Determine the number of architectures. */ vec_length = 0; @@ -460,8 +478,8 @@ bfd_arch_list () } } - name_list = (const char **) - bfd_malloc ((vec_length + 1) * sizeof (char **)); + amt = (vec_length + 1) * sizeof (char **); + name_list = (const char **) bfd_malloc (amt); if (name_list == NULL) return NULL; @@ -717,7 +735,7 @@ DESCRIPTION boolean bfd_default_scan (info, string) - const struct bfd_arch_info *info; + const bfd_arch_info_type *info; const char *string; { const char *ptr_src; @@ -741,7 +759,7 @@ bfd_default_scan (info, string) printable_name_colon = strchr (info->printable_name, ':'); if (printable_name_colon == NULL) { - int strlen_arch_name = strlen (info->arch_name); + size_t strlen_arch_name = strlen (info->arch_name); if (strncasecmp (string, info->arch_name, strlen_arch_name) == 0) { if (string[strlen_arch_name] == ':') @@ -763,7 +781,7 @@ bfd_default_scan (info, string) Attempt to match: <arch> <mach>? */ if (printable_name_colon != NULL) { - int colon_index = printable_name_colon - info->printable_name; + size_t colon_index = printable_name_colon - info->printable_name; if (strncasecmp (string, info->printable_name, colon_index) == 0 && strcasecmp (string + colon_index, info->printable_name + colon_index + 1) == 0) @@ -802,7 +820,7 @@ bfd_default_scan (info, string) } number = 0; - while (isdigit ((unsigned char) *ptr_src)) + while (ISDIGIT (*ptr_src)) { number = number * 10 + *ptr_src - '0'; ptr_src++; |