diff options
Diffstat (limited to 'sys/arch/i386/stand/libsa')
-rw-r--r-- | sys/arch/i386/stand/libsa/Makefile | 8 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/exec_i386.c | 34 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/libsa.h | 4 |
3 files changed, 22 insertions, 24 deletions
diff --git a/sys/arch/i386/stand/libsa/Makefile b/sys/arch/i386/stand/libsa/Makefile index 03fc1dd282c..6809b6705f3 100644 --- a/sys/arch/i386/stand/libsa/Makefile +++ b/sys/arch/i386/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.34 1998/05/30 02:30:49 mickey Exp $ +# $OpenBSD: Makefile,v 1.35 1998/07/20 18:14:55 mickey Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -27,9 +27,9 @@ CLEANFILES+= unixdev.o unixsys.o nullfs.o .endif # stand routines -SRCS+= alloc.c exit.c exec.c getfile.c gets.c globals.c strcmp.c strlen.c \ +SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \ strncmp.c memcmp.c memcpy.c memset.c printf.c strerror.c strncpy.c \ - strtol.c ctime.c + strtol.c ctime.c exec.new.c exec_aout.c # io routines SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \ @@ -59,7 +59,7 @@ install: .include <bsd.lib.mk> CPPFLAGS+=-DLINKADDR=${LINKADDR} -DHEAP_LIMIT=${HEAP_LIMIT} ${DEBUGFLAGS} -CPPFLAGS+=-I${S}/stand/boot +CPPFLAGS+=-I${S}/stand/boot -DCOMPAT_UFS CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD #AS=cat ; #AS+= -R diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c index 75c0b02bffb..6eacf0a105e 100644 --- a/sys/arch/i386/stand/libsa/exec_i386.c +++ b/sys/arch/i386/stand/libsa/exec_i386.c @@ -1,7 +1,7 @@ -/* $OpenBSD: exec_i386.c,v 1.22 1998/05/25 19:20:54 mickey Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.23 1998/07/20 18:14:56 mickey Exp $ */ /* - * Copyright (c) 1997 Michael Shalayeff + * Copyright (c) 1997-1998 Michael Shalayeff * Copyright (c) 1997 Tobias Weingartner * All rights reserved. * @@ -35,24 +35,22 @@ */ #include <sys/param.h> -#include <sys/exec.h> -#include <sys/reboot.h> #include <dev/cons.h> #include <stand/boot/bootarg.h> #include <machine/biosvar.h> #include <sys/disklabel.h> #include "disk.h" #include "libsa.h" - -#define round_to_size(x) (((int)(x) + sizeof(int) - 1) & ~(sizeof(int) - 1)) +#include <lib/libsa/exec.h> typedef void (*startfuncp)(int, int, int, int, int, int, int, int) - __attribute__ ((noreturn)); + __attribute__ ((noreturn)); void -machdep_start(startaddr, howto, loadaddr, ssym, esym) - char *startaddr, *loadaddr, *ssym, *esym; +machdep_exec(xp, howto, loadaddr) + struct x_param *xp; int howto; + void *loadaddr; { #ifndef _TEST dev_t bootdev = bootdev_dip->bootdev; @@ -65,23 +63,21 @@ machdep_start(startaddr, howto, loadaddr, ssym, esym) #ifdef EXEC_DEBUG x = (void *)loadaddr; - printf("exec {\n\ta_midmag = %lx\n\ta_text = %lx\n\ta_data = %lx\n" - "\ta_bss = %lx\n\ta_syms = %lx\n\ta_entry = %lx\n" - "\ta_trsize = %lx\n\ta_drsize = %lx\n}\n", + printf("exec {\n\ta_midmag = %x\n\ta_text = %x\n\ta_data = %x\n" + "\ta_bss = %x\n\ta_syms = %x\n\ta_entry = %x\n" + "\ta_trsize = %x\n\ta_drsize = %x\n}\n", x->a_midmag, x->a_text, x->a_data, x->a_bss, x->a_syms, x->a_entry, x->a_trsize, x->a_drsize); - printf("/bsd(%x,%x,%x,%x,%x,%x,%d,%p)\n", - howto, bootdev, BOOTARG_APIVER, round_to_size(esym), - extmem, cnvmem, ac, av); + printf("/bsd(%x,%u,%p)\n", BOOTARG_APIVER, ac, av); getchar(); #endif - (int)startaddr &= 0xffffff; + xp->xp_entry &= 0xffffff; - printf("entry point at %p\n", startaddr); + printf("entry point at 0x%x\n", xp->xp_entry); /* stack and the gung is ok at this point, so, no need for asm setup */ - (*(startfuncp)startaddr)(howto, bootdev, BOOTARG_APIVER, - round_to_size(esym), extmem, cnvmem, ac, (int)av); + (*(startfuncp)xp->xp_entry)(howto, bootdev, BOOTARG_APIVER, + xp->xp_end, extmem, cnvmem, ac, (int)av); /* not reached */ #endif } diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h index 9aeac9d9661..ce2890d083e 100644 --- a/sys/arch/i386/stand/libsa/libsa.h +++ b/sys/arch/i386/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.27 1998/07/13 04:03:26 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.28 1998/07/20 18:14:57 mickey Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -35,6 +35,8 @@ #include <lib/libsa/stand.h> #include <machine/biosvar.h> +#define EXEC_AOUT + #define DEFAULT_KERNEL_ADDRESS 0x100000 void gateA20 __P((int)); |