Bring me to life; A tale of dyld, and how iOS launches your app
summary
Explains exactly what dyld does before main: parses Mach-O headers, mmaps text/data/linkedit pages, verifies per-page code signatures, recursively loads up to 400 dylibs, and performs rebasing and binding (fixing pointers via writable stubs) before registering Objective‑C runtime tables and running static initializers. Uses the print_statistics env var to show real timings (example run shows 1.5 seconds startup vs Apple’s goal of 400 milliseconds) and reports a case where switching a library to static reduced startup by 40%.
AI-written summary · about
chapters (32)
- 0:00Introduction
- 2:40Agenda
- 3:39What is macOS
- 4:44What are frameworks
- 5:19What is inside dyld
- 8:03macro headers
- 9:16macro header
- 10:52virtual memory
- 13:23copyonwrite
- 16:25Security
- 18:17Fun part
- 20:56What does dyld do
- 22:23Memory mapping
- 23:47Fixing pointers
- 24:45Rebasing
- 25:36Calling a function
- 25:51Function assembly
- 26:49Binding
- 27:45How does this work
- 28:56Setting up ObjectiveC Runtime
- 30:03Static Initializers
- 30:36C Initializers
- 30:51Summary
- 31:25Tips
- 31:40Profile
- 31:55Print Statistics
- 33:06Should you profile warm or cold launches
- 34:03Dynamic vs static libraries
- 35:18Extensions
- 35:44Use Case
- 35:57Reverse Engineering
- 36:09Conclusion
related talks
23mReducing App Launch Times: From Diagnostics to Optimization
01h 08mPlaying With the Limits: Can Your App Run Arbitrary Binary
45mDebug like a Pro
01h 02mOptimizing iOS App Launch Time
37mTake your iOS debugging skills to the next level
58miOS App Startup Time Optimization
31mLeveraging AppKit to Improve Your Catalyst App
44mRunning Apps on Your Own iOS Simulator
