liveBook · Manning

Binutils

As explained in Embedded Software with Rust

GNU Binutils is a collection of command-line utilities for inspecting, manipulating, assembling, and linking binary program files.

GNU Binutils is a set of command-line tools for inspecting and manipulating firmware binaries. It remains useful in embedded Rust workflows alongside newer build and inspection tools, and integrates with established flashing and debugging pipelines. section 2.3

Use these utilities to check different aspects of a compiled firmware image:

  • Use file to identify binary format, architecture, bitness, endianness, and linking attributes. section 2.3.1
  • Use hexdump or xxd to inspect raw bytes and verify data placement, such as magic numbers or interrupt vectors. section 2.3.1
  • Use nm to examine symbols, including interrupt handlers and static data; use size to estimate .text, .data, and .bss memory use. section 2.3.1
  • Use objcopy to convert an ELF firmware image to binary or Intel HEX format. section 2.3.1
arm-none-eabi-objcopy -O binary target/thumbv7m-none-eabi/release/
your_project your_project.bin

Example command for converting a release firmware image to binary format. section 2.3.1

How Embedded Software with Rust covers it

How deep it goes
Explains practical commands for checking binary metadata, raw contents, symbols, memory sections, and file conversion.
Examples
Shows ARM binary metadata, a HardFault symbol address, section-size output, and ELF-to-binary conversion.
What you can do after
Diagnose firmware images by inspecting their metadata, bytes, symbols, memory-section sizes, and file format.
How it connects
Connects embedded Rust workflows with firmware binaries, flashing, and debugging.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Embedded Software with Rust. The section links point to the parts of the book it draws on.