Run dynamically linked ELF binaries everywhere (musl and glibc are supported).
- Its works with userland-execve by mapping the interpreter (such as ld-linux-x86-64.so.2) into memory, creating a stack for it (containing the auxiliary vector, arguments, and environment variables), and then jumping to the entry point with the new stack.
- lib4bin pulls out the binary file and all the libraries on which it depends, strip it and forms the
bin
,shared/{bin,lib,lib32}
directories (see screenshots) and generate a fileshared/{lib,lib32}/lib.path
with a list of all directories that contain libraries for pass it to interpreter--library-path
. The paths in this file are specified on a new line with a+
at the beginning and relative to the directory in which it is located.
- aarch64
- x86_64
- Download the latest revision
git clone https://github.com/VHSgunzo/sharun.git && cd sharun
- Compile a binary
rustup default nightly
rustup target add $(uname -m)-unknown-linux-musl
rustup component add rust-src --toolchain nightly
cargo build --release
cp ./target/$(uname -m)-unknown-linux-musl/release/sharun .
./sharun --help
./sharun lib4bin --help
- Or take an already precompiled binary file from the releases