skillfed

elf-inspection

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.

ELF Inspection guides you through analyzing Linux binaries using readelf, objdump, nm, and ldd to examine symbols, sections, and dependencies.

AI-generated summary based on this skill's SKILL.md

148 19 MIT updated by mohitmishra786

Install

mohitmishra786/low-level-dev-skills/elf-inspection · repository language: JavaScript

git clone https://github.com/mohitmishra786/low-level-dev-skills
cp -r low-level-dev-skills/skills/binaries/elf-inspection ~/.claude/skills/elf-inspection
npx skillfed install mohitmishra786/low-level-dev-skills/elf-inspection

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to check what libraries a binary depends on?

elf-inspection helps you examine dynamic linking dependencies using standard tools. Run `ldd <binary>` to list all required shared libraries and their paths. For more detail, use `readelf -d <binary>` to inspect the DYNAMIC section, or `objdump -p <binary>` to see program headers. elf-inspection guides you through interpreting these outputs to diagnose missing libraries and linking issues.

What causes undefined reference errors in Linux binaries?

elf-inspection teaches you to diagnose undefined symbol and linker errors by inspecting symbol tables. Use `nm <binary>` to list symbols and identify undefined ones (marked 'U'). Check `readelf -s <binary>` for detailed symbol info including binding and visibility. elf-inspection helps you trace whether symbols are missing from dependencies, incorrectly stripped, or have visibility issues.

How big is my ELF binary and why?

elf-inspection provides workflows to analyze binary size and identify bloat contributors. Use `size <binary>` for a quick overview of text, data, and bss sections. Run `readelf -S <binary>` to see all section sizes, or `objdump -h <binary>` for headers. elf-inspection helps you spot oversized debug sections, unused code, or bloated dependencies driving binary growth.

How do you check if a binary has debug symbols?

elf-inspection guides you to extract debug info and build metadata from executables. Use `readelf -S <binary>` and look for .debug_* sections like .debug_info and .debug_line. Run `file <binary>` to see if it's stripped. Use `objdump -g <binary>` or `readelf --debug-dump=info <binary>` to inspect DWARF debug data. elf-inspection helps you verify symbol availability for debugging.

What symbols does a shared library export and how?

elf-inspection teaches you to inspect symbol tables in shared libraries using `nm -D <library>` to list dynamic symbols, or `readelf -s <library>` for full symbol details. Filter by GLOBAL and FUNC to find exported functions. Use `objdump -T <library>` for dynamic symbol table. elf-inspection helps you verify that required symbols are present and correctly bound.

How do you check binary hardening flags like PIE and RELRO?

elf-inspection guides you to verify security properties and hardening flags. Use `readelf -l <binary>` to check for RELRO segments and stack canary indicators. Run `file <binary>` to see if it's position-independent (PIE). Use `checksec` or parse ELF headers with `readelf -e <binary>` to confirm NX, ASLR, and stack protection. elf-inspection helps you assess security posture.

SKILL.md

rendered from the published skill — quoted content, verbatim

ELF Inspection

Purpose

Guide agents through inspecting Linux ELF binaries: symbol tables, section layout, dynamic linking, debug info, and diagnosing linker errors.

Triggers

  • "What libraries does this binary depend on?"
  • "Why is this binary so large?"
  • "I have an undefined reference or symbol not found at runtime"
  • "How do I check if debug info is in this binary?"
  • "How do I find what symbols a library exports?"
  • "How do I check if a binary is PIE / has RELRO?"

Workflow

1. Quick overview: file and size

```bash file prog # type, arch, linkage, stripped or not size prog # section sizes: text, data, bss size --format=sysv prog # detailed per-section

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
skills/binaries/elf-inspection/SKILL.md
skills/binaries/elf-inspection/references/cheatsheet.md

Related skills

Tags

binary-analysis linux-tooling symbol-resolution dynamic-linking security-hardening performance-profiling debugging-aids executable-format