Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sou...
details: https://anonhg.NetBSD.org/src/rev/f82277783514
branches: trunk
changeset: 810415:f82277783514
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sun Aug 30 01:46:02 2015 +0000
description:
Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources. Remove a hack
to set -DCOPY_SYMTAB from sys/conf/Makefile.kern.inc. Remove unnecessary
dependencies too.
diffstat:
sys/arch/amd64/amd64/locore.S | 5 +++--
sys/arch/i386/i386/locore.S | 9 +++++----
sys/arch/mac68k/mac68k/machdep.c | 7 ++++---
sys/conf/Makefile.kern.inc | 11 +----------
sys/conf/files | 6 ++++--
sys/kern/kern_ksyms.c | 9 +++++----
sys/kern/kern_ksyms_buf.c | 8 +++++++-
7 files changed, 29 insertions(+), 26 deletions(-)
diffs (198 lines):
diff -r e83d0ed290fa -r f82277783514 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S Sun Aug 30 01:33:20 2015 +0000
+++ b/sys/arch/amd64/amd64/locore.S Sun Aug 30 01:46:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.77 2014/08/17 21:17:43 joerg Exp $ */
+/* $NetBSD: locore.S,v 1.78 2015/08/30 01:46:02 uebayasi Exp $ */
/*
* Copyright-o-rama!
@@ -153,6 +153,7 @@
#include <machine/asm.h>
+#include "opt_copy_symtab.h"
#include "opt_ddb.h"
#include "opt_ddbparam.h"
#include "opt_modular.h"
@@ -520,7 +521,7 @@
/* Find end of kernel image. */
movl $RELOC(end),%edi
-#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(COPY_SYMTAB)
+#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(makeoptions_COPY_SYMTAB)
/* Save the symbols (if loaded). */
movl RELOC(esym),%eax
testl %eax,%eax
diff -r e83d0ed290fa -r f82277783514 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S Sun Aug 30 01:33:20 2015 +0000
+++ b/sys/arch/i386/i386/locore.S Sun Aug 30 01:46:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.113 2014/08/17 21:17:43 joerg Exp $ */
+/* $NetBSD: locore.S,v 1.114 2015/08/30 01:46:03 uebayasi Exp $ */
/*
* Copyright-o-rama!
@@ -129,9 +129,10 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.113 2014/08/17 21:17:43 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.114 2015/08/30 01:46:03 uebayasi Exp $");
#include "opt_compat_oldboot.h"
+#include "opt_copy_symtab.h"
#include "opt_ddb.h"
#include "opt_modular.h"
#include "opt_multiboot.h"
@@ -184,7 +185,7 @@
.ascii ",PAE=yes[extended-cr3]"
#endif
.ascii ",LOADER=generic"
-#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(COPY_SYMTAB)
+#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(makeoptions_COPY_SYMTAB)
.ascii ",BSD_SYMTAB=yes"
#endif
.byte 0
@@ -544,7 +545,7 @@
/* Find end of kernel image. */
movl $RELOC(end),%edi
-#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(COPY_SYMTAB)
+#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(makeoptions_COPY_SYMTAB)
/* Save the symbols (if loaded). */
movl RELOC(esym),%eax
testl %eax,%eax
diff -r e83d0ed290fa -r f82277783514 sys/arch/mac68k/mac68k/machdep.c
--- a/sys/arch/mac68k/mac68k/machdep.c Sun Aug 30 01:33:20 2015 +0000
+++ b/sys/arch/mac68k/mac68k/machdep.c Sun Aug 30 01:46:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.348 2014/08/17 21:17:44 joerg Exp $ */
+/* $NetBSD: machdep.c,v 1.349 2015/08/30 01:46:03 uebayasi Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -74,9 +74,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.348 2014/08/17 21:17:44 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.349 2015/08/30 01:46:03 uebayasi Exp $");
#include "opt_adb.h"
+#include "opt_copy_symtab.h"
#include "opt_ddb.h"
#include "opt_ddbparam.h"
#include "opt_kgdb.h"
@@ -961,7 +962,7 @@
* Get end of symbols for kernel debugging
*/
esym = (int *)getenv("END_SYM");
-#ifndef COPY_SYMTAB
+#ifndef makeoptions_COPY_SYMTAB
if (esym == (int *)0)
#endif
esym = (int *)&end;
diff -r e83d0ed290fa -r f82277783514 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc Sun Aug 30 01:33:20 2015 +0000
+++ b/sys/conf/Makefile.kern.inc Sun Aug 30 01:46:02 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.210 2015/08/29 16:27:07 uebayasi Exp $
+# $NetBSD: Makefile.kern.inc,v 1.211 2015/08/30 01:46:02 uebayasi Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -494,15 +494,6 @@
CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}}
CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
-locore.o machdep.o kern_ksyms.o: Makefile
-
-.if defined(COPY_SYMTAB)
-CPPFLAGS.locore.S+= -DCOPY_SYMTAB
-CPPFLAGS.machdep.c+= -DCOPY_SYMTAB
-CPPFLAGS.kern_ksyms.c+= -DCOPY_SYMTAB
-CPPFLAGS.kern_ksyms_buf.c+= -DCOPY_SYMTAB
-.endif
-
.if !defined(COPY_SYMTAB)
build_kernel: .USE
${SYSTEM_LD_HEAD}
diff -r e83d0ed290fa -r f82277783514 sys/conf/files
--- a/sys/conf/files Sun Aug 30 01:33:20 2015 +0000
+++ b/sys/conf/files Sun Aug 30 01:46:02 2015 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: files,v 1.1139 2015/08/29 14:07:45 uebayasi Exp $
+# $NetBSD: files,v 1.1140 2015/08/30 01:46:02 uebayasi Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
-version 20150830
+version 20150831
#
# device classes
@@ -29,6 +29,8 @@
defflag KEYLOCK
defparam opt_syslimits.h CHILD_MAX OPEN_MAX
+defparam opt_copy_symtab.h makeoptions_COPY_SYMTAB
+
defparam DEFCORENAME
defparam HZ
defparam MAXUPRC
diff -r e83d0ed290fa -r f82277783514 sys/kern/kern_ksyms.c
--- a/sys/kern/kern_ksyms.c Sun Aug 30 01:33:20 2015 +0000
+++ b/sys/kern/kern_ksyms.c Sun Aug 30 01:46:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_ksyms.c,v 1.80 2015/08/27 02:43:20 uebayasi Exp $ */
+/* $NetBSD: kern_ksyms.c,v 1.81 2015/08/30 01:46:02 uebayasi Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -73,9 +73,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.80 2015/08/27 02:43:20 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.81 2015/08/30 01:46:02 uebayasi Exp $");
#if defined(_KERNEL) && defined(_KERNEL_OPT)
+#include "opt_copy_symtab.h"
#include "opt_ddb.h"
#include "opt_dtrace.h"
#endif
@@ -127,7 +128,7 @@
#define SYMTAB_FILLER "|This is the symbol table!"
-#ifdef COPY_SYMTAB
+#ifdef makeoptions_COPY_SYMTAB
extern char db_symtab[];
extern int db_symtabsize;
#endif
@@ -231,7 +232,7 @@
ksyms_init(void)
{
-#ifdef COPY_SYMTAB
+#ifdef makeoptions_COPY_SYMTAB
if (!ksyms_loaded &&
strncmp(db_symtab, SYMTAB_FILLER, sizeof(SYMTAB_FILLER))) {
ksyms_addsyms_elf(db_symtabsize, db_symtab,
diff -r e83d0ed290fa -r f82277783514 sys/kern/kern_ksyms_buf.c
--- a/sys/kern/kern_ksyms_buf.c Sun Aug 30 01:33:20 2015 +0000
+++ b/sys/kern/kern_ksyms_buf.c Sun Aug 30 01:46:02 2015 +0000
@@ -1,6 +1,12 @@
+/* $NetBSD: kern_ksyms_buf.c,v 1.4 2015/08/30 01:46:02 uebayasi Exp $ */
+
+#if defined(_KERNEL_OPT)
+#include "opt_copy_symtab.h"
+#endif
+
#define SYMTAB_FILLER "|This is the symbol table!"
-#ifdef COPY_SYMTAB
+#ifdef makeoptions_COPY_SYMTAB
#ifndef SYMTAB_SPACE
char db_symtab[] = SYMTAB_FILLER;
#else
Home |
Main Index |
Thread Index |
Old Index