OSDN Git Service

2000-01-17 Amit S. Kale <akale@veritas.com>
authorJim Kingdon <jkingdon@engr.sgi.com>
Fri, 11 Feb 2000 19:37:06 +0000 (19:37 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Fri, 11 Feb 2000 19:37:06 +0000 (19:37 +0000)
* elfread.c (elf_symtab_read): Use offset for the section in which a
symbol resides, instead of .text section for calculating address of a
symbol.
Checked in by Jim Kingdon  <kingdon@redhat.com>

gdb/ChangeLog
gdb/elfread.c

index aa02f47..94add2b 100644 (file)
@@ -1,3 +1,10 @@
+2000-01-17  Amit S. Kale  <akale@veritas.com>
+
+       * elfread.c (elf_symtab_read): Use offset for the section in which a
+       symbol resides, instead of .text section for calculating address of a
+       symbol.
+       Checked in by Jim Kingdon  <kingdon@redhat.com>
+
 2000-02-09  Mark Kettenis  <kettenis@gnu.org>
 
        * gnu-nat.c (proc_string): Make global.
index d63d16a..fd67208 100644 (file)
@@ -293,8 +293,7 @@ elf_symtab_read (objfile, dynamic)
       if (number_of_symbols < 0)
        error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd),
               bfd_errmsg (bfd_get_error ()));
-      /* FIXME: Should use section specific offset, not SECT_OFF_TEXT. */
-      offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+      offset = ANOFFSET (objfile->section_offsets, sym->section->index);
       for (i = 0; i < number_of_symbols; i++)
        {
          sym = symbol_table[i];