Re: Kextload bus error on PowerPC
Re: Kextload bus error on PowerPC
- Subject: Re: Kextload bus error on PowerPC
- From: Shantonu Sen <email@hidden>
- Date: Thu, 7 Jan 2010 15:18:32 -0800
You still haven't really given enough information, like the kextutil/kextload text output, or the backtrace in gdb (in userspace), or a sample kernel extension/recipe.
Apple supports kexts that deploy across this range of OSes. We have sample code and WWDC sessions about it.
I agree with Brian and I think you're wrong about the Mach-O header. The various tools would look at the fat header and gravitate to the ppc/ppc7400 slice. In fact, maybe that's the problem. Are you building with -mmacosx-version-min=10.4?
Shantonu Sen
email@hidden
Sent from my Mac Pro
On Jan 7, 2010, at 3:10 PM, Ryan McGann wrote:
>> * this isn't magic. You have a bus error because of code in your kext
> Well yes, but not really. The bus error is in *kextload*, not my code. In fact, my kext isn't even loaded. That's the problem.
>
>> * ppc machines completely ignore x86_64 architecture. The presence or
>> absence of such code in your kext is not relevant.
> Well, again not really. Once the kext is loaded that's true, but kextload (and libsa) both look at the Mach header of the kernel extension, and do some sanity checking. Because IOKit in 10.5 does not recognize the 64-bit architecture in the Mach header, it chokes on 64-bit kernel extensions when using -t with a bogus error message ("Executable does not contain kernel code"). This is a documented problem that you can find online from a lot of people, but it's a bogus error message, and therefore it's neither here nor there.
>
>> * you should use two machine debugging to diagnose this. You can use
>> an intel machine to connect to your ppc panic; just specify the -arch
>> keyword when invoking gdb
> Sorry, I'm kind of assuming previous experience that I've had with this. The panic is basically a red herring as well. The panic is the same as the kextload issue; the in-kernel linker is experiencing the same bus error that kextload experiences in userspace. Two machine debugging won't tell me anything because (a) our kernel extension is not in the backtrace, it's all in the kernel linker and (b) I know what the problem is—the kernel extension is somehow malformed—because kextload can't load the kext either.
>
> I'm just curious if anybody else has seen the same crash in kextload with a similar setup, and if they found a workaround.
>
> Ryan
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden