This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: recent mips-elf linker "architecture ... incompatible" regressions


Alan Modra wrote:
[snip]
> Index: bfd/cpu-mips.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/cpu-mips.c,v
> retrieving revision 1.10
> diff -u -p -r1.10 cpu-mips.c
> --- cpu-mips.c	2001/08/31 21:24:28	1.10
> +++ cpu-mips.c	2002/03/14 09:44:25
> @@ -1,5 +1,5 @@
>  /* bfd back-end for mips support
> -   Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000
> +   Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002
>     Free Software Foundation, Inc.
>     Written by Steve Chamberlain of Cygnus Support.
>  
> @@ -23,6 +23,26 @@ Foundation, Inc., 59 Temple Place - Suit
>  #include "sysdep.h"
>  #include "libbfd.h"
>  
> +/* The default routine tests bits_per_word, which is wrong on mips as
> +   mips word size doesn't correlate with reloc size.  */
> +
> +const bfd_arch_info_type *
> +mips_compatible (a, b)
> +     const bfd_arch_info_type *a;
> +     const bfd_arch_info_type *b;
> +{
> +  if (a->arch != b->arch)
> +    return NULL;
> +
> +  if (a->mach > b->mach)
> +    return a;
> +
> +  if (b->mach > a->mach)
> +    return b;

How will this work? It seems to do as it did before, but I don't
understand why it worked ever. The bfd_mach_mips* defines are not
always upward compatible to all of the lower numbers. E.g.

#define bfd_mach_mips6000 6000

and

#define bfd_mach_mipsisa64 64

are obvious exceptions.


Thiemo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]