kld displacement too large error
kld displacement too large error
- Subject: kld displacement too large error
- From: Michael Cashwell <email@hidden>
- Date: Wed, 2 Oct 2002 12:28:11 -0400
Greetings all,
I've been trying to get my kext to work with a portion of it coming
from a static library (containing C and C++ code). After considerable
effort I finally have the kext building. But when I try to kextload it
I get these obscure errors:
[dhcp02:/System/Library/Extensions] cashwell% sudo kextload -t
netShim.kext/
kextload: extension netShim.kext/ appears to be valid
kld(): /System/Library/Extensions/netShim.kext/Contents/MacOS/netShim
relocation overflow for relocation entry 32 in section (__TEXT,__text)
(displacement too large)
kld(): /System/Library/Extensions/netShim.kext/Contents/MacOS/netShim
relocation overflow for relocation entry 53 in section (__TEXT,__text)
(displacement too large)
kld(): /System/Library/Extensions/netShim.kext/Contents/MacOS/netShim
relocation overflow for relocation entry 58 in section (__TEXT,__text)
(displacement too large)
kextload: kld_load_from_memory() failed for module
/System/Library/Extensions/netShim.kext/Contents/MacOS/netShim
kextload: a link/load error occured for kernel extension netShim.kext/
load failed for extension netShim.kext/
I've tried "otool -r -v" on the executable but don't know how to
interpret the output.
Does anyone have clue what kld is complaining about here? How would I
map the "entry numbers" in the error message to the otool output? (Are
the decimal? Do they count from 0 or 1?, etc.)
Perhaps there's some compiler or libtool option that I should be using
to specify "wide" displacements when building either the library or the
kext?
Any clues would be appreciated.
Thanks,
Mike
_______________________________________________
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.