* archures.c (bfd_default_compatible): Test bits_per_word.
* cpu-i386.c (i386_compatible): Remove. Replace occurrences with bfd_default_compatible. * cpu-i370.c (i370_compatible): Likewise. * cpu-sparc.c (sparc_compatible): Likewise. * cpu-h8300.c (compatible): Test in->arch == out->arch.
This commit is contained in:
parent
fa7ea4d864
commit
b74fa2cd15
6 changed files with 31 additions and 73 deletions
|
@ -1,5 +1,12 @@
|
||||||
2002-03-13 Alan Modra <amodra@bigpond.net.au>
|
2002-03-13 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* archures.c (bfd_default_compatible): Test bits_per_word.
|
||||||
|
* cpu-i386.c (i386_compatible): Remove. Replace occurrences with
|
||||||
|
bfd_default_compatible.
|
||||||
|
* cpu-i370.c (i370_compatible): Likewise.
|
||||||
|
* cpu-sparc.c (sparc_compatible): Likewise.
|
||||||
|
* cpu-h8300.c (compatible): Test in->arch == out->arch.
|
||||||
|
|
||||||
* elflink.h: Formatting fixes.
|
* elflink.h: Formatting fixes.
|
||||||
(elf_link_output_extsym): Merge undefined and undef weak cases.
|
(elf_link_output_extsym): Merge undefined and undef weak cases.
|
||||||
|
|
||||||
|
|
|
@ -722,6 +722,9 @@ bfd_default_compatible (a, b)
|
||||||
if (a->arch != b->arch)
|
if (a->arch != b->arch)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (a->bits_per_word != b->bits_per_word)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (a->mach > b->mach)
|
if (a->mach > b->mach)
|
||||||
return a;
|
return a;
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ compatible (in, out)
|
||||||
const bfd_arch_info_type *out;
|
const bfd_arch_info_type *out;
|
||||||
{
|
{
|
||||||
/* It's really not a good idea to mix and match modes. */
|
/* It's really not a good idea to mix and match modes. */
|
||||||
if (in->mach != out->mach)
|
if (in->arch != out->arch || in->mach != out->mach)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return in;
|
return in;
|
||||||
|
|
|
@ -24,27 +24,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"
|
||||||
|
|
||||||
/* The common i360/370 architecture comes in many forms */
|
|
||||||
|
|
||||||
static const bfd_arch_info_type *i370_compatible
|
|
||||||
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
|
|
||||||
|
|
||||||
static const bfd_arch_info_type *
|
|
||||||
i370_compatible (a, b)
|
|
||||||
const bfd_arch_info_type *a;
|
|
||||||
const bfd_arch_info_type *b;
|
|
||||||
{
|
|
||||||
BFD_ASSERT (a->arch == bfd_arch_i370);
|
|
||||||
switch (b->arch)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
case bfd_arch_i370:
|
|
||||||
return bfd_default_compatible (a, b);
|
|
||||||
}
|
|
||||||
/*NOTREACHED*/
|
|
||||||
}
|
|
||||||
|
|
||||||
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 ... */
|
||||||
|
@ -58,7 +37,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"i370:360",
|
"i370:360",
|
||||||
3,
|
3,
|
||||||
false, /* not the default */
|
false, /* not the default */
|
||||||
i370_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[1]
|
&arch_info_struct[1]
|
||||||
},
|
},
|
||||||
|
@ -72,7 +51,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"i370:370",
|
"i370:370",
|
||||||
3,
|
3,
|
||||||
false, /* not the default */
|
false, /* not the default */
|
||||||
i370_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
0
|
0
|
||||||
},
|
},
|
||||||
|
@ -89,7 +68,7 @@ const bfd_arch_info_type bfd_i370_arch =
|
||||||
"i370:common",
|
"i370:common",
|
||||||
3,
|
3,
|
||||||
true, /* the default */
|
true, /* the default */
|
||||||
i370_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[0]
|
&arch_info_struct[0]
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,22 +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"
|
||||||
|
|
||||||
/* Don't mix 32 bit and 64 bit files. */
|
|
||||||
|
|
||||||
static const bfd_arch_info_type *i386_compatible
|
|
||||||
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
|
|
||||||
|
|
||||||
static const bfd_arch_info_type *
|
|
||||||
i386_compatible (a, b)
|
|
||||||
const bfd_arch_info_type *a;
|
|
||||||
const bfd_arch_info_type *b;
|
|
||||||
{
|
|
||||||
if (a->bits_per_word != b->bits_per_word)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return bfd_default_compatible (a, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
const bfd_arch_info_type bfd_i386_arch_intel_syntax =
|
const bfd_arch_info_type bfd_i386_arch_intel_syntax =
|
||||||
{
|
{
|
||||||
32, /* 32 bits in a word */
|
32, /* 32 bits in a word */
|
||||||
|
@ -49,7 +33,7 @@ const bfd_arch_info_type bfd_i386_arch_intel_syntax =
|
||||||
"i386:intel",
|
"i386:intel",
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
i386_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan ,
|
bfd_default_scan ,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
@ -64,7 +48,7 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
|
||||||
"x86-64:intel",
|
"x86-64:intel",
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
i386_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan ,
|
bfd_default_scan ,
|
||||||
&bfd_i386_arch_intel_syntax,
|
&bfd_i386_arch_intel_syntax,
|
||||||
};
|
};
|
||||||
|
@ -79,7 +63,7 @@ static const bfd_arch_info_type i8086_arch =
|
||||||
"i8086",
|
"i8086",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
i386_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan ,
|
bfd_default_scan ,
|
||||||
&bfd_x86_64_arch_intel_syntax,
|
&bfd_x86_64_arch_intel_syntax,
|
||||||
};
|
};
|
||||||
|
@ -95,7 +79,7 @@ const bfd_arch_info_type bfd_x86_64_arch =
|
||||||
"x86-64",
|
"x86-64",
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
i386_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan ,
|
bfd_default_scan ,
|
||||||
&i8086_arch,
|
&i8086_arch,
|
||||||
};
|
};
|
||||||
|
@ -111,7 +95,7 @@ const bfd_arch_info_type bfd_i386_arch =
|
||||||
"i386",
|
"i386",
|
||||||
3,
|
3,
|
||||||
true,
|
true,
|
||||||
i386_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan ,
|
bfd_default_scan ,
|
||||||
&bfd_x86_64_arch
|
&bfd_x86_64_arch
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* BFD support for the SPARC architecture.
|
/* BFD support for the SPARC architecture.
|
||||||
Copyright 1992, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
|
Copyright 1992, 1995, 1996, 1998, 2000, 2002
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of BFD, the Binary File Descriptor library.
|
This file is part of BFD, the Binary File Descriptor library.
|
||||||
|
|
||||||
|
@ -21,22 +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"
|
||||||
|
|
||||||
/* Don't mix 32 bit and 64 bit files. */
|
|
||||||
|
|
||||||
static const bfd_arch_info_type *sparc_compatible
|
|
||||||
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
|
|
||||||
|
|
||||||
static const bfd_arch_info_type *
|
|
||||||
sparc_compatible (a, b)
|
|
||||||
const bfd_arch_info_type *a;
|
|
||||||
const bfd_arch_info_type *b;
|
|
||||||
{
|
|
||||||
if (a->bits_per_word != b->bits_per_word)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return bfd_default_compatible (a, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const bfd_arch_info_type arch_info_struct[] =
|
static const bfd_arch_info_type arch_info_struct[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -49,7 +34,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:sparclet",
|
"sparc:sparclet",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[1],
|
&arch_info_struct[1],
|
||||||
},
|
},
|
||||||
|
@ -63,7 +48,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:sparclite",
|
"sparc:sparclite",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[2],
|
&arch_info_struct[2],
|
||||||
},
|
},
|
||||||
|
@ -77,7 +62,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:v8plus",
|
"sparc:v8plus",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[3],
|
&arch_info_struct[3],
|
||||||
},
|
},
|
||||||
|
@ -91,7 +76,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:v8plusa",
|
"sparc:v8plusa",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[4],
|
&arch_info_struct[4],
|
||||||
},
|
},
|
||||||
|
@ -105,7 +90,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:sparclite_le",
|
"sparc:sparclite_le",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[5],
|
&arch_info_struct[5],
|
||||||
},
|
},
|
||||||
|
@ -119,7 +104,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:v9",
|
"sparc:v9",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[6],
|
&arch_info_struct[6],
|
||||||
},
|
},
|
||||||
|
@ -133,7 +118,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:v9a",
|
"sparc:v9a",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[7],
|
&arch_info_struct[7],
|
||||||
},
|
},
|
||||||
|
@ -147,7 +132,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:v8plusb",
|
"sparc:v8plusb",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[8],
|
&arch_info_struct[8],
|
||||||
},
|
},
|
||||||
|
@ -161,7 +146,7 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||||
"sparc:v9b",
|
"sparc:v9b",
|
||||||
3,
|
3,
|
||||||
false,
|
false,
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
0,
|
0,
|
||||||
}
|
}
|
||||||
|
@ -178,7 +163,7 @@ const bfd_arch_info_type bfd_sparc_arch =
|
||||||
"sparc",
|
"sparc",
|
||||||
3,
|
3,
|
||||||
true, /* the default */
|
true, /* the default */
|
||||||
sparc_compatible,
|
bfd_default_compatible,
|
||||||
bfd_default_scan,
|
bfd_default_scan,
|
||||||
&arch_info_struct[0],
|
&arch_info_struct[0],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue