Don't lose if the symbol table is empty.

This commit is contained in:
mycroft 1994-07-27 01:48:29 +00:00
parent 3ba1d35da1
commit 55be0e4936
2 changed files with 14 additions and 6 deletions

View File

@ -25,7 +25,7 @@
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*
* $Id: boot.c,v 1.21 1994/07/01 03:02:30 deraadt Exp $
* $Id: boot.c,v 1.22 1994/07/27 01:48:29 mycroft Exp $
*/
/*
@ -177,10 +177,13 @@ loadprog(howto)
argv[3] = (addr += head.a_bss);
/********************************************************/
/*copy in the symbol header */
/* copy in the symbol header */
/********************************************************/
pcpy(&head.a_syms, addr, sizeof(head.a_syms));
addr += sizeof(head.a_syms);
if (head.a_syms == 0)
goto nosyms;
/********************************************************/
/* READ in the symbol table */
@ -211,10 +214,12 @@ loadprog(howto)
addr += i;
}
printf("]");
/********************************************************/
/* and that many bytes of (debug symbols?) */
/********************************************************/
printf("]");
nosyms:
argv[4] = ((addr+sizeof(int)-1))&~(sizeof(int)-1);
/********************************************************/

View File

@ -1,11 +1,14 @@
/*
* $Id: version.c,v 1.22 1994/07/21 20:34:13 mycroft Exp $
* $Id: version.c,v 1.23 1994/07/27 01:48:31 mycroft Exp $
*/
/*
* NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.
*
* 1.21 -> 1.22
* 1.22 -> 1.23, 1.21.2.2
* fix problem with empty symbol tables. (mycroft)
*
* 1.21 -> 1.22, 1.21.2.1
* fix compatibility with pre-4.4 file systems. (mycroft)
*
* 1.20 -> 1.21
@ -35,4 +38,4 @@
* look in boot.c revision logs
*/
char *version = "$Revision: 1.22 $";
char *version = "$Revision: 1.23 $";