• 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
Stripping IOKit kernel extensions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stripping IOKit kernel extensions


  • Subject: Stripping IOKit kernel extensions
  • From: Ryan McGann <email@hidden>
  • Date: Tue, 12 Sep 2006 14:28:39 -0700

Hello,

I am trying to strip my IOKit driver and am running into problems. Spefically, kextload crashes (bus error) when it attempts to load the kext when I strip it. It loads fine without stripping.

I found a discussion about this very issue in the archives, but I didn't see a resolution for the OP.

I have a symbols file which contains  _kmod_info, and all symbols for my driver (both static data and methods). When I strip the executable, I use strip -u -s <symbols.txt> <path to kext binary>. I get a nice trim binary that contains only _kmod_info and the following symbols (I've included their demanged form, but the symbols file contains the mangled names of course):
com_foo_bar_service_kext::gMetaClass
com_foo_bar_service_kext::superClass
com_foo_bar_service_kext::start(IOService*)
com_foo_bar_service_kext::MetaClass::MetaClass()
com_foo_bar_service_kext::MetaClass::MetaClass()
#com_foo_bar_service_kext::MetaClass::~MetaClass()
com_foo_bar_service_kext::metaClass
com_foo_bar_service_kext::terminate(unsigned long)
com_foo_bar_service_kext::com_foo_bar_service_kext(OSMetaClass const*)
com_foo_bar_service_kext::com_foo_bar_service_kext()
com_foo_bar_service_kext::com_foo_bar_service_kext(OSMetaClass const*)
com_foo_bar_service_kext::com_foo_bar_service_kext()
com_foo_bar_service_kext::~com_foo_bar_service_kext()
com_foo_bar_service_kext::~com_foo_bar_service_kext()
com_foo_bar_service_kext::getMetaClass() const
com_foo_bar_service_kext::MetaClass::alloc() const
vtable for com_foo_bar_service_kext
vtable for com_foo_bar_service_kext::MetaClass


I'm not sure what other symbols I need to include in the binary to prevent kextload from crashing. Is there a way to do this from Xcode? If not, what's the proper strip/nmedit command needed to do what is necessary? This is all on Tiger with Xcode 2.3.

Thanks,
Ryan

-- Ryan
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

  • Prev by Date: userspace access to PCI config space?
  • Next by Date: Re: Stripping IOKit kernel extensions
  • Previous by thread: userspace access to PCI config space?
  • Next by thread: Re: Stripping IOKit kernel extensions
  • Index(es):
    • Date
    • Thread