Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Apr 1999 21:22:11 +1000
From:      Stephen McKay <syssgm@detir.qld.gov.au>
To:        Greg Lehey <grog@lemis.com>
Cc:        freebsd-hackers@freebsd.org, syssgm@detir.qld.gov.au
Subject:   Re: Debug kernel by default (was: System size with -g) 
Message-ID:  <199904011122.VAA19831@nymph.detir.qld.gov.au>
In-Reply-To: <19990331165139.W413@lemis.com> from Greg Lehey at "Wed, 31 Mar 1999 16:51:39 %2B0930"
References:  <19990331165139.W413@lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, 31st March 1999, Greg Lehey wrote:

>To answer your question: a typical (partially) stripped kernel is
>about 1.8 MB in size.  The corresponding debug kernel is about 9 MB
>(since ELF; a.out debug kernels are about 3 MB larger).  This space is
>*in memory at all times*, so you don't normally want to load it, but
>it's good to have for dump analysis.

I think you are slightly out of date.  As a test, I just built a debugging
kernel and booted my 4.0 box *without* the normal 'strip -g kernel' bit.

The old kernel and the new:  (Yes, only up to #32 on this box!)

-rwxr-xr-x  2 root  wheel  8138961 Apr  1 19:05 /kernel
-rwxr-xr-x  1 root  wheel  1625374 Mar 18 20:09 /kernel.31
-rwxr-xr-x  2 root  wheel  8138961 Apr  1 19:05 /kernel.32

The old kernel boot messages (from kernel.31):

...
Mar 19 19:12:19 twoflower /kernel: CPU: i486 DX2 (486-class CPU)
Mar 19 19:12:19 twoflower /kernel: Origin = "GenuineIntel"  Id = 0x435  Stepping
=5
Mar 19 19:12:19 twoflower /kernel: Features=0x3<FPU,VME>
Mar 19 19:12:19 twoflower /kernel: real memory  = 16777216 (16384K bytes)
Mar 19 19:12:19 twoflower /kernel: avail memory = 13926400 (13600K bytes)
Mar 19 19:12:19 twoflower /kernel: Preloaded elf kernel "kernel" at 0xc02a9000.
...

The new kernel boot messages (from kernel.32):

...
Apr  1 20:31:48 twoflower /kernel: CPU: i486 DX2 (486-class CPU)
Apr  1 20:31:48 twoflower /kernel: Origin = "GenuineIntel"  Id = 0x435  Stepping
=5
Apr  1 20:31:48 twoflower /kernel: Features=0x3<FPU,VME>
Apr  1 20:31:48 twoflower /kernel: real memory  = 16777216 (16384K bytes)
Apr  1 20:31:48 twoflower /kernel: avail memory = 13914112 (13588K bytes)
Apr  1 20:31:48 twoflower /kernel: Preloaded elf kernel "kernel" at 0xc02ac000.
...


So it's 13600KB vs 13588K, which is pretty much the same.  So, I think that
ELF doesn't load the symbol table.  From now on I'm going to build a bigger
root partition and keep monster debugging kernels.

Stephen.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904011122.VAA19831>