From e3e535bc5863ec5a183bfaabcd5d1d36a129305a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 6 Jan 2010 15:02:45 +0000 Subject: * arm-dis.c (print_insn): Fixed search for next symbol and data dumping condition, and the initial mapping symbol state. * gas/arm/dis-data.d: New test case. * gas/arm/dis-data.s: New file. --- opcodes/ChangeLog | 5 +++++ opcodes/arm-dis.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 57042a5..3155dcc 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2010-01-06 Daniel Gutson + + * arm-dis.c (print_insn): Fixed search for next symbol and data + dumping condition, and the initial mapping symbol state. + 2010-01-05 Doug Evans * cgen-ibld.in: #include "cgen/basic-modes.h". diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index e246fe9..ba16443 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -4355,7 +4355,8 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) long given; int status; int is_thumb = FALSE; - int is_data = FALSE; + int is_data = (bfd_asymbol_flavour (*info->symtab) + == bfd_target_elf_flavour) ? TRUE : FALSE; int little_code; unsigned int size = 4; void (*printer) (bfd_vma, struct disassemble_info *, long); @@ -4415,7 +4416,7 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) bfd_vma addr; int n; int last_sym = -1; - enum map_type type = MAP_ARM; + enum map_type type = MAP_DATA; if (pc <= last_mapping_addr) last_mapping_sym = -1; @@ -4478,7 +4479,9 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) for (n = last_sym + 1; n < info->symtab_size; n++) { addr = bfd_asymbol_value (info->symtab[n]); - if (addr > pc) + if (addr > pc + && (info->section == NULL + || info->section == info->symtab[n]->section)) { if (addr - pc < size) size = addr - pc; -- cgit v1.1