summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-07-24 19:12:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-07-24 19:12:35 +0000
commitb3fe4a6b5199e81079fe4fe09cbc4dffdfa5e83a (patch)
tree67cbf792cb765a146e724c3195e46cae6f802353 /lib
parent4daf6b3f120b07ffbb2da94bdb111c02d4d3d706 (diff)
New, working, profiling code for m88k.
Diffstat (limited to 'lib')
-rw-r--r--lib/csu/m88k/crt0.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/csu/m88k/crt0.c b/lib/csu/m88k/crt0.c
index 494c4a1b8a1..00e194a48f3 100644
--- a/lib/csu/m88k/crt0.c
+++ b/lib/csu/m88k/crt0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crt0.c,v 1.7 2004/01/04 20:05:38 pvalchev Exp $ */
+/* $OpenBSD: crt0.c,v 1.8 2004/07/24 19:12:33 miod Exp $ */
/*
* Mach Operating System
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: crt0.c,v 1.7 2004/01/04 20:05:38 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: crt0.c,v 1.8 2004/07/24 19:12:33 miod Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -76,8 +76,23 @@ start(struct kframe *kfp)
__progname = __progname_storage;
}
-asm ("__callmain:"); /* Defined for the benefit of debuggers */
+__asm__ ("eprol:");
+
+#ifdef MCRT0
+ atexit(_mcleanup);
+ monstartup((u_long)&eprol, (u_long)&etext);
+#endif
+
+__asm__ ("__callmain:"); /* Defined for the benefit of debuggers */
exit(main(kfp->argc, argv, environ));
}
#include "common.c"
+
+#ifdef MCRT0
+__asm__ ("\
+ text\n\
+ global _eprol\n\
+_eprol:\n\
+");
+#endif