Subject: Re: Kernel optimizations!
To: Sung N. Cho <netbsd-help@netbsd.org>
From: Tracy Nelson <tnelson158@attbi.com>
List: netbsd-help
Date: 05/09/2002 17:46:43
From: "Sung N. Cho" <sucho2@vt.edu>
> I was wondering, shouldn't turning on the optimization for gcc make the
> kernel bigger?

Depends on how the original kernel was compiled.  If it was compiled with
debugging info (-g flag), then it will certainly get smaller.  It's also
possible to optimize for size instead of speed, which would of course make
the kernel smaller also.  If you kernel was compiled with -O2 before,
though, it should have gotten bigger (since -O3 performes loop unrolling and
otherwise trades space for speed).

Is it possible you removed some options in your kernel config file?  I know
that when I ran the adjustkernel script and recompiled with only the devices
I need to support, my kernel size dropped from 4.7M to 2.5M.

Cheers!
-- Tracy