Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Introduce <sys/aout_mids.h>, and include it from <sys/core.h...
details: https://anonhg.NetBSD.org/src/rev/015979f02dea
branches: trunk
changeset: 746831:015979f02dea
user: he <he%NetBSD.org@localhost>
date: Thu Aug 20 22:07:49 2009 +0000
description:
Introduce <sys/aout_mids.h>, and include it from <sys/core.h> and
<sys/exec_aout.h>. This contains the various a.out machine IDs
moved out from exec_aout.h. The a.out machine IDs are not only
used to identify a.out executable files, but also used to identify
NetBSD core dumps, so should be accessible outside of exec_aout.h.
OK'ed by matt@
diffstat:
distrib/sets/lists/comp/mi | 3 +-
sys/sys/Makefile | 4 +-
sys/sys/aout_mids.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++
sys/sys/core.h | 4 ++-
sys/sys/exec_aout.h | 38 +------------------------
5 files changed, 77 insertions(+), 40 deletions(-)
diffs (175 lines):
diff -r ae1ac0412fa0 -r 015979f02dea distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Thu Aug 20 21:59:12 2009 +0000
+++ b/distrib/sets/lists/comp/mi Thu Aug 20 22:07:49 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1293 2009/08/15 16:21:04 joerg Exp $
+# $NetBSD: mi,v 1.1294 2009/08/20 22:07:49 he Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -1921,6 +1921,7 @@
./usr/include/sys/agpio.h comp-c-include
./usr/include/sys/aio.h comp-c-include
./usr/include/sys/ansi.h comp-c-include
+./usr/include/sys/aout_mids.h comp-c-include
./usr/include/sys/ataio.h comp-c-include
./usr/include/sys/atomic.h comp-c-include
./usr/include/sys/audioio.h comp-c-include
diff -r ae1ac0412fa0 -r 015979f02dea sys/sys/Makefile
--- a/sys/sys/Makefile Thu Aug 20 21:59:12 2009 +0000
+++ b/sys/sys/Makefile Thu Aug 20 22:07:49 2009 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.120 2009/08/15 09:43:59 mbalmer Exp $
+# $NetBSD: Makefile,v 1.121 2009/08/20 22:07:49 he Exp $
.include <bsd.sys.mk>
INCSDIR= /usr/include/sys
-INCS= acct.h agpio.h aio.h ansi.h ataio.h atomic.h audioio.h \
+INCS= acct.h agpio.h aio.h ansi.h aout_mids.h ataio.h atomic.h audioio.h \
bitops.h bootblock.h bswap.h buf.h \
callback.h callout.h cdefs.h cdefs_aout.h \
cdefs_elf.h cdio.h chio.h clockctl.h condvar.h conf.h core.h \
diff -r ae1ac0412fa0 -r 015979f02dea sys/sys/aout_mids.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/sys/aout_mids.h Thu Aug 20 22:07:49 2009 +0000
@@ -0,0 +1,68 @@
+/* $NetBSD: aout_mids.h,v 1.1 2009/08/20 22:07:49 he Exp $ */
+
+/*
+ * Copyright (c) 2009, The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _SYS_MACHINE_IDS_H_
+#define _SYS_MACHINE_IDS_H_
+
+
+/*
+ * a_mid - keep sorted in numerical order for sanity's sake
+ * ensure that: 0 < mid < 0x3ff
+ */
+#define MID_ZERO 0 /* unknown - implementation dependent */
+#define MID_SUN010 1 /* sun 68010/68020 binary */
+#define MID_SUN020 2 /* sun 68020-only binary */
+#define MID_PC386 100 /* 386 PC binary. (so quoth BFD) */
+#define MID_HP200 200 /* hp200 (68010) BSD binary */
+#define MID_I386 134 /* i386 BSD binary */
+#define MID_M68K 135 /* m68k BSD binary with 8K page sizes */
+#define MID_M68K4K 136 /* m68k BSD binary with 4K page sizes */
+#define MID_NS32532 137 /* ns32532 */
+#define MID_SPARC 138 /* sparc */
+#define MID_PMAX 139 /* pmax */
+#define MID_VAX1K 140 /* VAX 1K page size binaries */
+#define MID_ALPHA 141 /* Alpha BSD binary */
+#define MID_MIPS 142 /* big-endian MIPS */
+#define MID_ARM6 143 /* ARM6 */
+#define MID_M680002K 144 /* m68000 with 2K page sizes */
+#define MID_SH3 145 /* SH3 */
+#define MID_POWERPC 149 /* big-endian PowerPC */
+#define MID_VAX 150 /* VAX */
+ /* 151 - MIPS1 */
+ /* 152 - MIPS2 */
+#define MID_M88K 153 /* m88k BSD */
+#define MID_HPPA 154 /* HP PARISC */
+#define MID_SH5_64 155 /* LP64 SH5 */
+#define MID_SPARC64 156 /* LP64 sparc */
+#define MID_X86_64 157 /* AMD x86-64 */
+#define MID_SH5_32 158 /* ILP32 SH5 */
+#define MID_HP200 200 /* hp200 (68010) BSD binary */
+#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
+#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
+#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
+
+#endif /* _SYS_MACHINE_IDS_H_ */
diff -r ae1ac0412fa0 -r 015979f02dea sys/sys/core.h
--- a/sys/sys/core.h Thu Aug 20 21:59:12 2009 +0000
+++ b/sys/sys/core.h Thu Aug 20 22:07:49 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: core.h,v 1.11 2008/04/28 20:24:10 martin Exp $ */
+/* $NetBSD: core.h,v 1.12 2009/08/20 22:07:49 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -57,6 +57,8 @@
#define CORE_DATA 2
#define CORE_STACK 4
+#include <sys/aout_mids.h>
+
/*
* A core file consists of a header followed by a number of segments.
* Each segment is preceded by a `coreseg' structure giving the
diff -r ae1ac0412fa0 -r 015979f02dea sys/sys/exec_aout.h
--- a/sys/sys/exec_aout.h Thu Aug 20 21:59:12 2009 +0000
+++ b/sys/sys/exec_aout.h Thu Aug 20 22:07:49 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_aout.h,v 1.38 2005/12/26 18:41:36 perry Exp $ */
+/* $NetBSD: exec_aout.h,v 1.39 2009/08/20 22:07:49 he Exp $ */
/*
* Copyright (c) 1993, 1994 Christopher G. Demetriou
@@ -59,41 +59,7 @@
#define ZMAGIC 0413 /* demand load format */
#define QMAGIC 0314 /* "compact" demand load format; deprecated */
-/*
- * a_mid - keep sorted in numerical order for sanity's sake
- * ensure that: 0 < mid < 0x3ff
- */
-#define MID_ZERO 0 /* unknown - implementation dependent */
-#define MID_SUN010 1 /* sun 68010/68020 binary */
-#define MID_SUN020 2 /* sun 68020-only binary */
-#define MID_PC386 100 /* 386 PC binary. (so quoth BFD) */
-#define MID_HP200 200 /* hp200 (68010) BSD binary */
-#define MID_I386 134 /* i386 BSD binary */
-#define MID_M68K 135 /* m68k BSD binary with 8K page sizes */
-#define MID_M68K4K 136 /* m68k BSD binary with 4K page sizes */
-#define MID_NS32532 137 /* ns32532 */
-#define MID_SPARC 138 /* sparc */
-#define MID_PMAX 139 /* pmax */
-#define MID_VAX1K 140 /* VAX 1K page size binaries */
-#define MID_ALPHA 141 /* Alpha BSD binary */
-#define MID_MIPS 142 /* big-endian MIPS */
-#define MID_ARM6 143 /* ARM6 */
-#define MID_M680002K 144 /* m68000 with 2K page sizes */
-#define MID_SH3 145 /* SH3 */
-#define MID_POWERPC 149 /* big-endian PowerPC */
-#define MID_VAX 150 /* VAX */
- /* 151 - MIPS1 */
- /* 152 - MIPS2 */
-#define MID_M88K 153 /* m88k BSD */
-#define MID_HPPA 154 /* HP PARISC */
-#define MID_SH5_64 155 /* LP64 SH5 */
-#define MID_SPARC64 156 /* LP64 sparc */
-#define MID_X86_64 157 /* AMD x86-64 */
-#define MID_SH5_32 158 /* ILP32 SH5 */
-#define MID_HP200 200 /* hp200 (68010) BSD binary */
-#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
-#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
-#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
+#include <sys/aout_mids.h>
/*
* a_flags
Home |
Main Index |
Thread Index |
Old Index