How Do Binaries work together? What breaks ABI?

For two (dynamic) libraries to work together they need: API compatibility ABI compatibility If you have correct function, parameter names, and are able to access it (itโ€™s not private) then youโ€™re good. The compiler validates if classA is using the correct Programming Interface from classB ๐Ÿ‘ˆ API (Application Programming Interface) Example of API usage struct House { var address = Address(streetAddress: "1100 Happy St.") } struct Person { var address = Address("1100 Sad St.") // โ€ผ๏ธ Missing argument label 'streetAddress:' in call } struct Address { let streetAddress: String } ABI compatibility is similar to API, but just at the binary level. The compiler is no longer involved. Whatโ€™s involved is the dynamic linker dyld. ...

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: ...