DigiNews

Tech Watch Articles

← Back to articles

Long branches in compilers, assemblers, and linkers

Quality: 8/10 Relevance: 9/10

Summary

Long branches impose constraints on PC-relative branches across architectures. The article explains how compilers, assemblers, and linkers collaborate to resolve out-of-range branches via branch relaxation, instruction relaxation, and range-extension thunks. It also covers per-architecture limits and various linker approaches (lld, Mach-O, mold, GNU ld) for handling large binaries.

🚀 Service construit par Johan Denoyer