Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern When determining max/min sym value, ignore ABS symb...
details: https://anonhg.NetBSD.org/src/rev/321e6a043ddb
branches: trunk
changeset: 760372:321e6a043ddb
user: matt <matt%NetBSD.org@localhost>
date: Tue Jan 04 01:40:19 2011 +0000
description:
When determining max/min sym value, ignore ABS symbols which don't
have a type. This stops ksym thinking that the _KERNEL_OPT symbols
could actually be useful.
diffstat:
sys/kern/kern_ksyms.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (38 lines):
diff -r 543e9156473c -r 321e6a043ddb sys/kern/kern_ksyms.c
--- a/sys/kern/kern_ksyms.c Tue Jan 04 01:37:55 2011 +0000
+++ b/sys/kern/kern_ksyms.c Tue Jan 04 01:40:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_ksyms.c,v 1.61 2010/07/27 14:25:23 jakllsch Exp $ */
+/* $NetBSD: kern_ksyms.c,v 1.62 2011/01/04 01:40:19 matt Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.61 2010/07/27 14:25:23 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.62 2011/01/04 01:40:19 matt Exp $");
#if defined(_KERNEL) && defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -365,11 +365,14 @@
nglob += (ELF_ST_BIND(nsym[n].st_info) == STB_GLOBAL);
/* Compute min and max symbols. */
- if (nsym[n].st_value < tab->sd_minsym) {
- tab->sd_minsym = nsym[n].st_value;
- }
- if (nsym[n].st_value > tab->sd_maxsym) {
- tab->sd_maxsym = nsym[n].st_value;
+ if (strcmp(str + sym[i].st_name, "*ABS*") != 0
+ && ELF_ST_TYPE(nsym[n].st_info) != STT_NOTYPE) {
+ if (nsym[n].st_value < tab->sd_minsym) {
+ tab->sd_minsym = nsym[n].st_value;
+ }
+ if (nsym[n].st_value > tab->sd_maxsym) {
+ tab->sd_maxsym = nsym[n].st_value;
+ }
}
n++;
}
Home |
Main Index |
Thread Index |
Old Index