]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-05-15 Richard Sandiford <rsandifo@redhat.com>
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 21 Jun 2004 14:50:32 +0000 (14:50 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Mon, 21 Jun 2004 14:50:32 +0000 (14:50 +0000)
* cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
linked together. Mark the result as h8300sx code.

bfd/ChangeLog
bfd/cpu-h8300.c

index ec5c63e58674008432b4af1151d39f96a9a6ac55..2bcd7bd8fcfad7b3907b6128a4271490c63d1ac4 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
+
+       2003-05-15  Richard Sandiford  <rsandifo@redhat.com>
+       * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
+       linked together. Mark the result as h8300sx code.
+
 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
 
        * elf-bfd.h (struct elf_backend_data): Added
index 5907de025376deb3621e1b12ac2088b84fb65a3b..d726dc32bb9547e51dec7aa3e281b61960f6bfb0 100644 (file)
@@ -96,8 +96,18 @@ h8300_scan (const struct bfd_arch_info *info, const char *string)
 static const bfd_arch_info_type *
 compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
 {
+  if (in->arch != out->arch)
+    return 0;
+  if (in->mach == bfd_mach_h8300sx && out->mach == bfd_mach_h8300s)
+    return in;
+  if (in->mach == bfd_mach_h8300s && out->mach == bfd_mach_h8300sx)
+    return out;
+  if (in->mach == bfd_mach_h8300sxn && out->mach == bfd_mach_h8300sn)
+    return in;
+  if (in->mach == bfd_mach_h8300sn && out->mach == bfd_mach_h8300sxn)
+    return out;
   /* It's really not a good idea to mix and match modes.  */
-  if (in->arch != out->arch || in->mach != out->mach)
+  if (in->mach != out->mach)
     return 0;
   else
     return in;