Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Jul 2009 13:32:52 +0200
From:      Dimitry Andric <dimitry@andric.com>
To:        Ruben de Groot <mail25@bzerk.org>, Dan Naumov <dan.naumov@gmail.com>,  "Patrick M. Hausen" <hausen@punkt.de>, FreeBSD Stable Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: What is /boot/kernel/*.symbols?
Message-ID:  <4A51E0E4.4020707@andric.com>
In-Reply-To: <20090706093904.GA79434@ei.bzerk.org>
References:  <4A4E174A.1050207@andric.com>	<20090703144121.GC11039@hugo10.ka.punkt.de>	<4A4E1E24.3020303@andric.com>	<20090703152150.GE11039@hugo10.ka.punkt.de>	<20090705003834.12211k8697td2o74@webmail.private.lan>	<20090706073941.GA78371@ei.bzerk.org>	<20090706074256.GD6306@hugo10.ka.punkt.de>	<4A51B721.5020505@andric.com>	<cf9b1ee00907060141w110e36c3p5922d31b3acd1f62@mail.gmail.com>	<4A51B9FA.9010906@andric.com> <20090706093904.GA79434@ei.bzerk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2009-07-06 11:39, Ruben de Groot wrote:
>>> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>>>
>>> atom# du -hs /boot/kernel*
>>> 205M    /boot/kernel
>>
>> Right, so it's a lot bigger on amd64.  I guess those 64-bit pointers
>> aren't entirely free. :)
> 
> I'm not sure where the size difference comes from. I have some sparc64
> systems running -current with symbols and the size of /boot/kernel is
> more comparable to i386, even with the 8-byte pointer size:
> 
>> uname -p
> sparc64
>> du -sk /boot/kernel
> 137918  /boot/kernel

It looks like on amd64, the kernel is compiled with optimization flags:

  -O2 -frename-registers -pipe -fno-strict-aliasing

by default, while on i386, they are just:

  -O -pipe

Maybe this accounts for the huge difference?  Does -O2 do a lot more
inlining?

In any case, it's a weird inconstency, if you ask me.  But it's
intentional, as /usr/src/sys/conf/kern.pre.mk says:

. if ${MACHINE_ARCH} == "amd64"
COPTFLAGS?=-O2 -frename-registers -pipe
. else
COPTFLAGS?=${_MINUS_O} -pipe
. endif

where ${_MINUS_O} is by default just "-O", since DEBUG is enabled...



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