Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2001 10:01:15 +0900
From:      Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/release/i386 dokern.sh 
Message-ID:  <20011011100115Q.matusita@jp.FreeBSD.org>
In-Reply-To: <200110080343.f983htL29456@khavrinen.lcs.mit.edu>
References:  <200110051728.f95HSX738122@harmony.village.org> <20011007021605I.matusita@jp.FreeBSD.org> <200110080343.f983htL29456@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

wollman> I found that it helps a lot if you link the modules together into a
wollman> single kld (amortizing the overhead of the linker metadata over
wollman> multiple modules).  Just take the *.kld (NOT *.ko) from the object
wollman> directories and link them together with `ld -Bshareable'.

I've tried to confirm this.

* compile all kernel modules.
* copied *.kld into single directory.
* run 'ld -Bshareable -o merged.ko *.kld'.
	some modules conflicts about function definition. The
	conflicted modules pair are:
		if_sl/if_ppp
		nfsserver/nfsclient
		ng_sync_ar/if_ar
		ng_sync/sr/if_sr
		ng_vjc/if_ppp

* remove if_sr, if_ppp, nfs*, and ng_* modules and link again.
	# ld -Bshareable -o merged.ko *.kld
	# ls -l *.kld | wc
	     165    1485    9809
	# ls -l *.kld | awk '{sum+=$5} END {print sum}'
	6433815
	# ls -l merged.ko
	-rwxr-xr-x  1 root  wheel  5116576 Oct 11 00:41 merged.ko

Wow... it is worth trying to merge modules into single one. I'll try
it later.

***

BTW, why 'bge' and 'lge', gigabit ethernet drivers, are not in GENERIC
yet? it is still developing is not working, or just missed?

Before patch:
	kern.flp	 59 kbytes left
	mfsroot.flp	311 kbytes left

After patch #1 (remove some drivers out to kernel module):
	kern.flp	139 kbytes left
	mfsroot.flp	115 kbytes left

After patch #2 (#1 plus adding 'bge' and 'lge'):
	kern.flp	139 kbytes left
	mfsroot.flp	 95 kbytes left

We lost more 20kbytes in mfsroot.flp but it still fits to 1.44MB floppy.

-- -
Makoto `MAR' MATSUSHITA



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011011100115Q.matusita>