Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/csu/sparc64 Make this work before and after the kernel i...
details: https://anonhg.NetBSD.org/src/rev/45c01523d752
branches: trunk
changeset: 495294:45c01523d752
user: mycroft <mycroft%NetBSD.org@localhost>
date: Tue Jul 25 21:42:55 2000 +0000
description:
Make this work before and after the kernel is switched to DTRT with argc.
This is temporary, only to make the flag day less painful.
diffstat:
lib/csu/sparc64/crt0.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r e2fa6353c90e -r 45c01523d752 lib/csu/sparc64/crt0.c
--- a/lib/csu/sparc64/crt0.c Tue Jul 25 21:12:45 2000 +0000
+++ b/lib/csu/sparc64/crt0.c Tue Jul 25 21:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.13 2000/07/18 22:35:45 eeh Exp $ */
+/* $NetBSD: crt0.c,v 1.14 2000/07/25 21:42:55 mycroft Exp $ */
/*
* Copyright (c) 1995 Christopher G. Demetriou
@@ -79,7 +79,10 @@
long argc;
char **argv, *namep;
- argc = *(int *)sp;
+ argc = *(long *)sp;
+ /* XXXXX HACK */
+ if (argc >= 0x100000000)
+ argc >>= 32;
argv = sp + 1;
environ = sp + 2 + argc; /* 2: argc + NULL ending argv */
@@ -106,6 +109,7 @@
atexit(_fini);
_init();
+
exit(main(argc, argv, environ));
}
@@ -113,7 +117,7 @@
* NOTE: Leave the RCS ID _after_ _start(), in case it gets placed in .text.
*/
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: crt0.c,v 1.13 2000/07/18 22:35:45 eeh Exp $");
+__RCSID("$NetBSD: crt0.c,v 1.14 2000/07/25 21:42:55 mycroft Exp $");
#endif /* LIBC_SCCS and not lint */
/* XXX XXX XXX THIS SHOULD GO AWAY XXX XXX XXX
Home |
Main Index |
Thread Index |
Old Index