GNU Binutils
By the GNU Project
GNU Binutils is a collection of binary utility programs, including the GNU linker (ld), assembler (as), and tools for inspecting, disassembling, and manipulating object files and archives, that form a core part of the toolchain used to…
Definition
GNU Binutils is a collection of binary utility programs, including the GNU linker (ld), assembler (as), and tools for inspecting, disassembling, and manipulating object files and archives, that form a core part of the toolchain used to build compiled software on Unix-like systems. It is typically installed alongside the GNU Compiler Collection and is a required dependency for building most C and C++ software from source on Linux.
Overview
GNU Binutils addresses the need for a complete set of low-level tools that operate on the binary output of a compiler, since compiling source code into a working executable requires more than just translating source to machine instructions: the resulting object files must be assembled from textual assembly, linked together with libraries and other object files, and often inspected or modified afterward for debugging, packaging, or analysis purposes. Mechanically, Binutils bundles several distinct programs that each handle one stage or aspect of this process: `as`, the GNU assembler, translates assembly language into machine code object files; `ld`, the GNU linker, combines multiple object files and libraries into a final executable or shared library, resolving symbol references between them; and supporting tools like `objdump` (disassembles and inspects object files), `nm` (lists symbols), `strip` (removes debug and symbol information to shrink binaries), `ar` (creates and manages static library archives), and `readelf` (examines ELF file structure) round out the suite for everyday binary-level work. Binutils is the traditional Unix/Linux counterpart to the linker and assembler bundled with LLVM (`lld` and the LLVM integrated assembler), which have increasingly become drop-in alternatives offering faster link times and tighter integration with Clang. Compared to platform-specific toolchains like Microsoft's linker (`link.exe`) in the MSVC toolchain, Binutils is the standard choice across Linux distributions and embedded cross-compilation toolchains built around GCC. In practice, Binutils runs largely invisibly as part of every GCC-based build: when a developer runs `gcc` or `g++` to compile a program, it in turn invokes `as` to assemble generated assembly and `ld` to link the resulting object files. Developers interact with the individual tools directly for tasks like inspecting a compiled binary's symbol table with `nm`, disassembling machine code with `objdump` during debugging or reverse engineering, or stripping debug symbols from a release binary to reduce its size. The main limitation developers encounter is less about missing functionality and more about toolchain choice and compatibility: cross-compiling for embedded targets or unusual architectures requires a matching Binutils build for that target, and in performance-sensitive large builds, LLVM's `lld` linker has become a common substitute for GNU `ld` specifically because of significantly faster link times on very large projects, even when the rest of the toolchain remains GCC-based. Binutils versions are also tightly coupled to compiler and kernel compatibility in practice, so distributions and embedded SDKs typically pin specific Binutils, GCC, and kernel header versions together and test them as a unit rather than upgrading each component independently.
Key Features
- GNU assembler (as) translating assembly source into object files
- GNU linker (ld) combining object files and libraries into executables
- objdump for disassembling and inspecting compiled binaries
- nm for listing symbol tables in object files and executables
- strip for removing debug and symbol data to shrink binaries
- ar for creating and managing static library archives
- readelf and related tools for examining ELF binary structure
- Standard dependency for GCC-based build toolchains on Linux