* xcoffread.c (xcoff_symfile_read): Only read stringtab and

debugsec if there are a non-zero number of symbols.
This commit is contained in:
Jim Kingdon 1993-03-17 19:06:32 +00:00
parent 8b4a5fafe1
commit 9d61147ec5
2 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,8 @@
Wed Mar 17 09:46:31 1993 Jim Kingdon (kingdon@cygnus.com)
* xcoffread.c (xcoff_symfile_read): Only read stringtab and
debugsec if there are a non-zero number of symbols.
Tue Mar 16 15:18:17 1993 Jim Kingdon (kingdon@cygnus.com)
* xcoffexec.c (add_vmap): Wrap symbol read in catch_errors.

View File

@ -2257,14 +2257,17 @@ xcoff_symfile_read (objfile, section_offset, mainline)
error("\"%s\": error reading line numbers\n", name);
}
val = init_stringtab(abfd, stringtab_offset, objfile);
if (val < 0) {
error ("\"%s\": can't get string table", name);
}
if (num_symbols > 0)
{
val = init_stringtab(abfd, stringtab_offset, objfile);
if (val < 0) {
error ("\"%s\": can't get string table", name);
}
if (init_debugsection(abfd) < 0) {
error ("Error reading .debug section of `%s'\n", name);
}
if (init_debugsection(abfd) < 0) {
error ("Error reading .debug section of `%s'\n", name);
}
}
/* Position to read the symbol table. Do not read it all at once. */
val = bfd_seek(abfd, symtab_offset, L_SET);