* Rename remote-es1800.c to remote-es.c
[deliverable/binutils-gdb.git] / gdb / elfread.c
index a0345f8358fd4c958044bca37c33be326fe23201..4e1afe9bd8ff099e59a0cc2b13c1df96c105d1ee 100644 (file)
@@ -255,7 +255,8 @@ elf_symtab_read (abfd, addr, objfile)
          if ((sym -> flags & (BSF_GLOBAL | BSF_WEAK))
              && (sym -> section != NULL))
            {
-             symaddr = sym -> value;
+             /* Bfd symbols are section relative. */
+             symaddr = sym -> value + sym -> section -> vma;
              /* Relocate all non-absolute symbols by base address.  */
              if (sym -> section != &bfd_abs_section)
                symaddr += addr;
@@ -343,7 +344,8 @@ elf_symtab_read (abfd, addr, objfile)
                  if (sectinfo->sections[index])
                    complain (&section_info_dup_complaint, sectinfo->filename);
 
-                 symaddr = sym -> value;
+                 /* Bfd symbols are section relative. */
+                 symaddr = sym -> value + sym -> section -> vma;
                  /* Relocate all non-absolute symbols by base address.  */
                  if (sym -> section != &bfd_abs_section)
                      symaddr += addr;
This page took 0.023136 seconds and 4 git commands to generate.