aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>2000-02-11 19:37:06 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>2000-02-11 19:37:06 +0000
commitfa292f2358c4d8b1bfee4203ea4a4a86164adb34 (patch)
treeafce29cb76654330d3fe546c677dd22d03b106f7 /gdb/elfread.c
parentf90b2b1da8e0f4412cc987415483c79232f905c8 (diff)
downloadgdb-fa292f2358c4d8b1bfee4203ea4a4a86164adb34.zip
gdb-fa292f2358c4d8b1bfee4203ea4a4a86164adb34.tar.gz
gdb-fa292f2358c4d8b1bfee4203ea4a4a86164adb34.tar.bz2
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>
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index d63d16a..fd67208 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -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];