SCCS-vsn: lib/csu/i386/crt0.c 5.4
SCCS-vsn: lib/csu/i386/crt0.c 5.4
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)crt0.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)crt0.c 5.4 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
/*
#endif /* LIBC_SCCS and not lint */
/*
char **environ = (char **)0;
static int fd;
char **environ = (char **)0;
static int fd;
-asm("#define _start start");
-asm("#define _eprol eprol");
-asm(" .text");
-asm(" .long 0xc000c000");
+asm(".text");
+asm(".long 0xc000c000");
+
extern unsigned char etext;
extern unsigned char etext;
-extern unsigned char eprol;
+extern unsigned char eprol asm ("eprol");
+extern start() asm("start");
+
start()
{
struct kframe {
start()
{
struct kframe {
kfp = 0;
initcode = initcode = 0;
#else not lint
kfp = 0;
initcode = initcode = 0;
#else not lint
- asm(" lea 4(%ebp),%ebx"); /* catch it quick */
+ asm("lea 4(%ebp),%ebx"); /* catch it quick */
#endif not lint
for (argv = targv = &kfp->kargv[0]; *targv++; /* void */)
/* void */ ;
#endif not lint
for (argv = targv = &kfp->kargv[0]; *targv++; /* void */)
/* void */ ;
errno = 0;
exit(main(kfp->kargc, argv, environ));
}
errno = 0;
exit(main(kfp->kargc, argv, environ));
}
-asm("#undef _start");
-asm("#undef _eprol");
#ifdef MCRT0
/*ARGSUSED*/
exit(code)
#ifdef MCRT0
/*ARGSUSED*/
exit(code)
- register int code; /* r11 */
{
monitor(0);
_cleanup();
{
monitor(0);
_cleanup();
- asm(" pushl 8(bp)") ;
- asm(" movl $1,%eax");
- asm(" .byte 0x9a; .long 0; .word 0");
+ asm("pushl 8(%ebp)") ;
+ asm("movl $1,%eax");
+ asm(".byte 0x9a; .long 0; .word 0");
-asm(" .globl mcount");
-asm("mcount: ret");
+asm(".globl mcount");
+asm("mcount: ret");