Skip to Main Content
Mac OS X for Unix Geeks
book

Mac OS X for Unix Geeks

by Ernest E. Rothman, Brian Jepson
September 2002
Beginner to intermediate content levelBeginner to intermediate
216 pages
7h 43m
English
O'Reilly Media, Inc.
Content preview from Mac OS X for Unix Geeks

Prebinding

Whenever you install an update to the Mac OS X operating system, there is a long phase at the end called optimization . What the splash screen calls “optimization” is a particular type of optimization, called prebinding, which applies only to Mach-O executables. We will only describe the essential idea behind prebinding. For more details and specific instructions on building libraries and executables with prebinding enabled, consult the document /Developer/Documentation/ReleaseNotes/Prebinding.html .

To understand what prebinding is and how it can speed up the launch of an application, let’s consider what happens when you launch an application that was built without prebinding. When such an application (or dynamic library) is built, ld (the static linker) records the names of undefined symbols (i.e., the names of symbols that the application must link against). Later, when the application is launched, the dynamic linker (dyld) must bind the undefined references from the application to their definitions.

In contrast, if an executable or dynamic library is built with prebinding, the binding essentially occurs at build time. In particular, the library is predefined at some specified address range, a process that would otherwise have to occur when an application is launched. Rather than mark symbols as undefined, the dynamic linker can use address symbols in a prebound library to reference when some other application or dynamic library links against it. Additionally, if ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X For Unix Geeks, 4th Edition

Mac OS X For Unix Geeks, 4th Edition

Ernest E. Rothman, Rich Rosen, Brian Jepson
Mac OS X Hacks

Mac OS X Hacks

Kevin Hemenway, Rael Dornfest
Mac OS X in a Nutshell

Mac OS X in a Nutshell

Jason McIntosh, Chuck Toporek, Chris Stone

Publisher Resources

ISBN: 0596003560Errata Page