opcodes: handle mach-o for thumb/arm disambiguation.

opcodes/
	* arm-dis.c (print_insn): Also set is_thumb for Mach-O.
This commit is contained in:
Tristan Gingold 2015-11-20 17:24:52 +01:00
parent aa14fb5078
commit e49d43ff73
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2015-11-23 Tristan Gingold <gingold@adacore.com>
* arm-dis.c (print_insn): Also set is_thumb for Mach-O.
2015-11-20 Matthew Wahab <matthew.wahab@arm.com>
* aarch64-opc.c (aarch64_sys_regs): Add spsr_el12, elr_el12,

View file

@ -34,6 +34,7 @@
#include "elf-bfd.h"
#include "elf/internal.h"
#include "elf/arm.h"
#include "mach-o.h"
/* FIXME: Belongs in global header. */
#ifndef strneq
@ -6374,6 +6375,13 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
== ST_BRANCH_TO_THUMB)
|| type == STT_ARM_16BIT);
}
else if (bfd_asymbol_flavour (*info->symbols)
== bfd_target_mach_o_flavour)
{
bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)*info->symbols;
is_thumb = (asym->n_desc & BFD_MACH_O_N_ARM_THUMB_DEF);
}
}
if (force_thumb)