Subject: libkern growing...
To: None <tech-kern@NetBSD.ORG>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: tech-kern
Date: 05/27/1998 17:13:09
The whole "libkern" is included in every kernel at the moment (as an object).
I've appended a list of function which are not referenced in my system -
this sums up to about 12k (i386).
Not critical for an average system, but I think a different way of doing
it should be thought about.
Some ideas:
a) Make "libkern" a real library; put dummy references for the
functions which are considered needed for LKMs somewhere
inside "#ifdef LKM".
b) Make it a library; do some Makefile magic to generate "-u xxx"
linker arguments if LKM is defined.
c) Make an object as now, but allow to control which parts are
made (similar to "SA_INCLUDE_NET" in libsa).
d) Make a library and don't force inclusion of anything; require
LKMs to be prelinked against "libkern".

I didn't look into the details yet, but I'd probably prefer "a".
Perhaps a bit of "d" - for the gcc "___xxx" stuff.
Comments?

best regards
Matthias

_MD5Final
_MD5Init
_MD5Update
_SHA1Final
_SHA1Init
_SHA1Transform
_SHA1Update
___adddi3
___anddi3
___ashldi3
___ashrdi3
___iordi3
___lshldi3
___lshrdi3
___muldi3
___negdi2
___one_cmpldi2
___subdi3
___ucmpdi2
___xordi3
_bswap16
_bswap32
_bswap64
_ffs
_htonl
_htons
_imax
_imin
_lmax
_lmin
_max
_memcpy
_min
_ntohl
_ntohs
_strlen
_strncasecmp
_strrchr
_ulmax
_ulmin