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: "Justin C. Walker" <email@hidden>
- Date: Thu, 28 Mar 2002 14:45:52 -0800
On Thursday, March 28, 2002, at 09:51 AM, Sean Morrell wrote:
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?
I don't think it's possible. There are two issues that make this a
problem: first, the run-time environment for the kernel and user spaces
are significantly different; and second, the kernel is expecting static
linkage, while the standard libraries you want to link against are
dynamic. There are a couple of kernel-specific libraries for both C and
C++ usage, but they are pretty limited.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | When LuteFisk is outlawed
| Only outlaws will have
| LuteFisk
*--------------------------------------*-------------------------------*
_______________________________________________
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.