Subject: Re: Re: Re: Re: Re: "overlaps section .rodata" on kernel build
To: Andrey Petrov <petrov@netbsd.org>
From: Joel CARNAT <joel@carnat.net>
List: port-sparc64
Date: 01/09/2005 11:32:31
On Sat, Jan 08 2005 - 16:52, Andrey Petrov wrote:
> On Sat, Jan 08, 2005 at 11:09:07PM +0100, Joel CARNAT wrote:
> > On Sat, Jan 08 2005 - 13:54, Andrey Petrov wrote:
> > > On Sat, Jan 08, 2005 at 10:33:20PM +0100, Joel CARNAT wrote:
> > > > right, so I commented out a lots of things (thX sysutils/adjustkernel ;) and 
> > > > the kernel compiled till the end !
> > > > 
> > > > what looks strange is that the kernel is 5.6M... the same size as GENERIC...
> > > > 
> > > 
> > > File size doesn't mean much, you need to use size(1) or objdump(1). Also
> > 
> >  ah ? I thought having code (or not) for devices would make it bigger (or smaller),
> >  especially when everything is inside the kernel.
> > 
> 
> Not sure I follow. Try 'size netbsd' on both kernels and you should see difference.
> 

# size /netbsd /onetbsd
   text    data     bss     dec     hex filename
5290904  119896  591880 6002680  5b97f8 /netbsd
5017811  163728  628752 5810291  58a873 /onetbsd

 what I meant was : If there is one code line per device driver, the more devices you define
 in your kernel, the more code lines it will contain. the kernel would be bigger (or smaller) then.
 the only exception I could see was if the devices were build "outside" the kernel - like /lib/modules/* in linux.

 what surprised me is that, on i386, when you comment the devices, the kernel does end smaller.
 but maybe this is due to the big number of devices commented compared to the sparc64 arch.

> > > I would not set commonly used definitions as CFLAGS and friends in mk.conf,
> > > they just have too global impact. For kernel build look at sys/conf/Makefile.kern.inc
> > > and set specificly what you need. I also don't see a reason not to use compiler
> > > optimisation.
> > > 
> > 
> >  hum... I don't really know... after a few testings I discovered that stilling linux/gentoo
> >  optimization flags just made buggy netbsd binaries, so I used "Benedikt Meurer's NetBSD tips & tricks"
> >  to delete any optimization.
> > 
> 
> It was true for older 2.95.x version of compiler, since gcc3.3 was integrated the
> situation was changed dramitically especially for sparc64. You can use optimisation
> now.
> 

 OK, I'll remove my flags from mk.conf and get my boxes run faster =)

-- 

,- This mail runs ------.
`--------- NetBSD/i386 -'