* 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 <
[email protected]>
+
+ * 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.
+
* gnu-nat.c (proc_string): Make global.
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];