Stripping IOKit kernel extensions
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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 rmcgann@mac.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ryan McGann