An open API service indexing awesome lists of open source software.

https://github.com/bobvanderlinden/autopatchelf


https://github.com/bobvanderlinden/autopatchelf

Last synced: 29 days ago
JSON representation

Awesome Lists containing this project

README

        

# autopatchelf

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`](https://github.com/NixOS/patchelf) to do the actual patching.

Based on the [`autopatchelf` hook](https://github.com/NixOS/nixpkgs/blob/e42a5c78e75aba56b546cbcb8efdf46587fea276/doc/hooks/autopatchelf.section.md), specifically [auto-patchelf.py](https://github.com/NixOS/nixpkgs/blob/e42a5c78e75aba56b546cbcb8efdf46587fea276/pkgs/build-support/setup-hooks/auto-patchelf.py).

## Usage

```console
$ export NIX_BINTOOLS="$(nix-build -A bintools '')"
$ autopatchelf --libs $(nix-build -A gcc-unwrapped.lib '')/lib $(nix-build -A zlib '')/lib --path directory_containing_so_libraries_and_elf_executables
```