summaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2002-03-15 17:32:05 +0000
committerChris Demetriou <cgd@google.com>2002-03-15 17:32:05 +0000
commit4c563ebfcec40cfc6e9d066431beb92cf70f207b (patch)
treec016d679f32b71c713867e5fb6d131e22e44dae9 /opcodes
parenteb7b56d007be4ec6a023e18b11e2ac84e6c28b88 (diff)
downloadbinutils-gdb-4c563ebfcec40cfc6e9d066431beb92cf70f207b.tar.gz
2002-03-15 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (is_newabi): Fix ABI decoding.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/mips-dis.c12
2 files changed, 12 insertions, 4 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 99aaac2c56c..4d0bb4199d1 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -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
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 5959563a3ee..a1e13fffffc 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;