diff options
Diffstat (limited to 'opcodes/ppc-dis.c')
-rw-r--r-- | opcodes/ppc-dis.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index bbf39782982..090574451c5 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -24,7 +24,7 @@ #include <stdio.h> #include "dis-asm.h" #include "elf-bfd.h" -#include "elf32-ppc.h" +#include "elf/ppc.h" #include "opintl.h" #include "opcode/ppc.h" @@ -199,7 +199,10 @@ get_powerpc_dialect (struct disassemble_info *info) /* Disassemble according to the section headers flags for VLE-mode. */ if (dialect & PPC_OPCODE_VLE - && is_ppc_vle (info->section)) + && info->section->owner != NULL + && bfd_get_flavour (info->section->owner) == bfd_target_elf_flavour + && elf_object_id (info->section->owner) == PPC32_ELF_DATA + && (elf_section_flags (info->section) & SHF_PPC_VLE) != 0) return dialect; else return dialect & ~ PPC_OPCODE_VLE; |