leviso-elf
ELF binary analysis and library dependency copying utilities. Uses readelf for cross-compilation safe dependency detection (unlike ldd which executes binaries).
Features
- Dependency Analysis: Parse
readelf -doutput to find shared library dependencies - Recursive Resolution: Trace full dependency tree including transitive dependencies
- Library Copying: Copy binaries with all required libraries to a target directory
- Path Search: Find binaries and libraries in standard Linux paths
Usage
use ;
// Find all library dependencies for a binary
let deps = get_all_dependencies?;
// Copy a library to target directory
copy_library_to?;
// Find a binary in standard paths
let path = find_binary?;
Why readelf instead of ldd?
ldd executes the binary to resolve dependencies, which fails for cross-compiled binaries and can be a security risk. readelf -d parses the ELF headers directly without execution.
License
MIT