darwin-on-arm / xnu

Porting the Darwin kernel to the AArch64/ARMv7/ARMv6-A architectures.
Other
583 stars 145 forks source link

Undefined symbols for armv7 #42

Open johnothwolo opened 6 years ago

johnothwolo commented 6 years ago
LD mach_kernel.sys
ld: warning: ignoring file /Applications/Xcode8.3.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.cc_kext.a, missing required architecture armv7 in file /Applications/Xcode8.3.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.cc_kext.a (3 slices)
Undefined symbols for architecture armv7:
  "___divsi3.189", referenced from:
      IOService::notifyControllingDriverDone() in IOServicePM.cpo
  "___udivsi3.190", referenced from:
      IOService::tellClientsWithResponse(int) in IOServicePM.cpo
  "___udivsi3.281", referenced from:
      IOPMrootDomain::sysPowerDownHandler(void*, void*, unsigned long, IOService*, void*, unsigned int) in IOPMrootDomain.cpo
  "___udivsi3.282", referenced from:
      IOPMrootDomain::handleAggressivesRequests() in IOPMrootDomain.cpo
  "___udivsi3.283", referenced from:
      IOPMrootDomain::handleAggressivesRequests() in IOPMrootDomain.cpo
  "___udivsi3.284", referenced from:
      IOPMrootDomain::getAggressiveness(unsigned long, unsigned long*) in IOPMrootDomain.cpo
  "___udivsi3.62", referenced from:
      IOGeneralMemoryDescriptor::dmaCommandOperation(unsigned long, void*, unsigned int) const in IOMemoryDescriptor.cpo
  "___udivsi3.63", referenced from:
      IOGeneralMemoryDescriptor::wireVirtual(IODirection) in IOMemoryDescriptor.cpo
  "___udivsi3.64", referenced from:
      IOGeneralMemoryDescriptor::complete(IODirection) in IOMemoryDescriptor.cpo
  "___udivsi3.92", referenced from:
      _hibernate_write_image in IOHibernateIO.cpo
  "___udivsi3.94", referenced from:
      ProgressUpdate(hibernate_graphics_t*, unsigned char*, int, int) in IOHibernateIO.cpo
  "___udivsi3.95", referenced from:
      _hibernate_machine_init in IOHibernateIO.cpo
  "___umodsi3.10", referenced from:
  OSSymbolPool::removeSymbol(OSSymbol*) in OSSymbol.cpo
  "___umodsi3.9", referenced from:
      OSSymbolPool::findSymbol(char const*) const in OSSymbol.cpo
  "_memcpy.2", referenced from:
      IODataQueue::setNotificationPort(ipc_port*) in IODataQueue.cpo
  "_memcpy.417", referenced from:
      OSKext::getKmodInfo(kmod_info**, unsigned int*) in OSKext.cpo
  "_memcpy.91", referenced from:
      _IOHibernateSystemSleep in IOHibernateIO.cpo
  "_memset.13", referenced from:
      IOMemoryCursor::genPhysicalSegments(IOMemoryDescriptor*, unsigned long, void*, unsigned long, unsigned long, unsigned long*) in IOMemoryCursor.cpo
  "_memset.188", referenced from:
      IOService::addPowerChild(IOService*) in IOServicePM.cpo
  "_memset.93", referenced from:
      ProgressUpdate(hibernate_graphics_t*, unsigned char*, int, int) in IOHibernateIO.cpo
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/mac/xnu/xnu-arm/BUILD/obj//DEBUG_ARM_OMAP3530/./mach_kernel] Error 1
make[1]: *** [build_all] Error 2
make: *** [all] Error 2

This is similar to bug number #38 Using Xcode 9.0, Apple LLVM version 9.0.0 (clang-900.0.39.2)

johnothwolo commented 6 years ago

Fixed in a similar way to @b-man, will upload a patch by tomorrow.