PR25277, microblaze opcode enumeration vs ISO/IEC TS 18661-3:2015
[deliverable/binutils-gdb.git] / bfd / syms.c
index 146f674a1304c38b8dedda178995cad8f922a6f1..f02cae9fc784e223a3bd497deec89ffce4925c6a 100644 (file)
@@ -1078,19 +1078,21 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
              arelent *r;
              unsigned long val;
              asymbol *sym;
+             bfd_size_type octets;
 
              r = *pr;
              /* Ignore R_*_NONE relocs.  */
              if (r->howto->dst_mask == 0)
                continue;
 
+             octets = r->address * bfd_octets_per_byte (abfd, NULL);
              if (r->howto->rightshift != 0
                  || r->howto->size != 2
                  || r->howto->bitsize != 32
                  || r->howto->pc_relative
                  || r->howto->bitpos != 0
                  || r->howto->dst_mask != 0xffffffff
-                 || r->address * bfd_octets_per_byte (abfd) + 4 > stabsize)
+                 || octets + 4 > stabsize)
                {
                  _bfd_error_handler
                    (_("unsupported .stab relocation"));
@@ -1100,13 +1102,11 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
                  return FALSE;
                }
 
-             val = bfd_get_32 (abfd, info->stabs
-                               + r->address * bfd_octets_per_byte (abfd));
+             val = bfd_get_32 (abfd, info->stabs + octets);
              val &= r->howto->src_mask;
              sym = *r->sym_ptr_ptr;
              val += sym->value + sym->section->vma + r->addend;
-             bfd_put_32 (abfd, (bfd_vma) val, info->stabs
-                         + r->address * bfd_octets_per_byte (abfd));
+             bfd_put_32 (abfd, (bfd_vma) val, info->stabs + octets);
            }
        }
 
This page took 0.024291 seconds and 4 git commands to generate.