[PATCH RFA] small fix to MIPS abi selection/decoding.

cgd@broadcom.com cgd@broadcom.com
Sun Mar 10 13:13:00 GMT 2002


At Sun, 10 Mar 2002 14:02:51 +0000 (UTC), "Thiemo Seufer" wrote:
> > Index: opcodes/mips-dis.c
> > ===================================================================
> > RCS file: /cvs/src/src/opcodes/mips-dis.c,v
> > retrieving revision 1.24
> > diff -u -p -r1.24 mips-dis.c
> > --- mips-dis.c	2001/11/05 03:07:51	1.24
> > +++ mips-dis.c	2002/03/09 19:55:07
> > @@ -397,10 +397,11 @@ static int
> >  is_newabi (header)
> >       Elf_Internal_Ehdr *header;
> >  {
> > -  if ((header->e_flags
> > -       & (E_MIPS_ABI_EABI32 | E_MIPS_ABI_EABI64 | EF_MIPS_ABI2)) != 0
> > +  if ((header->e_flags & EF_MIPS_ABI2) != 0
> > +      || (header->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI32
> > +      || (header->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64
> >        || (header->e_ident[EI_CLASS] == ELFCLASS64
> > -	  && (header->e_flags & E_MIPS_ABI_O64) == 0))
> > +	  && (header->e_flags & EF_MIPS_ABI) != E_MIPS_ABI_O64))
> 
> o64 is ELFCLASS32. AFAICS the test for ELFCLASS64 should be the first
> (and unconditional). Otherwise it looks ok.

So, the original test there (which you wrote? 8-) wasn't right?
(I was only attempting to correct the incorrect ABI marking tests, not
change the logic...)


I'll send an updated patch tonight or tomorrow.


chris



More information about the Binutils mailing list