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]

[PATCH] Remove bogus MIPS machine compatibility test


Hi All,

as already discussed in the thread following
http://sources.redhat.com/ml/binutils/2002-03/msg00261.html,
the machine compatibility check in mips_compatible() is completely bogus.
We handle this in a better way in _bfd_mips_elf_merge_private_bfd_data,
so we shouldn't pretend to check it here.

Btw, the interface of these *_compatible() functions looks strange.
Shouldn't it return a boolean instead of a bfd_arch_info_type* ?


Thiemo


2002-04-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	/bfd/ChangeLog
	* cpu-mips.c (mips_compatible): Don't try to check machine
	compatibility.


diff -BurpN source-orig/bfd/cpu-mips.c source/bfd/cpu-mips.c
--- source-orig/bfd/cpu-mips.c	Wed Apr 10 18:40:45 2002
+++ source/bfd/cpu-mips.c	Wed Apr 10 19:12:23 2002
@@ -37,11 +37,8 @@ mips_compatible (a, b)
   if (a->arch != b->arch)
     return NULL;
 
-  if (a->mach > b->mach)
-    return a;
-
-  if (b->mach > a->mach)
-    return b;
+  /* Machine compatibility is checked in
+     _bfd_mips_elf_merge_private_bfd_data.  */
 
   return a;
 }


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