A tool to patch ELF files so that they refer to specific required libraries. Required libraries are looked up automatically in pre-specified directories/paths.
Uses patchelf
to do the actual patching.
Based on the autopatchelf
hook, specifically auto-patchelf.py.
$ export NIX_BINTOOLS="$(nix-build -A bintools '<nixpkgs>')"
$ autopatchelf --libs $(nix-build -A gcc-unwrapped.lib '<nixpkgs>')/lib $(nix-build -A zlib '<nixpkgs>')/lib --path directory_containing_so_libraries_and_elf_executables