Date: Tue, 11 Apr 2000 15:57:07 +0930 From: Greg Lehey <grog@lemis.com> To: Eric Ogren <eogren@earthlink.net> Cc: "James B. Wilkinson" <jimmy@CS.cofc.EDU>, questions@FreeBSD.ORG Subject: Re: HUGE kernel built from 3.2 CDRom Message-ID: <20000411155707.N26373@freebie.lemis.com> In-Reply-To: <20000410231204.A3861@earthlink.net> References: <bulk.38192.20000410085533@hub.freebsd.org> <l03020901b518434f39ed@[153.9.17.27]> <20000410231204.A3861@earthlink.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 10 April 2000 at 23:12:04 -0400, Eric Ogren wrote: > On Mon, Apr 10, 2000 at 10:58:36PM -0400, James B. Wilkinson wrote: >> One of the machines in my networking lab has three Ethernet cards in it. >> This seems to require a rebuild of the kernel. I edited GENERIC and added >> ed1 and ed2 right after ed0. The kernel built fine, and it works ok, but it >> is almost 11 MB, whereas the GENERIC kernel is 2,329,748 bytes. So I ran >> strip on the new kernel, and that made it small allright, 2017520 bytes. It >> still works ok, but dmesg doesn't work with it, and I forgot to try ps, but >> I'll bet that it doesn't work, either. Is there something like a partial >> strip that I need to do? My root filesystem is getting crowded. > > By any chance did you run "config -g KERNEL" or do you have a > "-g" hanging around in your /etc/make.conf somewhere? It looks like you > managed to build a debug kernel, and the debugging symbols are big, as > you've noticed. > You also noticed that stripping a kernel is going to cause Bad > Things(tm) to happen; I wouldn't recommend it. This isn't quite correct. Kernels with full symbols contain two different kinds of symbols: global symbols and debug symbols. Some programs, such as dmesg, need the global symbols. It's the debug symbols which cause the "bloat". Correspondingly, there are different ways to strip a kernel. Use 'strip kernel' to remove all symbols; this will cause some programs to fail. Use 'strip -g kernel' to remove only the debugging symbols. I personally recommend keeping the debug symbols. If you ever have a panic and want to find out why, you'll need the symbols. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000411155707.N26373>