• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: kextload failure on 10.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kextload failure on 10.5


  • Subject: Re: kextload failure on 10.5
  • From: mogambo <email@hidden>
  • Date: Wed, 16 Jun 2010 12:22:08 -0700

Hello,

I am running into another problem while trying to build a universal kext pkg for a vfs pIugin.  I was able to create (lipo separate kext binaries) a universal binary for the kext that can run on ppc, i386 and x86_64.  I also created a universal binary for the mount program similarly.

The mount program compile cmdlines for i386 and ppc architectures both have "-isysroot $(SDKROOT10_4) -mmacosx-version-min=10.4", and the 64-bit version has "-isysroot $(SDKROOT10_6) -mmacosx-version-min=10.6".  However, when I try to run the mount program on Leopard, it tries to run the 64-bit version and mount() returns EFAULT.  I can understand that a 64-bit mount program cannot work with a 32-bit kernel extension.  The size of mount_data structure, the size of variables and alignment are all going to be different between the two.  Tracing the kext mount function, I see that it is not even getting called before the error is returned.

Is there a way to force what arch to run in a universal binary?  How does this work even when the mount program is created with xcode?

Thanks,
-m.

On Fri, Apr 30, 2010 at 12:25 PM, mogambo <email@hidden> wrote:
Hi Terry,

You can not specify multiple instances of -isysroot on a per architecture basis like this. You will need to separately compile your object files for each architecture and lipo them together.
I was looking into some other cocoa app that we build here and thinking on the same line.  I was able to compile separate object files and lipo them together.  The way I did this was create .o files and link them into a per-arch binary.  I then lipo'ed them together into a single UB.  I was able to load the kext successfully on 10.4 ppc, 10.5 i386 and 10.6 i386 and x86_64.

I am doing some regression testing and will go on to do some performance testing.  So far so good.

Thanks to all who helped.  I really appreciate it.
-m.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: kextload failure on 10.5
      • From: Terry Lambert <email@hidden>
  • Prev by Date: Re: Running .kext on iPhone OS
  • Next by Date: Re: Process exit notifcation in a kext
  • Previous by thread: Re: Process exit notifcation in a kext
  • Next by thread: Re: kextload failure on 10.5
  • Index(es):
    • Date
    • Thread