+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.
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);