Re: Linking to standard libs in building a KEXT
Re: Linking to standard libs in building a KEXT
- Subject: Re: Linking to standard libs in building a KEXT
- From: Frode Isaksen <email@hidden>
- Date: Fri, 29 Mar 2002 09:13:03 +0100
>
I would like to use some of the functions provided by the standard c or
>
c++ library from a KEXT. Is this possible? For instance, I would like to
>
use sin to debug some problems in my audio driver. Is the name mangling
>
different when code is being compiled for a kernel module? Can I link
>
against a dylib? What must be done to link against the standard
>
libraries, if this is possible?
>
>
Thanks,
>
>
Sean
I have linked my KEXT agains a re-compiled version of the standard math
library (libm). You can either compile both your driver and libm with
emulated floating point (-msoft-float) or both without, I can send you the
Makefile of the math library if you are interested. The only gotcha is that
the libm function "log" has the same name as the bsd function "log", so you
have to rename the first to something like "math_log".
Hilsen,
Frode
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.