Date: Fri, 10 Aug 2007 14:14:37 -0500 From: "Biks N" <freebsd.dev@gmail.com> To: freebsd-hackers@freebsd.org Subject: Re: Using userland library in Kernel Message-ID: <50cd4e5f0708101214s74155d6bqecc8ed6ae80d7c87@mail.gmail.com> In-Reply-To: <20070808172535.GA8404@nowhere> References: <50cd4e5f0708080923p1d441e66ha6b42e277b55f8d@mail.gmail.com> <20070808172535.GA8404@nowhere>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50cd4e5f0708101214s74155d6bqecc8ed6ae80d7c87>