2002-02-06 H.J. Lu (hjl@gnu.org)
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 6 Feb 2002 21:34:17 +0000 (21:34 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 6 Feb 2002 21:34:17 +0000 (21:34 +0000)
* elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
the mach and ISA fields if necessary.

bfd/ChangeLog
bfd/elf32-mips.c

index 6f2764be7db35b4c71326cd99a80c27ab4d88998..c3bf16d71fe226bcc3783a405e531df219c0ab3d 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-06  H.J. Lu  (hjl@gnu.org)
+
+       * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
+       the mach and ISA fields if necessary.
+
 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * coffcode.h (coff_set_arch_mach_hook): Select the highest known
index a84112ef8ddeba1ee2c0e44d084e3e3ab2eeee0e..479ab75defc287aac95972395c770fb3ea0104ab 100644 (file)
@@ -3169,8 +3169,21 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
                bfd_archive_filename (ibfd), new_isa, old_isa);
              ok = false;
            }
-       }
+         else
+           {
+             /* Do we need to update the mach field?  */
+             if (old_mach == 0 && new_mach != 0) 
+               elf_elfheader (obfd)->e_flags |= new_mach;
 
+             /* Do we need to update the ISA field?  */
+             if (new_isa > old_isa)
+               {
+                 elf_elfheader (obfd)->e_flags &= ~EF_MIPS_ARCH;
+                 elf_elfheader (obfd)->e_flags
+                   |= new_flags & EF_MIPS_ARCH;
+               }
+           }
+       }
       else
        {
          (*_bfd_error_handler)