2000-11-16 Kazu Hirata <kazu@hxi.com>

* cpu-a29k.c: Fix formatting.
	* cpu-alpha.c: Likewise.
	* cpu-arm.c: Likewise.
	* cpu-avr.c: Likewise.
	* cpu-d10v.c: Likewise.
	* cpu-h8500.c: Likewise.
	* cpu-hppa.c: Likewise.
	* cpu-i370.c: Likewise.
	* cpu-i386.c: Likewise.
	* cpu-i960.c: Likewise.
	* cpu-ia64-opc.c: Likewise.
	* cpu-ia64.c: Likewise.
	* cpu-m32r.c: Likewise.
	* cpu-m68hc11.c: Likewise.
	* cpu-m68hc12.c: Likewise.
	* cpu-m68k.c: Likewise.
	* cpu-m88k.c: Likewise.
	* cpu-mips.c: Likewise.
	* cpu-ns32k.c: Likewise.
	* cpu-pj.c: Likewise.
	* cpu-powerpc.c: Likewise.
	* cpu-sh.c: Likewise.
	* cpu-sparc.c: Likewise.
	* cpu-tic54x.c: Likewise.
	* cpu-v850.c: Likewise.
	* cpu-vax.c: Likewise.
	* cpu-w65.c: Likewise.
	* cpu-we32k.c: Likewise.
	* cpu-z8k.c: Likewise.
This commit is contained in:
Kazu Hirata
2000-11-16 20:48:09 +00:00
parent 98591c73cf
commit 71f6b58639
29 changed files with 183 additions and 194 deletions

View File

@ -1,6 +1,35 @@
2000-11-16 Kazu Hirata <kazu@hxi.com> 2000-11-16 Kazu Hirata <kazu@hxi.com>
* dwarf1.c: Fix formatting. * cpu-a29k.c: Fix formatting.
* cpu-alpha.c: Likewise.
* cpu-arm.c: Likewise.
* cpu-avr.c: Likewise.
* cpu-d10v.c: Likewise.
* cpu-h8500.c: Likewise.
* cpu-hppa.c: Likewise.
* cpu-i370.c: Likewise.
* cpu-i386.c: Likewise.
* cpu-i960.c: Likewise.
* cpu-ia64-opc.c: Likewise.
* cpu-ia64.c: Likewise.
* cpu-m32r.c: Likewise.
* cpu-m68hc11.c: Likewise.
* cpu-m68hc12.c: Likewise.
* cpu-m68k.c: Likewise.
* cpu-m88k.c: Likewise.
* cpu-mips.c: Likewise.
* cpu-ns32k.c: Likewise.
* cpu-pj.c: Likewise.
* cpu-powerpc.c: Likewise.
* cpu-sh.c: Likewise.
* cpu-sparc.c: Likewise.
* cpu-tic54x.c: Likewise.
* cpu-v850.c: Likewise.
* cpu-vax.c: Likewise.
* cpu-w65.c: Likewise.
* cpu-we32k.c: Likewise.
* cpu-z8k.c: Likewise.
* dwarf1.c: Likewise.
* dwarf2.c: Likewise. * dwarf2.c: Likewise.
2000-11-15 Kazu Hirata <kazu@hxi.com> 2000-11-15 Kazu Hirata <kazu@hxi.com>

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_a29k_arch =
"a29k", "a29k",
4, 4,
true, /* the one and only */ true, /* the one and only */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
0, 0,
}; };

View File

@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NN(index) (&arch_info_struct[index]) #define NN(index) (&arch_info_struct[index])
/* These exist only so that we can resonably disassemble PALcode. */ /* These exist only so that we can resonably disassemble PALcode. */
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)), N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)),
N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)), N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)),

View File

@ -47,7 +47,7 @@ compatible (a,b)
it can be polymorphed into the other */ it can be polymorphed into the other */
if (a->the_default) if (a->the_default)
return b; return b;
if (b->the_default) if (b->the_default)
return a; return a;
@ -95,7 +95,7 @@ processors[] =
{ bfd_mach_arm_4, "strongarm1100" }, { bfd_mach_arm_4, "strongarm1100" },
}; };
static boolean static boolean
scan (info, string) scan (info, string)
const struct bfd_arch_info * info; const struct bfd_arch_info * info;
const char * string; const char * string;
@ -119,16 +119,15 @@ scan (info, string)
/* Finally check for the default architecture */ /* Finally check for the default architecture */
if (strcasecmp (string, "arm") == 0) if (strcasecmp (string, "arm") == 0)
return info->the_default; return info->the_default;
return false; return false;
} }
#define N(number, print, default, next) \ #define N(number, print, default, next) \
{ 32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, scan, next } { 32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, scan, next }
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N( bfd_mach_arm_2, "armv2", false, & arch_info_struct[1] ), N( bfd_mach_arm_2, "armv2", false, & arch_info_struct[1] ),
N( bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2] ), N( bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2] ),
N( bfd_mach_arm_3, "armv3", false, & arch_info_struct[3] ), N( bfd_mach_arm_3, "armv3", false, & arch_info_struct[3] ),

View File

@ -22,11 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
static const bfd_arch_info_type *compatible static const bfd_arch_info_type *compatible
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
#define N(addr_bits, machine, print, default, next) \ #define N(addr_bits, machine, print, default, next) \
{ \ { \
8, /* 8 bits in a word */ \ 8, /* 8 bits in a word */ \

View File

@ -22,50 +22,50 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
static const bfd_arch_info_type d10v_ts3_info = static const bfd_arch_info_type d10v_ts3_info =
{
16, /* 16 bits in a word */
16, /* 16 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_d10v,
bfd_mach_d10v_ts3,
"d10v",
"d10v:ts3",
4, /* section alignment power */
false,
bfd_default_compatible,
bfd_default_scan,
0,
};
static const bfd_arch_info_type d10v_ts2_info =
{ {
16, /* 16 bits in a word */ 16, /* 16 bits in a word */
16, /* 16 bits in an address */ 16, /* 16 bits in an address */
8, /* 8 bits in a byte */ 8, /* 8 bits in a byte */
bfd_arch_d10v, bfd_arch_d10v,
bfd_mach_d10v_ts2, bfd_mach_d10v_ts3,
"d10v", "d10v",
"d10v:ts2", "d10v:ts3",
4, /* section alignment power */ 4, /* section alignment power */
false, false,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
&d10v_ts3_info, 0,
}; };
const bfd_arch_info_type bfd_d10v_arch = static const bfd_arch_info_type d10v_ts2_info =
{ {
16, /* 16 bits in a word */ 16, /* 16 bits in a word */
16, /* 16 bits in an address */ 16, /* 16 bits in an address */
8, /* 8 bits in a byte */ 8, /* 8 bits in a byte */
bfd_arch_d10v, bfd_arch_d10v,
bfd_mach_d10v, bfd_mach_d10v_ts2,
"d10v", "d10v",
"d10v", "d10v:ts2",
4, /* section alignment power */ 4, /* section alignment power */
true, false,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
&d10v_ts2_info, &d10v_ts3_info,
};
const bfd_arch_info_type bfd_d10v_arch =
{
16, /* 16 bits in a word */
16, /* 16 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_d10v,
bfd_mach_d10v,
"d10v",
"d10v",
4, /* section alignment power */
true,
bfd_default_compatible,
bfd_default_scan,
&d10v_ts2_info,
}; };

View File

@ -24,11 +24,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if 0 #if 0
/* /*
Relocations for the Z8K Relocations for the Z8K
*/ */
static bfd_reloc_status_type static bfd_reloc_status_type
howto16_callback (abfd, reloc_entry, symbol_in, data, howto16_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd) ignore_input_section, ignore_bfd)
bfd *abfd; bfd *abfd;
@ -50,8 +50,7 @@ howto16_callback (abfd, reloc_entry, symbol_in, data,
return bfd_reloc_ok; return bfd_reloc_ok;
} }
static bfd_reloc_status_type
static bfd_reloc_status_type
howto8_callback (abfd, reloc_entry, symbol_in, data, howto8_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd) ignore_input_section, ignore_bfd)
bfd *abfd; bfd *abfd;
@ -73,8 +72,7 @@ howto8_callback (abfd, reloc_entry, symbol_in, data,
return bfd_reloc_ok; return bfd_reloc_ok;
} }
static bfd_reloc_status_type
static bfd_reloc_status_type
howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data, howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd) ignore_input_section, ignore_bfd)
bfd *abfd; bfd *abfd;
@ -88,7 +86,7 @@ howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
bfd_vma addr = reloc_entry->address; bfd_vma addr = reloc_entry->address;
long x = bfd_get_8(abfd, (bfd_byte *)data + addr); long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
abort(); abort ();
HOWTO_PREPARE(relocation, symbol_in); HOWTO_PREPARE(relocation, symbol_in);
x = (x + relocation + reloc_entry->addend); x = (x + relocation + reloc_entry->addend);
@ -97,7 +95,7 @@ howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
return bfd_reloc_ok; return bfd_reloc_ok;
} }
static bfd_reloc_status_type static bfd_reloc_status_type
howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data, howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd) ignore_input_section, ignore_bfd)
bfd *abfd; bfd *abfd;
@ -110,7 +108,7 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
long relocation = 0; long relocation = 0;
bfd_vma addr = reloc_entry->address; bfd_vma addr = reloc_entry->address;
long x = bfd_get_8(abfd, (bfd_byte *)data + addr); long x = bfd_get_8(abfd, (bfd_byte *)data + addr);
abort(); abort ();
HOWTO_PREPARE(relocation, symbol_in); HOWTO_PREPARE(relocation, symbol_in);
x = (x + relocation + reloc_entry->addend); x = (x + relocation + reloc_entry->addend);
@ -119,8 +117,6 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
return bfd_reloc_ok; return bfd_reloc_ok;
} }
static reloc_howto_type howto_16 static reloc_howto_type howto_16
= NEWHOWTO(howto16_callback,"abs16",1,false,false); = NEWHOWTO(howto16_callback,"abs16",1,false,false);
static reloc_howto_type howto_8 static reloc_howto_type howto_8
@ -132,7 +128,6 @@ static reloc_howto_type howto_8_FFnn
static reloc_howto_type howto_8_pcrel static reloc_howto_type howto_8_pcrel
= NEWHOWTO(howto8_pcrel_callback,"pcrel8",0,false,true); = NEWHOWTO(howto8_pcrel_callback,"pcrel8",0,false,true);
static reloc_howto_type * static reloc_howto_type *
local_bfd_reloc_type_lookup (arch, code) local_bfd_reloc_type_lookup (arch, code)
const struct bfd_arch_info *arch; const struct bfd_arch_info *arch;
@ -154,7 +149,7 @@ local_bfd_reloc_type_lookup (arch, code)
int bfd_default_scan_num_mach(); int bfd_default_scan_num_mach();
static boolean static boolean
scan_mach (info, string) scan_mach (info, string)
const struct bfd_arch_info *info ATTRIBUTE_UNUSED; const struct bfd_arch_info *info ATTRIBUTE_UNUSED;
const char *string; const char *string;
@ -166,7 +161,6 @@ scan_mach (info, string)
return false; return false;
} }
#if 0 /* not used currently */ #if 0 /* not used currently */
/* This routine is provided two arch_infos and returns whether /* This routine is provided two arch_infos and returns whether
they'd be compatible */ they'd be compatible */

View File

@ -46,7 +46,7 @@ i370_compatible (a, b)
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
/* hack alert: old old machines are really 16 and 24 bit arch ... */ /* hack alert: old old machines are really 16 and 24 bit arch ... */
{ {
32, /* 32 bits in a word */ 32, /* 32 bits in a word */
32, /* 32 bits in an address */ 32, /* 32 bits in an address */

View File

@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_i386_arch_intel_syntax =
"i386:intel", "i386:intel",
3, 3,
true, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
0, 0,
}; };
@ -47,7 +47,7 @@ static const bfd_arch_info_type i8086_arch =
"i8086", "i8086",
3, 3,
false, false,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
&bfd_i386_arch_intel_syntax, &bfd_i386_arch_intel_syntax,
}; };
@ -63,7 +63,7 @@ const bfd_arch_info_type bfd_i386_arch =
"i386", "i386",
3, 3,
true, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
&i8086_arch, &i8086_arch,
}; };

View File

@ -18,12 +18,10 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h" #include "bfd.h"
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
/* This routine is provided a string, and tries to work out if it /* This routine is provided a string, and tries to work out if it
could possibly refer to the i960 machine pointed at in the could possibly refer to the i960 machine pointed at in the
info_struct pointer */ info_struct pointer */
@ -36,7 +34,7 @@ scan_960_mach (ap, string)
unsigned long machine; unsigned long machine;
int i; int i;
int fail_because_not_80960 = false; int fail_because_not_80960 = false;
for (i = 0; i < strlen (string); i ++) for (i = 0; i < strlen (string); i ++)
string[i] = tolower (string[i]); string[i] = tolower (string[i]);
@ -48,7 +46,7 @@ scan_960_mach (ap, string)
/* i960 on it's own means core to us. */ /* i960 on it's own means core to us. */
if (* string == 0) if (* string == 0)
return ap->mach == bfd_mach_i960_core; return ap->mach == bfd_mach_i960_core;
/* "i960:*" is valid, anything else is not. */ /* "i960:*" is valid, anything else is not. */
if (* string != ':') if (* string != ':')
return false; return false;
@ -68,10 +66,10 @@ scan_960_mach (ap, string)
/* No match, can't be us. */ /* No match, can't be us. */
else else
return false; return false;
if (* string == '\0') if (* string == '\0')
return false; return false;
if (string[0] == 'c' && string[1] == 'o' && string[2] == 'r' && if (string[0] == 'c' && string[1] == 'o' && string[2] == 'r' &&
string[3] == 'e' && string[4] == '\0') string[3] == 'e' && string[4] == '\0')
machine = bfd_mach_i960_core; machine = bfd_mach_i960_core;
@ -104,15 +102,13 @@ scan_960_mach (ap, string)
if (fail_because_not_80960) if (fail_because_not_80960)
return false; return false;
if (machine == ap->mach) if (machine == ap->mach)
return true; return true;
return false; return false;
} }
/* This routine is provided two arch_infos and works out the i960 /* This routine is provided two arch_infos and works out the i960
machine which would be compatible with both and returns a pointer machine which would be compatible with both and returns a pointer
to its info structure */ to its info structure */
@ -124,17 +120,17 @@ compatible (a,b)
{ {
/* The i960 has distinct subspecies which may not interbreed: /* The i960 has distinct subspecies which may not interbreed:
CORE CA CORE CA
CORE KA KB MC XA CORE KA KB MC XA
CORE HX JX CORE HX JX
Any architecture on the same line is compatible, the one on Any architecture on the same line is compatible, the one on
the right is the least restrictive. the right is the least restrictive.
We represent this information in an array, each machine to a side */ We represent this information in an array, each machine to a side */
#define ERROR 0 #define ERROR 0
#define CORE bfd_mach_i960_core /*1*/ #define CORE bfd_mach_i960_core /*1*/
#define KA bfd_mach_i960_ka_sa /*2*/ #define KA bfd_mach_i960_ka_sa /*2*/
#define KB bfd_mach_i960_kb_sb /*3*/ #define KB bfd_mach_i960_kb_sb /*3*/
#define MC bfd_mach_i960_mc /*4*/ #define MC bfd_mach_i960_mc /*4*/
#define XA bfd_mach_i960_xa /*5*/ #define XA bfd_mach_i960_xa /*5*/
@ -143,7 +139,7 @@ compatible (a,b)
#define HX bfd_mach_i960_hx /*8*/ #define HX bfd_mach_i960_hx /*8*/
#define MAX_ARCH ((int)HX) #define MAX_ARCH ((int)HX)
static CONST unsigned long matrix[MAX_ARCH+1][MAX_ARCH+1] = static CONST unsigned long matrix[MAX_ARCH+1][MAX_ARCH+1] =
{ {
{ ERROR, CORE, KA, KB, MC, XA, CA, JX, HX }, { ERROR, CORE, KA, KB, MC, XA, CA, JX, HX },
{ CORE, CORE, KA, KB, MC, XA, CA, JX, HX }, { CORE, CORE, KA, KB, MC, XA, CA, JX, HX },
@ -156,25 +152,22 @@ compatible (a,b)
{ HX, HX, ERROR, ERROR, ERROR, ERROR, ERROR, HX, HX }, { HX, HX, ERROR, ERROR, ERROR, ERROR, ERROR, HX, HX },
}; };
if (a->arch != b->arch || matrix[a->mach][b->mach] == ERROR)
if (a->arch != b->arch || matrix[a->mach][b->mach] == ERROR)
{ {
return NULL; return NULL;
} }
else else
{ {
return (a->mach == matrix[a->mach][b->mach]) ? a : b; return (a->mach == matrix[a->mach][b->mach]) ? a : b;
} }
} }
int bfd_default_scan_num_mach(); int bfd_default_scan_num_mach();
#define N(a,b,d,n) \ #define N(a,b,d,n) \
{ 32, 32, 8,bfd_arch_i960,a,"i960",b,3,d,compatible,scan_960_mach,n,} { 32, 32, 8,bfd_arch_i960,a,"i960",b,3,d,compatible,scan_960_mach,n,}
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N(bfd_mach_i960_ka_sa,"i960:ka_sa",false, &arch_info_struct[1]), N(bfd_mach_i960_ka_sa,"i960:ka_sa",false, &arch_info_struct[1]),
N(bfd_mach_i960_kb_sb,"i960:kb_sb",false, &arch_info_struct[2]), N(bfd_mach_i960_kb_sb,"i960:kb_sb",false, &arch_info_struct[2]),
N(bfd_mach_i960_mc, "i960:mc", false, &arch_info_struct[3]), N(bfd_mach_i960_mc, "i960:mc", false, &arch_info_struct[3]),

View File

@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Logically, this code should be part of libopcode but since some of /* Logically, this code should be part of libopcode but since some of
the operand insertion/extraction functions help bfd to implement the operand insertion/extraction functions help bfd to implement
relocations, this code is included as part of elf64-ia64.c. This relocations, this code is included as part of elf64-ia64.c. This
@ -555,7 +554,7 @@ const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT] =
{ ABS, ins_imms16,ext_imms16,0, {{27, 6}, { 1, 36}}, 0, /* IMM44 */ { ABS, ins_imms16,ext_imms16,0, {{27, 6}, { 1, 36}}, 0, /* IMM44 */
"a 44-bit unsigned (least 16 bits ignored/zeroes)" }, "a 44-bit unsigned (least 16 bits ignored/zeroes)" },
{ ABS, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0, /* IMMU62 */ { ABS, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0, /* IMMU62 */
"a 62-bit unsigned" }, "a 62-bit unsigned" },
{ ABS, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0, /* IMMU64 */ { ABS, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0, /* IMMU64 */
"a 64-bit unsigned" }, "a 64-bit unsigned" },
{ ABS, ins_inc3, ext_inc3, 0, {{ 3, 13}}, SDEC, /* INC3 */ { ABS, ins_inc3, ext_inc3, 0, {{ 3, 13}}, SDEC, /* INC3 */
@ -580,7 +579,7 @@ const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT] =
{{ 7, 6}, {13, 20}, { 1, 36}}, 0, {{ 7, 6}, {13, 20}, { 1, 36}}, 0,
"a branch target" }, "a branch target" },
{ REL, ins_imms4, ext_imms4, 0, {{20, 13}, { 1, 36}}, 0, /* TGT25c */ { REL, ins_imms4, ext_imms4, 0, {{20, 13}, { 1, 36}}, 0, /* TGT25c */
"a branch target" }, "a branch target" },
{ REL, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0, /* TGT64 */ { REL, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0, /* TGT64 */
"a branch target" }, "a branch target" },
}; };

View File

@ -18,7 +18,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h" #include "bfd.h"
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
@ -34,7 +33,7 @@ const bfd_arch_info_type bfd_ia64_elf32_arch =
"ia64-elf32", "ia64-elf32",
3, /* log2 of section alignment */ 3, /* log2 of section alignment */
true, /* the one and only */ true, /* the one and only */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
0, 0,
}; };
@ -50,7 +49,7 @@ const bfd_arch_info_type bfd_ia64_arch =
"ia64-elf64", "ia64-elf64",
3, /* log2 of section alignment */ 3, /* log2 of section alignment */
true, /* the one and only */ true, /* the one and only */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
&bfd_ia64_elf32_arch, &bfd_ia64_elf32_arch,
}; };

View File

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NEXT NULL #define NEXT NULL
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (bfd_mach_m32rx, "m32rx", false, NULL) N (bfd_mach_m32rx, "m32rx", false, NULL)
}; };

View File

@ -21,19 +21,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
const bfd_arch_info_type bfd_m68hc11_arch = const bfd_arch_info_type bfd_m68hc11_arch =
{ {
16, /* 16 bits in a word */ 16, /* 16 bits in a word */
16, /* 16 bits in an address */ 16, /* 16 bits in an address */
8, /* 8 bits in a byte */ 8, /* 8 bits in a byte */
bfd_arch_m68hc11, bfd_arch_m68hc11,
0, 0,
"m68hc11", "m68hc11",
"m68hc11", "m68hc11",
4, /* section alignment power */ 4, /* section alignment power */
true, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
0, 0,
}; };

View File

@ -21,18 +21,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
const bfd_arch_info_type bfd_m68hc12_arch = const bfd_arch_info_type bfd_m68hc12_arch =
{ {
16, /* 16 bits in a word */ 16, /* 16 bits in a word */
16, /* 16 bits in an address */ 16, /* 16 bits in an address */
8, /* 8 bits in a byte */ 8, /* 8 bits in a byte */
bfd_arch_m68hc12, bfd_arch_m68hc12,
0, 0,
"m68hc12", "m68hc12",
"m68hc12", "m68hc12",
4, /* section alignment power */ 4, /* section alignment power */
true, true,
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
0, 0,
}; };

View File

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
{ 32, 32, 8, bfd_arch_m68k, name, "m68k",print,2,d,bfd_default_compatible,bfd_default_scan, next, } { 32, 32, 8, bfd_arch_m68k, name, "m68k",print,2,d,bfd_default_compatible,bfd_default_scan, next, }
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]), N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]),
N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]), N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]),
N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]), N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]),

View File

@ -22,9 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
const bfd_arch_info_type bfd_m88k_arch = const bfd_arch_info_type bfd_m88k_arch =
{ {
32, /* 32 bits in a word */ 32, /* 32 bits in a word */
@ -36,7 +33,7 @@ const bfd_arch_info_type bfd_m88k_arch =
"m88k:88100", "m88k:88100",
3, 3,
true, /* the one and only */ true, /* the one and only */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
0, 0,
}; };

View File

@ -39,28 +39,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
} }
enum { enum {
I_mips3000, I_mips3000,
I_mips3900, I_mips3900,
I_mips4000, I_mips4000,
I_mips4010, I_mips4010,
I_mips4100, I_mips4100,
I_mips4111, I_mips4111,
I_mips4300, I_mips4300,
I_mips4400, I_mips4400,
I_mips4600, I_mips4600,
I_mips4650, I_mips4650,
I_mips5000, I_mips5000,
I_mips6000, I_mips6000,
I_mips8000, I_mips8000,
I_mips10000, I_mips10000,
I_mips4K, I_mips4K,
I_mips16 I_mips16
}; };
#define NN(index) (&arch_info_struct[(index)+1]) #define NN(index) (&arch_info_struct[(index)+1])
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (32, 32, bfd_mach_mips3000, "mips:3000", false, NN(I_mips3000)), N (32, 32, bfd_mach_mips3000, "mips:3000", false, NN(I_mips3000)),
N (32, 32, bfd_mach_mips3900, "mips:3900", false, NN(I_mips3900)), N (32, 32, bfd_mach_mips3900, "mips:3900", false, NN(I_mips3900)),

View File

@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
{ 32, 32, 8, bfd_arch_ns32k, machine, "ns32k",printable,3,d,bfd_default_compatible,bfd_default_scan, next, } { 32, 32, 8, bfd_arch_ns32k, machine, "ns32k",printable,3,d,bfd_default_compatible,bfd_default_scan, next, }
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N(32532,"ns32k:32532",true, 0), /* the word ns32k will match this too */ N(32532,"ns32k:32532",true, 0), /* the word ns32k will match this too */
}; };
@ -200,7 +200,6 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
&& output_bfd == (bfd *) NULL) && output_bfd == (bfd *) NULL)
flag = bfd_reloc_undefined; flag = bfd_reloc_undefined;
/* Is the address of the relocation really within the section? */ /* Is the address of the relocation really within the section? */
if (reloc_entry->address > input_section->_cooked_size) if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange; return bfd_reloc_outofrange;
@ -214,7 +213,6 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
else else
relocation = symbol->value; relocation = symbol->value;
reloc_target_output_section = symbol->section->output_section; reloc_target_output_section = symbol->section->output_section;
/* Convert input-section-relative symbol value to absolute. */ /* Convert input-section-relative symbol value to absolute. */

View File

@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
static boolean
static boolean
scan_mach (info, string) scan_mach (info, string)
const struct bfd_arch_info *info; const struct bfd_arch_info *info;
const char *string; const char *string;
@ -33,7 +32,6 @@ scan_mach (info, string)
return false; return false;
} }
#if 0 #if 0
/* This routine is provided two arch_infos and returns whether /* This routine is provided two arch_infos and returns whether
they'd be compatible */ they'd be compatible */
@ -49,8 +47,7 @@ compatible (a,b)
} }
#endif #endif
static const bfd_arch_info_type arch_info_struct[] =
static const bfd_arch_info_type arch_info_struct[] =
{ {
{ {
32, /* 32 bits in a word */ 32, /* 32 bits in a word */

View File

@ -59,7 +59,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc:603", "powerpc:603",
3, 3,
false, /* not the default */ false, /* not the default */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[1] &arch_info_struct[1]
}, },
@ -73,7 +73,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc:EC603e", "powerpc:EC603e",
3, 3,
false, /* not the default */ false, /* not the default */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[2] &arch_info_struct[2]
}, },
@ -87,7 +87,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc:604", "powerpc:604",
3, 3,
false, /* not the default */ false, /* not the default */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[3] &arch_info_struct[3]
}, },
@ -101,7 +101,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc:403", "powerpc:403",
3, 3,
false, /* not the default */ false, /* not the default */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[4] &arch_info_struct[4]
}, },
@ -115,11 +115,11 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc:601", "powerpc:601",
3, 3,
false, /* not the default */ false, /* not the default */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[5] &arch_info_struct[5]
}, },
{ {
64, /* 64 bits in a word */ 64, /* 64 bits in a word */
64, /* 64 bits in an address */ 64, /* 64 bits in an address */
8, /* 8 bits in a byte */ 8, /* 8 bits in a byte */
@ -129,7 +129,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc:620", "powerpc:620",
3, 3,
false, /* not the default */ false, /* not the default */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[6] &arch_info_struct[6]
}, },
@ -230,7 +230,7 @@ const bfd_arch_info_type bfd_powerpc_arch =
"powerpc:common", "powerpc:common",
3, 3,
true, /* the default */ true, /* the default */
powerpc_compatible, powerpc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[0] &arch_info_struct[0]
}; };

View File

@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
static boolean
static boolean
scan_mach (info, string) scan_mach (info, string)
const struct bfd_arch_info *info; const struct bfd_arch_info *info;
const char *string; const char *string;
@ -33,7 +32,6 @@ scan_mach (info, string)
return false; return false;
} }
#if 0 #if 0
/* This routine is provided two arch_infos and returns whether /* This routine is provided two arch_infos and returns whether
they'd be compatible */ they'd be compatible */
@ -57,7 +55,7 @@ compatible (a,b)
#define SH3E_NEXT &arch_info_struct[5] #define SH3E_NEXT &arch_info_struct[5]
#define SH4_NEXT NULL #define SH4_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
{ {
32, /* 32 bits in a word */ 32, /* 32 bits in a word */

View File

@ -49,7 +49,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:sparclet", "sparc:sparclet",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[1], &arch_info_struct[1],
}, },
@ -63,7 +63,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:sparclite", "sparc:sparclite",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[2], &arch_info_struct[2],
}, },
@ -77,7 +77,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v8plus", "sparc:v8plus",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[3], &arch_info_struct[3],
}, },
@ -91,7 +91,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v8plusa", "sparc:v8plusa",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[4], &arch_info_struct[4],
}, },
@ -105,7 +105,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:sparclite_le", "sparc:sparclite_le",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[5], &arch_info_struct[5],
}, },
@ -119,7 +119,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v9", "sparc:v9",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[6], &arch_info_struct[6],
}, },
@ -133,7 +133,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v9a", "sparc:v9a",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[7], &arch_info_struct[7],
}, },
@ -147,7 +147,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v8plusb", "sparc:v8plusb",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[8], &arch_info_struct[8],
}, },
@ -161,7 +161,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"sparc:v9b", "sparc:v9b",
3, 3,
false, false,
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
0, 0,
} }
@ -178,7 +178,7 @@ const bfd_arch_info_type bfd_sparc_arch =
"sparc", "sparc",
3, 3,
true, /* the default */ true, /* the default */
sparc_compatible, sparc_compatible,
bfd_default_scan, bfd_default_scan,
&arch_info_struct[0], &arch_info_struct[0],
}; };

View File

@ -34,6 +34,6 @@ const bfd_arch_info_type bfd_tic54x_arch =
1, 1,
true, /* the one and only */ true, /* the one and only */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan, bfd_default_scan,
0, 0,
}; };

View File

@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <ctype.h> #include <ctype.h>
static boolean static boolean
scan (info, string) scan (info, string)
const struct bfd_arch_info * info; const struct bfd_arch_info * info;
const char * string; const char * string;
@ -41,9 +41,9 @@ scan (info, string)
architecture, eg the string m68k:68020 would match the m68k entry architecture, eg the string m68k:68020 would match the m68k entry
up to the :, then we get left with the machine number */ up to the :, then we get left with the machine number */
for (ptr_src = string, ptr_tst = info->arch_name; for (ptr_src = string, ptr_tst = info->arch_name;
*ptr_src && *ptr_tst; *ptr_src && *ptr_tst;
ptr_src++, ptr_tst++) ptr_src++, ptr_tst++)
{ {
if (*ptr_src != *ptr_tst) break; if (*ptr_src != *ptr_tst) break;
} }
@ -52,7 +52,7 @@ scan (info, string)
colons */ colons */
if (*ptr_src == ':') if (*ptr_src == ':')
ptr_src++; ptr_src++;
if (*ptr_src == 0) if (*ptr_src == 0)
{ {
/* nothing more, then only keep this one if it is the default /* nothing more, then only keep this one if it is the default
@ -67,15 +67,15 @@ scan (info, string)
ptr_src++; ptr_src++;
} }
switch (number) switch (number)
{ {
case bfd_mach_v850e: arch = bfd_arch_v850; break; case bfd_mach_v850e: arch = bfd_arch_v850; break;
case bfd_mach_v850ea: arch = bfd_arch_v850; break; case bfd_mach_v850ea: arch = bfd_arch_v850; break;
default: default:
return false; return false;
} }
if (arch != info->arch) if (arch != info->arch)
return false; return false;
if (number != info->mach) if (number != info->mach)
@ -90,7 +90,7 @@ scan (info, string)
#define NEXT NULL #define NEXT NULL
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
N (bfd_mach_v850e, "v850e", false, &arch_info_struct[1]), N (bfd_mach_v850e, "v850e", false, &arch_info_struct[1]),
N (bfd_mach_v850ea, "v850ea", false, NULL) N (bfd_mach_v850ea, "v850ea", false, NULL)

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_vax_arch =
"vax", "vax",
3, 3,
true, /* the one and only */ true, /* the one and only */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
0, 0,
}; };

View File

@ -22,10 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
int bfd_default_scan_num_mach(); int bfd_default_scan_num_mach();
static boolean static boolean
scan_mach (info, string) scan_mach (info, string)
const struct bfd_arch_info *info ATTRIBUTE_UNUSED; const struct bfd_arch_info *info ATTRIBUTE_UNUSED;
const char *string; const char *string;
@ -35,8 +34,6 @@ scan_mach (info, string)
return false; return false;
} }
const bfd_arch_info_type bfd_w65_arch = const bfd_arch_info_type bfd_w65_arch =
{ {
16, /* 16 bits in a word */ 16, /* 16 bits in a word */

View File

@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_we32k_arch =
"we32k:32000", "we32k:32000",
3, 3,
true, /* the one and only */ true, /* the one and only */
bfd_default_compatible, bfd_default_compatible,
bfd_default_scan , bfd_default_scan ,
0, 0,
}; };

View File

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h" #include "sysdep.h"
#include "libbfd.h" #include "libbfd.h"
#if 0 /* not used currently */ #if 0 /* not used currently */
/* /*
Relocations for the Z8K Relocations for the Z8K
@ -50,7 +49,6 @@ howto16_callback (abfd, reloc_entry, symbol_in, data,
return bfd_reloc_ok; return bfd_reloc_ok;
} }
static bfd_reloc_status_type static bfd_reloc_status_type
howto8_callback (abfd, reloc_entry, symbol_in, data, howto8_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd) ignore_input_section, ignore_bfd)
@ -73,7 +71,6 @@ howto8_callback (abfd, reloc_entry, symbol_in, data,
return bfd_reloc_ok; return bfd_reloc_ok;
} }
static bfd_reloc_status_type static bfd_reloc_status_type
howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data, howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd) ignore_input_section, ignore_bfd)
@ -119,8 +116,6 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
return bfd_reloc_ok; return bfd_reloc_ok;
} }
static reloc_howto_type howto_16 static reloc_howto_type howto_16
= NEWHOWTO (howto16_callback, "abs16", 1, false, false); = NEWHOWTO (howto16_callback, "abs16", 1, false, false);
static reloc_howto_type howto_8 static reloc_howto_type howto_8
@ -132,7 +127,6 @@ static reloc_howto_type howto_8_FFnn
static reloc_howto_type howto_8_pcrel static reloc_howto_type howto_8_pcrel
= NEWHOWTO (howto8_pcrel_callback, "pcrel8", 0, false, true); = NEWHOWTO (howto8_pcrel_callback, "pcrel8", 0, false, true);
static reloc_howto_type * static reloc_howto_type *
local_bfd_reloc_type_lookup (arch, code) local_bfd_reloc_type_lookup (arch, code)
const struct bfd_arch_info *arch; const struct bfd_arch_info *arch;
@ -172,7 +166,6 @@ scan_mach (info, string)
return false; return false;
} }
/* This routine is provided two arch_infos and returns whether /* This routine is provided two arch_infos and returns whether
they'd be compatible */ they'd be compatible */
@ -186,7 +179,6 @@ compatible (a, b)
return a; return a;
} }
static const bfd_arch_info_type arch_info_struct[] = static const bfd_arch_info_type arch_info_struct[] =
{ {
{32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, false, compatible, scan_mach, 0,}, {32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, false, compatible, scan_mach, 0,},