2002-03-15 Chris Demetriou <cgd@broadcom.com>
authorChris Demetriou <cgd@google.com>
Fri, 15 Mar 2002 17:32:05 +0000 (17:32 +0000)
committerChris Demetriou <cgd@google.com>
Fri, 15 Mar 2002 17:32:05 +0000 (17:32 +0000)
        * mips-dis.c (is_newabi): Fix ABI decoding.

opcodes/ChangeLog
opcodes/mips-dis.c

index 99aaac2c56c647e5bc1e768685eba41a5c2e7ad3..4d0bb4199d1fb0cea5612400e4cc157ba674e819 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-15  Chris Demetriou  <cgd@broadcom.com>
+
+       * mips-dis.c (is_newabi): Fix ABI decoding.
+
 2002-03-14  Chris G. Demetriou  <cgd@broadcom.com>
 
        * mips-dis.c (mips_isa_type): Fix formatting of bfd_mach_mipsisa32
index 5959563a3ee027e4a3dc1cb09120a2ebce086c2d..a1e13fffffcc7416eed0dcc978aeb2cbe02578fd 100644 (file)
@@ -397,10 +397,14 @@ static int
 is_newabi (header)
      Elf_Internal_Ehdr *header;
 {
-  if ((header->e_flags
-       & (E_MIPS_ABI_EABI32 | E_MIPS_ABI_EABI64 | EF_MIPS_ABI2)) != 0
-      || (header->e_ident[EI_CLASS] == ELFCLASS64
-         && (header->e_flags & E_MIPS_ABI_O64) == 0))
+  /* There are no old-style ABIs which use 64-bit ELF.  */
+  if (header->e_ident[EI_CLASS] == ELFCLASS64)
+    return 1;
+
+  /* If a 32-bit ELF file, N32, EABI32, and EABI64 are new-style ABIs.  */
+  if ((header->e_flags & EF_MIPS_ABI2) != 0
+      || (header->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI32
+      || (header->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64)
     return 1;
 
   return 0;
This page took 0.043744 seconds and 4 git commands to generate.