The series summarizes a six month journey where I leaerned a lot about compiler, linker, different kinds of linking, debug symbols, dSYM, xcframeworks, stripping, buiild settings, swiftc and more.
How Can I Inspect the Size Impact of Symbols in an App Binary: A Practical Guide for Apple Developers
In the previous posts we talked about Build Pipeline, Jargon, Static Linker vs Dynamic Linker. In this post we’ll benefit from the knowledge gained about the app wrapper’s folder structure and the placement of all the different binaries (frameworks and main app’s executable) to know where to look for. New in this post is learning how to use the nm command to inspect and count the number of symbols of each binary....
Optimizing Binaries - How Does the Linker Help Reduce App Size? What are the different types of linking - Part Two
In the previous post we talked about how the linker’s selective loading helps solve the bloat issue. But there are some other limitations to static linking. Because of those limitations software engineers created Dynamic libraries and the Dynamic Linker. In this post we’ll go through some of those limitations and discuss the trade-offs between the two ways of linking and their sizing impact.
Inspired by Link fast: Improve build and launch times - 15:47:...
Optimizing Binaries - How Does the Linker Help Reduce App Size? What are the different types of linking - Part One
In the previous post we talked about a problem with the linker: Linking a single function from a library could link to the entire library. This creates a lot of bloat. As a result some enhancements were made to linker. The enhancement was to be selective and only load symbols that you need.
Inspired by Link fast: Improve build and launch times - 4:15:
Selective Loading In a nutshell if you have the following source code written in C:...
Optimizing Binaries - Build Pipeline Jargon
To understand this post, I highly recommend everyone to watch the WWDC 2022 - Link fast: Improve build and launch times and WWDC 2018 - Behind the Scenes of the Xcode Build Process. They’re of the best talks I’ve ever seen.
This post covers some of the jargon and how it all comes together. And even though I love making puzzles, I’ll justify why I picked it as my cover....
Optimizing Binaries - High Level Xcode Build Pipeline
This the first post of a series I’m doing on how to optimize your app’s binaries. The post is more of a high level intro.
Depending on the action (build, run, test, profile, analyze, archive) of your scheme, the process will have all or some of the following steps:
Dependency analysis What happens when you press build? So the first step is for the build system to take the build description, your Xcode project file....