[RFA] Change bfd machine consts to enums.

Nick Clifton nickc@cambridge.redhat.com
Thu Feb 14 08:06:00 GMT 2002


Hi Richard,

> It's the cpu-arm.c code that's all messed up: bfd_mach_arm_... is
> being used to initialize a field of type enum bfd_archticture (which
> should be using bfd_arch_arm, if it gets anything).
> 
> Nick, any idea where this bit of bogosity came from?

Me being very stupid I suspect.

This patch should fix things.  Any objections ?

Cheers
        Nick

2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>

	* cpu-arm.c (processor): Replace 'arch' field with 'mach'.
        (scan): Examine 'mach' field of info structure.

Index: bfd/cpu-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/cpu-arm.c,v
retrieving revision 1.5
diff -c -3 -p -w -r1.5 cpu-arm.c
*** cpu-arm.c	2001/03/08 21:03:57	1.5
--- cpu-arm.c	2002/02/14 15:21:41
*************** compatible (a,b)
*** 63,69 ****
  
  static struct
  {
!   enum bfd_architecture arch;
    char *                name;
  }
  processors[] =
--- 65,71 ----
  
  static struct
  {
!   unsigned int mach;
    char *       name;
  }
  processors[] =
*************** scan (info, string)
*** 114,120 ****
  	break;
      }
  
!   if (i != -1 && info->arch == processors[ i ].arch)
      return true;
  
    /* Finally check for the default architecture */
--- 116,122 ----
  	break;
      }
  
!   if (i != -1 && info->mach == processors[ i ].mach)
      return true;
  
    /* Finally check for the default architecture */



More information about the Binutils mailing list