Subject: Re: 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/10/2005 10:23:02
On Sun, Jan 09 2005 - 12:00, Andrey Petrov wrote:
> On Sun, Jan 09, 2005 at 11:32:31AM +0100, Joel CARNAT wrote:
> > # 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.
> > 
> 
> That's very strange. I suggest to retry with original compiler settings.
> 

 Indeed :)
 I've just retried (with no compiler flags things) and here's the result :

# ls -alh /netbsd /onetbsd
# /usr/src/sys/arch/sparc64/compile/GENERIC/netbsd
-rwxr-xr-x  1 root  wheel  5.6M Jan  8 22:30 /netbsd
-rwxr-xr-x  1 root  wheel  5.6M Dec  2 03:49 /onetbsd
-rwxr-xr-x  1 root  wheel  5.6M Jan 10 09:07 /usr/src/sys/arch/sparc64/compile/GENERIC/netbsd

# size /netbsd /onetbsd /usr/src/sys/arch/sparc64/compile/GENERIC/netbsd
   text    data     bss     dec     hex filename
5290904  119896  591880 6002680  5b97f8 /netbsd
5017811  163728  628752 5810291  58a873 /onetbsd
5017051  163792  628752 5809595  58a5bb /usr/src/sys/arch/sparc64/compile/GENERIC/netbsd

so sum up :
/netbsd		- customized GENERIC with devices commented
/onetbsd	- initial GENERIC (from install)
/usr/.../netbsd	- GENERIC compiled normally (aka, w/o any comp flags in mk.conf)

the nice news is that w/o the flags, the kernel compiles OK.

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