Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm26/stand/lib Clear the BSS at startup, since obj...
details: https://anonhg.NetBSD.org/src/rev/c44dfae93e69
branches: trunk
changeset: 513251:c44dfae93e69
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Fri Jul 27 00:21:18 2001 +0000
description:
Clear the BSS at startup, since objdump --outputformat=binary seems not to
output the BSS.
diffstat:
sys/arch/arm26/stand/lib/srt1.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 1875b3fccd42 -r c44dfae93e69 sys/arch/arm26/stand/lib/srt1.c
--- a/sys/arch/arm26/stand/lib/srt1.c Fri Jul 27 00:00:25 2001 +0000
+++ b/sys/arch/arm26/stand/lib/srt1.c Fri Jul 27 00:21:18 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: srt1.c,v 1.1 2001/07/26 22:11:10 bjh21 Exp $ */
+/* $NetBSD: srt1.c,v 1.2 2001/07/27 00:21:18 bjh21 Exp $ */
/*
* Copyright (c) 2001 Ben Harris.
@@ -55,12 +55,17 @@
int splitargs(char *, int, char**);
extern int main(int, char**);
+extern char edata[], end[];
+
void
__start(void)
{
int argc;
char *args, **argv;
+ /* Clear BSS */
+ memset(edata, 0, end - edata);
+
args = os_get_env(NULL, NULL);
argc = splitargs(args, 0, NULL);
Home |
Main Index |
Thread Index |
Old Index