aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>2000-02-15 04:48:23 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>2000-02-15 04:48:23 +0000
commit70d5406d75cc3d0dd0d5ee91c354d2909d12b7e9 (patch)
treebf553e60b6b219edc7ece1295ef3d036336f266b /gdb/elfread.c
parent168770df11ec79448363c9523666933e4debbb24 (diff)
downloadgdb-70d5406d75cc3d0dd0d5ee91c354d2909d12b7e9.zip
gdb-70d5406d75cc3d0dd0d5ee91c354d2909d12b7e9.tar.gz
gdb-70d5406d75cc3d0dd0d5ee91c354d2909d12b7e9.tar.bz2
* elfread.c (elf_symtab_read): Revert changes by Amit S. Kale. A
sym->section->index number is not a SECT_OFF_* code.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 16bc23f..d63d16a 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -293,10 +293,11 @@ 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);
for (i = 0; i < number_of_symbols; i++)
{
sym = symbol_table[i];
- offset = ANOFFSET (objfile->section_offsets, sym->section->index);
if (sym->name == NULL || *sym->name == '\0')
{
/* Skip names that don't exist (shouldn't happen), or names