diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 2000-02-14 15:27:28 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 2000-02-14 15:27:28 +0000 |
commit | 2bc8a457183e8ed8830e7892fe49384a420e0930 (patch) | |
tree | 8ff9f4e5d3e66d6292fc2246f95722f580ebe471 | |
parent | 0c566c2e6cab1196036cb4bffb22c1b4e0e98593 (diff) | |
download | binutils-gdb-2bc8a457183e8ed8830e7892fe49384a420e0930.tar.gz |
2000-02-14 Amit S. Kale <akale@veritas.com>
* elfread.c (elf_symtab_read): Move the use of sym to after where
it is set.
Checked in by Jim Kingdon <kingdon@redhat.com>
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/elfread.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 59ea5f761f4..132f27f5c01 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2000-02-14 Amit S. Kale <akale@veritas.com> + + * elfread.c (elf_symtab_read): Move the use of sym to after where + it is set. + Checked in by Jim Kingdon <kingdon@redhat.com> + Mon Feb 14 15:39:01 2000 Andrew Cagney <cagney@b1.cygnus.com> * MAINTAINERS: Make Nick Duffek the UnixWare threads maintainer. diff --git a/gdb/elfread.c b/gdb/elfread.c index fd6720816a4..16bc23f8adb 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -293,10 +293,10 @@ 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 ())); - offset = ANOFFSET (objfile->section_offsets, sym->section->index); 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 |