From 70d5406d75cc3d0dd0d5ee91c354d2909d12b7e9 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 15 Feb 2000 04:48:23 +0000 Subject: [PATCH] * elfread.c (elf_symtab_read): Revert changes by Amit S. Kale. A sym->section->index number is not a SECT_OFF_* code. --- gdb/ChangeLog | 5 +++++ gdb/elfread.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2a0fbc79cf0..f45561d688b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2000-02-14 Jim Kingdon + + * elfread.c (elf_symtab_read): Revert changes by Amit S. Kale. A + sym->section->index number is not a SECT_OFF_* code. + Tue Feb 15 12:07:30 2000 Andrew Cagney * MAINTAINERS (write after approval): Add H.J. Lu. diff --git a/gdb/elfread.c b/gdb/elfread.c index 16bc23f8adb..d63d16a30fa 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 -- 2.30.2