Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pmax/stand/lib When loading an a.out kernel and kee...
details: https://anonhg.NetBSD.org/src/rev/830707666558
branches: trunk
changeset: 467467:830707666558
user: simonb <simonb%NetBSD.org@localhost>
date: Thu Mar 25 03:38:53 1999 +0000
description:
When loading an a.out kernel and keeping the exec header, if it's OMAGIC
put the exec header below kernel text.
diffstat:
sys/arch/pmax/stand/lib/loadfile.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r a3d01945633e -r 830707666558 sys/arch/pmax/stand/lib/loadfile.c
--- a/sys/arch/pmax/stand/lib/loadfile.c Thu Mar 25 03:38:00 1999 +0000
+++ b/sys/arch/pmax/stand/lib/loadfile.c Thu Mar 25 03:38:53 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile.c,v 1.1 1999/03/24 23:51:26 simonb Exp $ */
+/* $NetBSD: loadfile.c,v 1.2 1999/03/25 03:38:53 simonb Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -467,11 +467,16 @@
* The kernel may use this to verify that the
* symbols were loaded by this boot program.
*/
- if (flags & LOAD_HDR)
- BCOPY(x, maxp, sizeof(*x));
- if (flags & (LOAD_HDR|COUNT_HDR))
- maxp += sizeof(*x);
-
+ if (magic == OMAGIC) {
+ if (flags & LOAD_HDR)
+ BCOPY(x, maxp - sizeof(*x), sizeof(*x));
+ }
+ else {
+ if (flags & LOAD_HDR)
+ BCOPY(x, maxp, sizeof(*x));
+ if (flags & (LOAD_HDR|COUNT_HDR))
+ maxp += sizeof(*x);
+ }
/*
* Read in the text segment.
Home |
Main Index |
Thread Index |
Old Index