Skip gdb.threads/thread_events.exp on RSP targets properly
[binutils-gdb.git] / bfd / syms.c
index 118595d3d0f070c72983bb7f392f87b2a582eb99..090009beebc17393b584c644b2cfcc70ee270eeb 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic symbol-table support for the BFD library.
-   Copyright (C) 1990-2016 Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1075,7 +1075,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
                  || r->howto->bitpos != 0
                  || r->howto->dst_mask != 0xffffffff)
                {
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("Unsupported .stab relocation"));
                  bfd_set_error (bfd_error_invalid_operation);
                  if (reloc_vector != NULL)
@@ -1083,11 +1083,13 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
                  return FALSE;
                }
 
-             val = bfd_get_32 (abfd, info->stabs + r->address);
+             val = bfd_get_32 (abfd, info->stabs
+                               + r->address * bfd_octets_per_byte (abfd));
              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_put_32 (abfd, (bfd_vma) val, info->stabs
+                         + r->address * bfd_octets_per_byte (abfd));
            }
        }