https://github.com/bobvanderlinden/autopatchelf
https://github.com/bobvanderlinden/autopatchelf
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bobvanderlinden/autopatchelf
- Owner: bobvanderlinden
- License: mit
- Created: 2023-10-02T19:40:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-04T08:21:03.000Z (7 months ago)
- Last Synced: 2025-02-10T04:41:35.609Z (3 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```