Re: kextload failure on 10.5
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com I'm not set up at the moment to diagnose problems *on* 10.5, but I could check your kext's internals if you want to send it. Some things you could try are: nm fsd.kext kextfind -dsym _lck_mtx_unlock_darwin10 The first dumps all the symbols, so you can double check the nature of _lck_mtx_unlock_darwin10 (it's probably undefined but maybe there's a weird problem internally). The kextfind command should find which kext (if any) defines the symbol that's failing to link: on my Snow Leopard system it says Libkern.kext (com.apple.kpi.libkern, not com.apple.kernel.libkern) is the one that defines it for i386. Is that in your OSBundleLibraries? I'll have to dig out a 10.5. disk to run kextfind myself, but you can probably do that directly. Nik Gervae Kext Management Engineer Apple, Inc. On 23 Apr, 2010, at 15:42 , mogambo wrote:
Hi,
We have a file system driver kext that we build with make. We build two separate versions for 32- and 64-bit OS X since last year when 10.6 was released. I did some tweaks to the Makefile and was able to build a UB on 10.6.2 x86_64 machine containing code for all 3 architectures we support - ppc, i386 and x86_64. I was able to load the same kext on 10.4/ppc, 10.6/i386 and 10.6/x86_64.
When I tried to load the same kext on a 10.5.7/i386, it failed with the following errors: $ sudo kextload fsd.kext kld(): Undefined symbols: ___stack_chk_fail ___stack_chk_guard _lck_mtx_unlock_darwin10 kextload: kld_load_from_memory() failed for module /Users/apple/fsd-47.107/fsd.kext/Contents/MacOS/fsd kextload: a link/load error occured for kernel extension fsd.kext link/load failed for extension fsd.kext (run kextload with -t for diagnostic output)
I added -fno-stack-protector to gcc, which got rid of stack_chk{fail,guard} errors. However, _lck_mtx_unlock_darwin10 persists.
Here's the gcc command line: gcc -arch ppc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.4 -g -static -nostdinc -Wall -Wno-switch -fno-stack-protector -msoft-float -mlong-branch -force_cpusubtype_ALL -fno-builtin -DKERNEL -DAPPLE -D__KERNEL__ -DKERNEL_PRIVATE -DOPENSSL_NO_STDIO -DOPENSSL_NO_ENGINE -DOPENSSL_NO_FP_API -DOPENSSL_NO_SHA256 -DOPENSSL_NO_SHA512 -DOPENSSL_NO_ASM -DNO_OLD_ASN1 -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_BIO -DPROFILE -DOPENSSL_NO_ERR -I. -I.. -I/System/Library/Frameworks/Kernel.framework/Headers -I/System/Library/Frameworks/Kernel.framework/Headers/bsd -I/Users/apple/workspace/include -I/Developer/SDKs/MacOSX10.6.sdk -I/usr/include/sys -c probe.c -o probe.o
The linker command line: gcc -arch ppc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.4 -static -Wall -nostdlib -r -lkmod -lkmodc++ -lcc_kext -Xlinker -kext -o fsd <list of .o files>
Any ideas?
Thanks! -m. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/ngervae%40apple.com
This email sent to ngervae@apple.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Nik Gervae