binutils Newspaper
OCTOBER 6, 2026
objdump — Committed

objdump: fix print formatters for 64-bit integers

David Faust committed a fix to objdump to use portable print formatters for 64-bit integers when dumping BTF info.

David Faust has committed a change to objdump that corrects the formatting of 64-bit integer values when displaying BTF (Basic Type Format) information. The previous implementation used non-portable formatting directives that caused issues on certain targets. This fix ensures that portable print formatters are used, improving compatibility and correctness across different platforms.

In the Thread 1 participant
  1. David Faust <david.faust@oss.qualcomm.com> proposer

    Committed a fix to objdump to use portable print formatters for 64-bit integers when dumping BTF info, resolving target-specific issues.

In Details

This commit addresses a portability issue in the objdump utility, specifically within the BTF dumping functionality. Commit 071f8a902eb29d29b9306b1425392e9fc73470f3 introduced BTF dumping but used non-portable C standard library format specifiers for 64-bit integers. This change replaces them with portable ones, ensuring correct output on all supported targets.

For Context
objdump
A standard utility in the binutils package used to display information from object files, including disassembly and symbol tables.
BTF
Brief Type Format, a compact representation of type information used in systems like the Linux kernel for features like eBPF.
print formatters
Specifiers used in C's printf-style functions (like printf, sprintf) to define how different data types should be represented as strings (e.g., %d for integers, %s for strings).
portable
Code or behavior that works consistently across different operating systems, architectures, and compiler versions without modification.
Filed Under: objdumpbtfportabilityformatting