Standalone GNU Binutils. Pre-built for custom toolchain development.
792
Hermetic, standalone GNU Binutils built from source
Self-contained binutils packages (assembler, linker, objdump, etc.) for building custom toolchains or standalone use. Built on Debian base with complete binutils suite.
# Pull the latest binutils 2.43
docker pull daryltucker/binutils:2.43-bookworm
# Use the assembler
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
/opt/binutils-2.43/bin/as -o hello.o hello.s
# Use the linker
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
/opt/binutils-2.43/bin/ld -o hello hello.o
These images contain standalone GNU Binutils - the fundamental tools for binary manipulation:
as - GNU Assemblerld - GNU Linkerar - Archive creatorobjdump - Object file analyzerranlib - Archive indexernm - Symbol table viewerstrip - Symbol stripperUse these as base images when building your own GCC or other compilers:
FROM daryltucker/binutils:2.44-bookworm AS binutils-base
FROM debian:bookworm-slim
COPY --from=binutils-base /opt/binutils-2.44 /opt/binutils-2.44
# Continue with GCC build...
Use binutils without a full compiler suite:
# Disassemble a binary
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
/opt/binutils-2.43/bin/objdump -d mybinary
# Inspect symbols
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
/opt/binutils-2.43/bin/nm -D mylib.so
Direct assembly programming without a compiler:
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
sh -c '/opt/binutils-2.43/bin/as -o prog.o prog.s && \
/opt/binutils-2.43/bin/ld -o prog prog.o'
| Tag | Binutils | Debian Base | Notes |
|---|---|---|---|
2.44-bookworm | 2.44 | bookworm-slim | Latest stable |
2.43-bookworm | 2.43 | bookworm-slim | |
2.41-bullseye | 2.41 | bullseye-slim | |
2.40-bullseye | 2.40 | bullseye-slim |
Format: {HOST_ARCH}-binutils-{VERSION}-{CODENAME}-{TARGET_ARCH}
Examples:
x86_64-binutils-2.43-bookworm-x86_64 - Full native buildx86_64-binutils-2.43-bookworm-aarch64 - Cross-compile targetShort tags (like 2.43-bookworm) refer to the native x86_64 build.
Each image contains:
/opt/binutils-{VERSION}/
āāā bin/ # All binutils executables
ā āāā as # Assembler
ā āāā ld # Linker
ā āāā ar # Archive tool
ā āāā objdump # Object analyzer
ā āāā objcopy # Object copier
ā āāā ranlib # Archive indexer
ā āāā nm # Symbol lister
ā āāā strip # Symbol stripper
ā āāā size # Section sizer
ā āāā addr2line # Address resolver
ā āāā readelf # ELF reader
āāā lib/ # BFD and other libraries
āāā include/ # Binutils headers (for development)
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
/opt/binutils-2.43/bin/readelf -h myprogram
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
/opt/binutils-2.43/bin/objcopy --only-keep-debug myprogram myprogram.debug
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
/opt/binutils-2.43/bin/ar rcs libmycode.a obj1.o obj2.o obj3.o
docker run -it --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm bash
export PATH=/opt/binutils-2.43/bin:$PATH
as --version
ld --version
Need a specific binutils version for compatibility? Pull the exact version you need.
Built from source on clean Debian base. No host system pollution.
Using pre-built binutils as a base image saves 15-20 minutes per custom toolchain build.
Much smaller than full GCC toolchain images when you only need binutils.
Our daryltucker/gcc images include binutils (they're all-in-one toolchains).
Use binutils images when:
Use GCC images when:
Example Dockerfile using our binutils as a base:
FROM daryltucker/binutils:2.44-bookworm AS binutils-base
FROM debian:bookworm-slim AS builder
# Copy pre-built binutils
COPY --from=binutils-base /opt/binutils-2.44 /opt/binutils-2.44
# Install build deps
RUN apt-get update && apt-get install -y \
build-essential curl texinfo bison flex gawk
# Download and build GCC
RUN curl -O https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz
# ... build GCC using /opt/binutils-2.44 ...
This saves significant build time by reusing pre-built binutils.
daryltucker/gccGNU Binutils is distributed under the GNU GPL. These Docker images and build configurations are provided as-is.
Last Updated: 2025-12-22
Maintained by: Daryl Tucker
Content type
Image
Digest
sha256:8881d78c3ā¦
Size
127.6 MB
Last updated
8 months ago
docker pull daryltucker/binutils:x86_64-binutils-2.43-bookworm-aarch64