NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-evbarm/40311: No kernel symbols on tsarm
The following reply was made to PR port-evbarm/40311; it has been noted by
GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost, lloyd%must-have-coffee.gen.nz@localhost,
jmmv%NetBSD.org@localhost
Cc:
Subject: Re: port-evbarm/40311: No kernel symbols on tsarm
Date: Sun, 4 Jan 2009 13:27:23 +0100
--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Here is a patch (untested) that moves the SYMTAB_SPACE handling (once) into
ksyms_init() and does not need to ressurrect all the
ksyms_addsyms_elf(0, NULL, NULL) calls all over the tree.
Can someone please test if this works?
Martin
--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: kern_ksyms.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_ksyms.c,v
retrieving revision 1.49
diff -u -p -r1.49 kern_ksyms.c
--- kern_ksyms.c 1 Jan 2009 19:10:17 -0000 1.49
+++ kern_ksyms.c 4 Jan 2009 12:23:56 -0000
@@ -210,6 +210,14 @@ void
ksyms_init()
{
+#ifdef SYMTAB_SPACE
+ if (!ksyms_initted &&
+ strncmp(db_symtab, SYMTAB_FILLER, sizeof(SYMTAB_FILLER))) {
+ ksyms_addsyms_elf(db_symtabsize, db_symtab,
+ db_symtab + db_symtabsize)
+ }
+#endif
+
mutex_init(&ksyms_lock, MUTEX_DEFAULT, IPL_NONE);
}
@@ -347,14 +355,6 @@ ksyms_addsyms_elf(int symsize, void *sta
size_t strsize = 0;
Elf_Ehdr *ehdr;
-#ifdef SYMTAB_SPACE
- if (symsize <= 0 &&
- strncmp(db_symtab, SYMTAB_FILLER, sizeof(SYMTAB_FILLER))) {
- symsize = db_symtabsize;
- start = db_symtab;
- end = db_symtab + db_symtabsize;
- }
-#endif
if (symsize <= 0) {
printf("[ Kernel symbol table missing! ]\n");
return;
--J/dobhs11T7y2rNN--
Home |
Main Index |
Thread Index |
Old Index