Sign inSign up

daryltucker/binutils

By daryltucker

•Updated 8 months ago

Standalone GNU Binutils. Pre-built for custom toolchain development.

Image
Security
Integration & delivery
Developer tools
0

792

daryltucker/binutils repository overview

⁠Binutils Docker Images

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.


⁠Quick Start

# 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

⁠What is This?

These images contain standalone GNU Binutils - the fundamental tools for binary manipulation:

  • as - GNU Assembler
  • ld - GNU Linker
  • ar - Archive creator
  • objdump - Object file analyzer
  • ranlib - Archive indexer
  • nm - Symbol table viewer
  • strip - Symbol stripper
  • And more...

⁠Use Cases

ā šŸ”§ Custom Toolchain Building

Use 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...
ā šŸ› ļø Standalone Binary Tools

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
ā šŸ—ļø Assembly Development

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'

⁠Available Images

⁠Latest Versions
TagBinutilsDebian BaseNotes
2.44-bookworm2.44bookworm-slimLatest stable
2.43-bookworm2.43bookworm-slim
2.41-bullseye2.41bullseye-slim
2.40-bullseye2.40bullseye-slim
⁠Full Identity Tags

Format: {HOST_ARCH}-binutils-{VERSION}-{CODENAME}-{TARGET_ARCH}

Examples:

  • x86_64-binutils-2.43-bookworm-x86_64 - Full native build
  • x86_64-binutils-2.43-bookworm-aarch64 - Cross-compile target

Short tags (like 2.43-bookworm) refer to the native x86_64 build.


⁠Image Contents

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)

⁠Usage Examples

⁠Analyze Binary Structure
docker run --rm -v $(pwd):/work -w /work daryltucker/binutils:2.43-bookworm \
  /opt/binutils-2.43/bin/readelf -h myprogram
⁠Extract Debug Info
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
⁠Create Static Library
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
⁠Interactive Shell
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

⁠Why Standalone Binutils?

ā āœ… Version-Specific Tooling

Need a specific binutils version for compatibility? Pull the exact version you need.

ā āœ… Hermetic Builds

Built from source on clean Debian base. No host system pollution.

ā āœ… Build Acceleration

Using pre-built binutils as a base image saves 15-20 minutes per custom toolchain build.

ā āœ… Lightweight

Much smaller than full GCC toolchain images when you only need binutils.


⁠Relationship to GCC Images

Our daryltucker/gcc images include binutils (they're all-in-one toolchains).

Use binutils images when:

  • Building your own custom compiler
  • You only need binutils tools (no compiler)
  • You want a specific binutils version as a foundation

Use GCC images when:

  • You want a complete, ready-to-use compiler toolchain
  • You're compiling C/C++/Fortran code
  • You need GCC + binutils together

⁠Building Custom Toolchains

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.


⁠Source & Documentation

  • GitHub: github.com/daryltucker/gcc-docker⁠
  • Build System: Same hermetic build system as daryltucker/gcc
  • Built from: Official GNU Binutils sources
  • Philosophy: Self-contained, reproducible builds

⁠License

GNU 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

Tag summary

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