Re: Link/Load Errors
Re: Link/Load Errors
- Subject: Re: Link/Load Errors
- From: Brian Bergstrand <email@hidden>
- Date: Wed, 10 Dec 2003 14:28:53 -0600
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Looks like you are compiling with the C++ compiler (maybe an IOKIt
extension), this is mangling the getsock() symbol name:
>
kld(): Undefined symbols:
>
__Z7getsockP8filedesciPP4file
This means that the header that declares getsock() does not have '
extern "C" {} ' protection, so when you include the header in your
code, you will have to provide that protection yourself. In general,
this will be true for any non-IOKit kernel header. They expect the C
compiler.
extern "C" {
#include <sys/socketvar.h>
}
HTH.
On Dec 10, 2003, at 1:24 PM, Matt Jaffa wrote:
>
I have made a kernel Extension and i am using the getsock
>
function within in it.
>
>
WebDAV uses it just fine,
>
>
Mine compiles and everything but when i load it, I get this error
>
So obviously it is not linking right, In The Project in Expert view
>
am I suppose to include something or what is going on?
>
>
Matt-Jaffas-Computer:~ matt$ sudo kextload -t
>
/System/Library/Extensions/KnowControl.kext/
>
kextload: extension /System/Library/Extensions/KnowControl.kext/
>
appears to be valid
>
kextload: notice: extension
>
/System/Library/Extensions/KnowControl.kext/ has debug properties set
>
kld(): Undefined symbols:
>
__Z7getsockP8filedesciPP4file
>
kextload: kld_load_from_memory() failed for module
>
/System/Library/Extensions/KnowControl.kext/Contents/MacOS/KnowControl
>
kextload: a link/load error occured for kernel extension
>
/System/Library/Extensions/KnowControl.kext/
>
load failed for extension /System/Library/Extensions/KnowControl.kext/
>
(run kextload with -t for diagnostic output)
>
>
Thanks,
>
>
Matt
>
Brian Bergstrand <
http://www.bergstrand.org/brian/>
PGP Key: <
http://www.bergstrand.org/brian/misc/public_key.txt>
AIM: triryche206
One advantage of talking to yourself is that you know at least
somebody's listening. - Franklin P. Jones
As of 02:21:40 PM, iTunes is playing "Dancing Nancies" from "Under The
Table And Dreaming" by "Dave Matthews Band"
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3
iQA/AwUBP9d0AXnR2Fu2x7aiEQIBogCfdrhSV78K2fKxD1PEej+YmyxErz4AoM8H
TuiNQrnf1eKIwN9c21ysYAjh
=O3fZ
-----END PGP SIGNATURE-----
_______________________________________________
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.