PR 11136
[deliverable/binutils-gdb.git] / opcodes / arm-dis.c
index e246fe9f50e15f88339e6e67ca1cdaa04eda1ec4..0318d4a6aab9f2b98902e3ede2bbc60bc2ee0499 100644 (file)
@@ -2294,11 +2294,11 @@ print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
 
       func (stream, "[pc");
 
+      if (NEGATIVE_BIT_SET)
+       offset = - offset;
+
       if (PRE_BIT_SET)
        {
-         if (NEGATIVE_BIT_SET)
-           offset = - offset;
-
          /* Pre-indexed.  */
          func (stream, ", #%d]", offset);
 
@@ -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;
This page took 0.024326 seconds and 4 git commands to generate.