binutils
Binutils guides you through GNU's binary manipulation toolkit for static library management, debug info handling, address-to-source mapping, and symbol demangling. Master ar for archives, strip and objcopy for binary processing, addr2line for crash analysis, and c++filt for C++ symbol names.
Binutils helps you manipulate compiled binaries using GNU tools for libraries, stripping, and crash analysis.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-06-27
Binutils helps you manipulate compiled binaries using GNU tools for libraries, stripping, and crash analysis. Binutils guides you through GNU's binary manipulation toolkit for static library management, debug info handling, address-to-source mapping, and symbol demangling. Master ar for archives, strip and objcopy for binary processing, addr2line for crash analysis, and c++filt for C++ symbol names.
Use it when
- Binutils provides two main approaches.
- Binutils' addr2line tool maps memory addresses back to source locations.
Verify before relying
Read SKILL.md below before installing (2 files). Open directory: indexed for reading, not audited.
Install
mohitmishra786/low-level-dev-skills/binutils · repository language: JavaScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I create a static library with ar?
Binutils' ar command packages object files into static libraries. Use `ar rcs libname.a file1.o file2.o` to create or update an archive, where 'r' replaces members, 'c' creates if needed, and 's' writes a symbol index. After creating the library, run `ranlib libname.a` to rebuild the symbol index for faster linking, or use ar's 's' flag to do it in one step.
How can I strip debug info from a binary?
Binutils provides two main approaches. The `strip` command removes all non-essential sections: `strip binary` produces a minimal executable. For finer control, use `objcopy --strip-debug binary stripped-binary` to remove only debug symbols while keeping other metadata, or `objcopy --strip-all` for complete stripping. This reduces file size significantly for production deployments.
How do I convert a crash address to source code line number?
Binutils' addr2line tool maps memory addresses back to source locations. Run `addr2line -e binary 0xaddress` to find the file and line number. For batch processing multiple addresses, pipe them to addr2line or use `addr2line -e binary < addresses.txt`. Ensure the binary retains debug symbols (compiled with -g) for accurate results.
How can I demangle C++ symbol names?
Binutils' c++filt utility decodes mangled C++ symbols. Use `c++filt _ZN3FooC1Ev` to display the readable function signature, or pipe symbol names: `echo '_ZN3FooC1Ev' | c++filt`. This is essential for analyzing compiled C++ binaries, crash dumps, and linker errors where symbols appear in their mangled form.
What does objcopy do for separating debug symbols?
Binutils' objcopy extracts debug information into separate files. Use `objcopy --only-keep-debug binary debug.sym` to create a debug file, then `objcopy --strip-debug binary` to remove debug from the original. Link them with `objcopy --add-gnu-debuglink=debug.sym binary`, allowing debuggers to find symbols without bloating the executable.
How do I extract strings from a compiled binary?
Binutils' strings command lists all printable text sequences embedded in a binary. Run `strings binary` to display human-readable strings, or `strings -n 8 binary` to show only strings at least 8 characters long. This helps identify configuration values, error messages, and other embedded text useful for reverse engineering and security analysis.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
GNU Binutils
Purpose
Guide agents through the binutils toolset for binary manipulation: static libraries, stripping, address-to-source mapping, and symbol demangling.
Triggers
- "How do I create a static library?"
- "How do I strip a binary but keep a debug file?"
- "I have an address from a crash — how do I find the source line?"
- "How do I demangle a C++ symbol name?"
- "How do I extract/replace sections in a binary?"
Workflow
1. ar — static library management
```bash
Create static library
ar rcs libfoo.a foo.o bar.o baz.o
List contents
ar t libfoo.a
Extract an object
ar x libfoo.a foo.o
Add/replace an object
ar r libfoo.a newbar.o
Delete an object
ar d libfoo.a oldbar.o
Show symbol index
nm libfoo.a
Rebuild symbol index (after
(truncated - see the full file via the links below)
File tree — 2 files
skills/binaries/binutils/SKILL.md
skills/binaries/binutils/references/cheatsheet.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Manipulate and process compiled binaries using GNU tools”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Master Linux binary analysis with workflows for examining symbol tables, section layout, dynamic linking, and debug information. Diagnose undefined symbol errors, identify binary bloat, and verify security hardening flags like PIE and RELRO using standard tools.
Master DWARF debug format fundamentals—the sections that store type, variable, and function metadata in ELF binaries. Learn to inspect debug info with dwarfdump and readelf, work with split DWARF (.dwo files) to reduce linker overhead, configure debuginfod for remote symbol servers, and navigate how LTO and stripping affect debug information.
Master linker selection, essential flags, and link-order resolution for GNU ld, gold, and lld. Learn to enable LTO with GCC or Clang, strip dead code with --gc-sections, and debug common linker errors like undefined symbols and circular dependencies.
Reverse Engineering equips you to analyze unknown binaries through structured workflows using Ghidra, radare2, and Binary Ninja. Master initial triage with standard tools, decompilation and scripting, C++ pattern recognition in stripped binaries, and binary diffing for vulnerability analysis.
Master Linux shared library fundamentals: create position-independent libraries with proper soname versioning, embed search paths using RPATH or RUNPATH, and debug loading failures with LD_DEBUG and ldd. Build plugin systems with dlopen/dlsym, intercept functions via LD_PRELOAD, and control symbol visibility to reduce binary bloat and namespace collisions.
Binary Hardening guides you through applying and validating security protections for C/C++ executables. Learn compiler and linker flags for RELRO, PIE, stack canaries, FORTIFY_SOURCE, and CFI, plus seccomp-bpf syscall filtering and hardware defenses like Intel CET and ARM BTI. Use checksec to audit existing binaries and confirm mitigations are in place.