dyld-shared-cache-extractor
As of macOS Big Sur, instead of shipping the system libraries with macOS, Apple ships a generated cache of all built in dynamic libraries and excludes the originals. This tool allows you to extract these libraries from the cache for reverse engineering.
DYLDLIBRARYPATH Location of the path which contains Oracle libraries for instant client and SQL.Plus (e.g. Always required. Use bundled instant client. Export DYLDLIBRARYPATH=someValue man dyld says: DYLDLIBRARYPATH. This is a colon separated list of directories that contain libraries. The dynamic linker searches these directories before it searches the default locations for libraries. It allows you to test new versions of existing libraries.
Usage
Extract the default shared cache to /tmp/libraries
:
Installation
Homebrew:
Manually, after installing rust:
More details
There are a few different ways you can interact with these shared caches.
- Depending on what you're doing inspecting them in Hopper is the easiest option
- For a bit more functionality you can build the
dyld_shared_cache_util
target from the latestdyld
source dump, but this requires some modifications
The problem with the 2 options above is that they can lag behind format changes in the shared cache. This tool loads the private dsc_extractor.bundle
from Xcode, meaning whichever it should always be able to extract the newest versions of the file for beta OS versions.
This logic is based on the function at the bottom of dyld3/shared-cache/dsc_extractor.cpp
from the dyld
source dump.
Recently upgraded to the latest El Cap beta 15A216g. I have several build steps (Qt/clang/make/etc) that rely on DYLD_LIBRARY_PATH being set so that the proper libraries can be found. If I do this:
Dyld_library_path Linux
$ DYLD_LIBRARY_PATH=/path/to/libicu make
uic /Users/gtoronto/build/test/test.ui
dyld: Library not loaded: libicui18n.46.dylib
Referenced from: /usr/local/Qt-5.2.1/lib/QtCore.framework/Versions/5/QtCore
Reason: image not found
Dyld_library_path Mac Os
However if I do this:
$ DYLD_LIBRARY_PATH=/path/to/libicu uic /Users/gtoronto/build/test/test.ui
Dyld_library_path Windows
Then the file gets generated correctly. This started happening only when upgrading El Cap.