Prebinding
Prebinding was an optimization technique used by early versions of macOS (formerly Mac OS X) to make applications launch faster. It worked with Mach-O files, the native format used for applications, libraries, and other executable code in macOS.
How prebinding worked
Applications often rely on shared libraries containing code used by multiple programs. Normally, a dynamic linker must locate these libraries, load them into memory, and resolve references to their functions and data. Prebinding performed some of this work in advance by assigning preferred memory addresses and recording resolved references before an application was launched.
Early versions of Mac OS X performed prebinding during software installation or during a system optimization process. While the process improved application launch time, changes to an application or one of its libraries could invalidate the prebinding information, requiring it to be regenerated. The technique also became less useful as operating systems adopted position-independent code and address space layout randomization (ASLR), which intentionally varies memory locations to improve security.
Prebinding in the modern era
Modern versions of macOS no longer use traditional prebinding. Instead, Apple's dynamic linker, known as dyld, uses technologies such as the shared dynamic linker cache and launch closures to load Mach-O applications efficiently. While these technologies have a similar effect, the term prebinding technically refers to the process used by early versions of Mac OS X.
Test Your Knowledge