Dynamic Loader Status

Contents

Possible options

Loader Strategy

Loader strategy for symbol lookup:

  • dlsym() on "__darwin_" + name, strip '$suffix' from name
  • dlsym() on name, strip '$suffix' from name
  • Search Darwin dynamic libraries for symbol called name

Maloader

Missing section handling

  • S_SYMBOL_STUBS - see MachOBinder.hpp, doBindIndirectSymbols()
  • S_CSTRING_LITERALS - not handled by original dyld
  • S_ZEROFILL - not handled
  • S_LAZY_DYLIB_SYMBOL_POINTERS - might have another alias?
  • S_INTERPOSING - register interposing, see ImageLoaderMachO::registerInterposing()
  • S_COALESCED - not handled
  • ...

Current status

  • no support for image unloading
  • no support for lazy loading
  • need to implement @rpath
  • only doing flat loading, reexports used in two-level namespaces are ignored; interesting notes on the topic of symbol order of search
  • other stuff should be quite OK

Links