summaryrefslogtreecommitdiff
path: root/opcodes/mips-dis.c
diff options
context:
space:
mode:
authorChris Demetriou <cgd@broadcom.com>2002-03-15 17:32:05 +0000
committerChris Demetriou <cgd@broadcom.com>2002-03-15 17:32:05 +0000
commit9f2293abfe1c525623075026aad24bd16324e221 (patch)
treed359d4beb3c6cdc710d74610c4cdb384d4f063de /opcodes/mips-dis.c
parent91290f66e4a08de51b6e300adc2434f44d23f167 (diff)
downloadbinutils-redhat-9f2293abfe1c525623075026aad24bd16324e221.tar.gz
2002-03-15 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (is_newabi): Fix ABI decoding.
Diffstat (limited to 'opcodes/mips-dis.c')
-rw-r--r--opcodes/mips-dis.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 5959563a3e..a1e13fffff 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -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;