What is /boot/kernel/*.symbols?

Dimitry Andric dimitry at andric.com
Mon Jul 6 11:32:55 UTC 2009


On 2009-07-06 11:39, Ruben de Groot wrote:
>>> root at 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...


More information about the freebsd-stable mailing list