From: Jim Kingdon Date: Fri, 11 Feb 2000 19:37:06 +0000 (+0000) Subject: 2000-01-17 Amit S. Kale X-Git-Url: https://repo.jachan.dev/binutils.git/commitdiff_plain/fa292f2358c4d8b1bfee4203ea4a4a86164adb34 2000-01-17 Amit S. Kale * 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 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aa02f47510..94add2b950 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2000-01-17 Amit S. Kale + + * 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 + 2000-02-09 Mark Kettenis * gnu-nat.c (proc_string): Make global. diff --git a/gdb/elfread.c b/gdb/elfread.c index d63d16a30f..fd6720816a 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];