rename the C main() function to main_(). this avoids gcc's implicit
call to __main(), and therefore saves the size of the call and the size of a stub implementation of __main(). in the primary boot block, don't bother saving/restoring the argument passed in from the caller. There is no such argument (that we care about, at least) to the primary. (for secondary, it's the firmware FD being used.)
This commit is contained in:
parent
4a209e30f8
commit
51a85dabbb
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bootxx.c,v 1.7 1999/03/27 09:01:27 ross Exp $ */
|
||||
/* $NetBSD: bootxx.c,v 1.8 1999/03/31 03:03:01 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1998 by Ross Harvey
|
||||
|
@ -174,7 +174,7 @@ static void printdec(int n)
|
|||
}
|
||||
|
||||
void
|
||||
main()
|
||||
main_()
|
||||
{
|
||||
int fd;
|
||||
char *loadaddr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: boot.c,v 1.12 1999/03/27 09:01:28 ross Exp $ */
|
||||
/* $NetBSD: boot.c,v 1.13 1999/03/31 03:03:01 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -78,7 +78,7 @@ char *kernelnames[] = {
|
|||
};
|
||||
|
||||
void
|
||||
main(fd)
|
||||
main_(fd)
|
||||
int fd;
|
||||
{
|
||||
char *name, **namep;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: start.S,v 1.5 1998/10/15 01:02:55 ross Exp $ */
|
||||
/* $NetBSD: start.S,v 1.6 1999/03/31 03:03:01 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
|
@ -51,30 +51,24 @@ Lstartgp:
|
|||
#ifndef PRIMARY_BOOTBLOCK
|
||||
lda sp,start /* start stack below text */
|
||||
lda sp,-ENTRY_FRAME(sp)
|
||||
#endif
|
||||
|
||||
or a0,zero,s0
|
||||
#endif
|
||||
lda a0,_edata
|
||||
lda a1,_end
|
||||
subq a1,a0,a1
|
||||
CALL(bzero)
|
||||
#ifndef PRIMARY_BOOTBLOCK
|
||||
or s0,zero,a0
|
||||
#endif
|
||||
|
||||
|
||||
CALL(main) /* transfer to C */
|
||||
CALL(main_) /* transfer to C */
|
||||
|
||||
XLEAF(_rtt, 0)
|
||||
XLEAF(halt, 0)
|
||||
call_pal PAL_halt /* halt if we ever return */
|
||||
END(start)
|
||||
|
||||
/*
|
||||
* Dummy routine for GCC2.
|
||||
*/
|
||||
LEAF(__main,0)
|
||||
RET
|
||||
END(__main)
|
||||
|
||||
/*
|
||||
* cpu_number
|
||||
* Return the cpu number, using the whami instruction.
|
||||
|
|
Loading…
Reference in New Issue