Re: Using userland library in Kernel

看板FB_hackers作者時間18年前 (2007/08/13 14:39), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/5 (看更多)
Thanks to everyone :) On 8/8/07, Craig Boston <cb@severious.net> wrote: > On Wed, Aug 08, 2007 at 11:23:25AM -0500, Biks N wrote: > > I am new to FreeBSD kernel programming and I am trying to use userland > > library (zlib) in FreeBSD kernel. But I am not sure if zlib library is > > linkable from the kernel. > > Normally, no, you can't just link in a library designed for userland > into the kernel. Some porting is required to deal with the kernel > environment -- things such as not having a full C library available, > different memory management, etc. > > In this case however, there is already a zlib implementation in the > kernel. IIRC, geom_uzip and the crypto framework both use it. > > You may want to check out sys/net/zlib.[ch] and see if it can do what > you're after. You'll need to make sure to include a dependency on the > zlib module and/or add it to your kernel configuration. > > Good luck, > Craig > _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #16l_o800 (FB_hackers)
文章代碼(AID): #16l_o800 (FB_hackers)