XRef Code — Ultra Blazing Fast x86-64 ELF Cross-References & Pseudo-C Decompiler
Authors/Creators
Description
XRef Code (xref) provides ultra blazing fast cross-references, struct layout recovery, program slicing and structured pseudo-C for x86-64 ELF binaries. Written in pure safe Rust, it is designed for reverse engineers and AI coding agents investigating compiled programs, including stripped Rust release binaries.
Reverse-engineering workflows often start with a lengthy whole-program database import before an analyst can investigate a function or follow a reference. Stripped Rust binaries add further challenges: symbol names are missing, strings use pointer-and-length representations, and compiler-generated panic paths can obscure control flow. XRef Code operates directly on the supplied ELF image without maintaining an on-disk analysis database, enabling focused, iterative command-line queries.
XRef Code maps the binary into memory, recovers function ranges from .eh_frame unwind records with a span fallback, and scans decoded functions in parallel across CPU cores. Its CLI locates code and data references, strings and constants; finds callers, callees, call paths and arguments; and recovers field offsets, widths and strides for structure-layout analysis. For stripped Rust binaries it recognizes runtime helpers, recovers string literals and source locations from panic descriptors, and examines enum-related jump-table arms.
The native pseudo-C decompiler lifts x86-64 instructions into structured, typed output with inferred argument, variable and field hints and control-flow regions. Backward slicing isolates statements and guards reaching a selected call or instruction. Cross-build function matching and normalized pseudo-C diffing support investigation of changes between different builds.
The project website at https://xrefcode.com contains an interactive workbench with 114 recorded CLI runs. The release README reports single-run millisecond timings from xref 0.0.5 on a 1.96 MB stripped binary with a warm OS page cache; those examples are specific to the stated hardware and workload, not universal performance guarantees.
Supported inputs are x86-64 ELF executables and shared objects. PE, Mach-O and AArch64 inputs are outside the current scope. Inferred types and field layouts are static reconstructions, not original source types; when .eh_frame is missing, function boundaries rely on fallback heuristics. Unmodeled instructions may be preserved as assembly comments, and critical conclusions should be checked against disassembly.
This record archives the source code for XRef Code v0.1.0, tag v0.1.0, commit c2bf310bd0ea039b09e2e2578a72a657acbcf5e1. Repository: https://github.com/alex09x/xref. Release: https://github.com/alex09x/xref/releases/tag/v0.1.0. License: MIT OR Apache-2.0, at the recipient’s option.
Files
xref-v0.1.0-zenodo.zip
Additional details
Software
- Repository URL
- https://github.com/alex09x/xref
- Programming language
- Rust
- Development Status
- Active