diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-04-16 07:10:30 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-04-16 07:10:30 +0000 |
commit | 51e961934160482f42c01f6d2e306527506b8414 (patch) | |
tree | 405b352ca2fed25447875b5574aa9f1ffad315f0 /sys/arch | |
parent | 3e515385b479f8b1e215b1d973f0c45d991f2c9d (diff) |
exec() changes.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/stand/machdep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/hp300/stand/machdep.c b/sys/arch/hp300/stand/machdep.c index f751ea9c99a..73347204d32 100644 --- a/sys/arch/hp300/stand/machdep.c +++ b/sys/arch/hp300/stand/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.3 1997/03/31 07:25:48 downsj Exp $ */ +/* $OpenBSD: machdep.c,v 1.4 1997/04/16 07:10:29 downsj Exp $ */ /* $NetBSD: machdep.c,v 1.6 1996/10/14 07:33:46 thorpej Exp $ */ /* @@ -164,11 +164,16 @@ machdep_start(entry, howto, loadaddr, ssym, esym) char *loadaddr; char *ssym, *esym; { + /* Fix what we were passed in from exec() */ + entry = loadaddr; +#define round_to_size(x) (((int)(x) + sizeof(int) - 1) & ~(sizeof(int) - 1)) + esym = (char *)round_to_size(addr - (char *)loadaddr); +#undef round_to_size asm("movl %0,d7" : : "m" (howto)); asm("movl %0,d6" : : "m" (opendev)); asm("movl %0,d5" : : "m" (cons_scode)); asm("movl %0,a5" : : "a" (loadaddr)); asm("movl %0,a4" : : "a" (esym)); - (*((int (*)())loadaddr))(); + (*((int (*)())entry))(); } |