A colorful, user-friendly alternative to readelf for analyzing ELF binaries.
binparse provides beautiful colored terminal output with human-readable descriptions of all ELF structures including headers, segments, sections, and symbols. It supports both 32-bit and 64-bit ELF files with little and big endian byte ordering.
cargo install binparsegit clone https://github.com/kunalsinghdadhwal/binparse.git
cd binparse
cargo build --releaseThe binary will be available at target/release/binparse.
cargo install --path .binparse [OPTIONS] <FILE>| Flag | Long | Description |
|---|---|---|
-H |
--header |
Display ELF header |
-p |
--segments |
Display program headers (segments) |
-s |
--sections |
Display section headers |
--symbols |
Display symbol tables | |
-a |
--all |
Display all information |
-h |
--help |
Print help |
-V |
--version |
Print version |
Display ELF header (default behavior):
binparse /usr/bin/lsDisplay program headers:
binparse -p /usr/bin/lsDisplay section headers:
binparse -s /usr/bin/lsDisplay symbol tables:
binparse --symbols /usr/bin/lsDisplay all information:
binparse -a /usr/bin/lsCombine multiple options:
binparse -H -p -s /usr/bin/lsFile: /usr/bin/ls
Size: 142312 bytes
Format: 64-bit, little endian, System V
ELF Header
e_ident
Magic: (ELF) (7F 45 4C 46)
Class (EI_CLASS): 64-bit (2)
Data (EI_DATA): little endian (1)
Version (EI_VERSION): current (1)
OS/ABI (EI_OSABI): System V (0)
ABI Version (EI_ABIVERSION): 0
Core
Type (e_type): Shared object file - ET_DYN (0x0003)
Machine (e_machine): AMD x86-64 (0x003E)
Version (e_version): 1 (current) (0x00000001)
Flags (e_flags): none (0x00000000)
ELF Header Size (e_ehsize): 64 bytes
Addresses / Offsets
Entry Point (e_entry): 0x0000000000006D30
Program Headers Offset (e_phoff): 0x0000000000000040
Section Headers Offset (e_shoff): 0x0000000000022428
Program Header Size (e_phentsize): 56 bytes
Program Header Count (e_phnum): 13
Section Header Size (e_shentsize): 64 bytes
Section Header Count (e_shnum): 31
Section Name String Table Index (e_shstrndx): 30
- Full ELF header analysis with e_ident, core fields, and address/offset information
- Program header (segment) display with human-readable type descriptions
- Section header display with names resolved from .shstrtab
- Symbol table display for both .symtab and .dynsym
- Human-readable decoding of:
- Machine architectures (x86, x86-64, ARM, AArch64, RISC-V, and 50+ others)
- OS/ABI identifiers (System V, Linux, FreeBSD, etc.)
- Segment types (PT_LOAD, PT_DYNAMIC, PT_GNU_STACK, etc.)
- Section types and flags
- Symbol types, bindings, and visibility
- Colored output for improved readability
- Graceful error handling for invalid or unsupported files
- clap - Command-line argument parsing
- colored - Terminal colors
- goblin - Binary format parsing
- thiserror - Error handling
| Feature | binparse | readelf |
|---|---|---|
| Colored output | Yes | No |
| Human-readable descriptions | Yes | Limited |
| ELF header | Yes | Yes |
| Program headers | Yes | Yes |
| Section headers | Yes | Yes |
| Symbol tables | Yes | Yes |
| Relocations | No | Yes |
| Dynamic section | No | Yes |
| Notes | No | Yes |
| Version info | No | Yes |