diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
| commit | 76b5366091f76c9bc73570149ef5055648fc2c39 (patch) | |
| tree | 590d020e0f2a5bea6e09d66d951a674443b21d67 /sys/boot/common/load_aout.c | |
| parent | 4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff) | |
Diffstat (limited to 'sys/boot/common/load_aout.c')
| -rw-r--r-- | sys/boot/common/load_aout.c | 48 | 
1 files changed, 22 insertions, 26 deletions
| diff --git a/sys/boot/common/load_aout.c b/sys/boot/common/load_aout.c index 6d33ad49f3672..3a5d34d15a6ba 100644 --- a/sys/boot/common/load_aout.c +++ b/sys/boot/common/load_aout.c @@ -23,7 +23,7 @@   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF   * SUCH DAMAGE.   * - *	$Id: load_aout.c,v 1.10 1998/10/12 09:05:12 peter Exp $ + *	$Id: load_aout.c,v 1.9 1998/10/09 23:15:39 peter Exp $   */  #include <sys/param.h> @@ -223,34 +223,30 @@ aout_loadimage(struct loaded_module *mp, int fd, vm_offset_t loadaddr, struct ex      /* symbol table size */      ssym = addr; -    if(ehdr->a_syms!=NULL) { -    	archsw.arch_copyin(&ehdr->a_syms, addr, sizeof(ehdr->a_syms)); -    	addr += sizeof(ehdr->a_syms); +    archsw.arch_copyin(&ehdr->a_syms, addr, sizeof(ehdr->a_syms)); +    addr += sizeof(ehdr->a_syms); -    	/* symbol table */ -    	printf("symbols=[0x%x+0x%lx", sizeof(ehdr->a_syms), ehdr->a_syms); -    	if (archsw.arch_readin(fd, addr, ehdr->a_syms) != ehdr->a_syms) -		return(0); -    	addr += ehdr->a_syms; - -    	/* string table */ -    	read(fd, &ss, sizeof(ss)); -    	archsw.arch_copyin(&ss, addr, sizeof(ss)); -    	addr += sizeof(ss); -    	ss -= sizeof(ss); -    	printf("+0x%x+0x%x]", sizeof(ss), ss); -    	if (archsw.arch_readin(fd, addr, ss) != ss) -		return(0); -    	addr += ss; - -    	mod_addmetadata(mp, MODINFOMD_SSYM, sizeof(ssym), &ssym); -    	mod_addmetadata(mp, MODINFOMD_ESYM, sizeof(esym), &esym); -    } else { -	printf("symbols=[none]"); -    } -    printf("\n"); +    /* symbol table */ +    printf("symbols=[0x%x+0x%lx", sizeof(ehdr->a_syms), ehdr->a_syms); +    if (archsw.arch_readin(fd, addr, ehdr->a_syms) != ehdr->a_syms) +	return(0); +    addr += ehdr->a_syms; + +    /* string table */ +    read(fd, &ss, sizeof(ss)); +    archsw.arch_copyin(&ss, addr, sizeof(ss)); +    addr += sizeof(ss); +    ss -= sizeof(ss); +    printf("+0x%x+0x%x]", sizeof(ss), ss); +    if (archsw.arch_readin(fd, addr, ss) != ss) +	return(0); +    printf(" \n"); +    addr += ss;      esym = addr; +    mod_addmetadata(mp, MODINFOMD_SSYM, sizeof(ssym), &ssym); +    mod_addmetadata(mp, MODINFOMD_ESYM, sizeof(esym), &esym); +      return(addr - loadaddr);  } | 
