When linking binary files into MIPS executables, default to MIPS 3 emaulation for...
authorYunQiang Su <syq@debian.org>
Thu, 25 Jul 2019 15:34:58 +0000 (16:34 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 25 Jul 2019 15:34:58 +0000 (16:34 +0100)
PR 24832
* elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
mips inputs.

bfd/ChangeLog
bfd/elfxx-mips.c

index 028723be59f6234868aa7347ac93e2bddf364d1f..53b84b09ce3478e8595822b5712deac6fda878c6 100644 (file)
@@ -1,3 +1,9 @@
+2019-07-25  YunQiang Su  <syq@debian.org>
+
+       PR 24832
+       * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
+       mips inputs.
+
 2019-07-24  Claudiu Zissulescu  <claziss@synopsys.com>
 
        * elf32-arc.c (bfd_get_32_me): Add a small description, fix
index 29ae4559266d8d43e7f99b98a5e02dafd0219e1b..8e577b29e1bb39f976d63b3c11deb0f5b3c53bde 100644 (file)
@@ -12193,6 +12193,12 @@ mips_set_isa_flags (bfd *abfd)
   switch (bfd_get_mach (abfd))
     {
     default:
+      if (ABI_N32_P (abfd) || ABI_64_P (abfd))
+        val = E_MIPS_ARCH_3;
+      else
+        val = E_MIPS_ARCH_1;
+      break;
+
     case bfd_mach_mips3000:
       val = E_MIPS_ARCH_1;
       break;