Adopting the Parallel DWARF linker in dsymutil

On Apple platforms, the development experience was designed around making the compile-link-debug cycle as fast as possible. For debugging, that means that rather than processing large amounts of DWARF to link it into the final binary, the linker leaves the debug info in the object files and records a debug map that tells the debugger where to find it. When you’re debugging locally, that’s all you need. But if you want to archive the debug info for crash reporting or remote debugging, you need a way to produce a self-contained bundle....

May 2, 2026

dsymutil's Lockstep Algortihm

I was recently answering questions about dsymutil’s multi-threading model and lockstep algorithm. I decided to write it down here for future reference. This article focuses on types and the .debug_info section. Background As a reminder, dsymutil is an optimizing DWARF linker. It only retains debug info for elements that appear in the final executable. It uses the One Definition Rule (ODR) to unique C++ types. As will become clear, both of these heavily shaped its design....

June 3, 2025

Mach-O File Format 4GB Limit

Mach-O (Mach Object) is a binary file format used by macOS and iOS for executables, libraries, and object code. A Mach-O file consists of a header, followed by a series of load commands, and then a series of segments. The 4GB Limitations The original 32-bit format used 32-bit offsets, which can address a maximum of 2^32 bytes, or 4GB of memory. The 64-bit variant uses 64-bit offsets, vastly increasing the addressable memory space....

February 6, 2025

Statistics in dsymutil

To make incremental builds fast on macOS, the static linker (ld) ignores the debug information. It can easily be a magnitude bigger than the rest of the program and slow down link time. Instead the linker emits a debug map which contains the location of all the object files it relocated so that debug info consumers (such as the debugger) know where to find the DWARF debug info. This approach works great during development and greatly speeds up the build-debug cycle....

May 17, 2020