# NixOS/patchelf

A small utility to modify the dynamic linker and RPATH of ELF executables

Repository: https://github.com/NixOS/patchelf
Canonical: https://ross.abutalabs.com/products/patchelf
Language: C
License: GPL-3.0
License Family: copyleft
Last push: 2026-07-27T01:22:23+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 92, longevity 100
- inputs: {"age_days": 5384, "days_push": 38, "days_rel": 58, "gap_med": 0.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4246, forks 536 (observed 2026-08-28T04:08:40.379807+00:00)

## What it is
PatchELF is a small command-line utility for modifying ELF executables and libraries, such as changing the dynamic linker (ELF interpreter), RPATH, SONAME, and DT_NEEDED dependencies. It is widely used in packaging workflows, especially by NixOS, to make binaries work in non-standard environments.

## Use cases
- change the dynamic linker of an ELF binary
- set or shrink the RPATH of an executable
- add, remove, or replace DT_NEEDED library dependencies
- change the SONAME of a shared library
- make a prebuilt binary work with relocated libraries
- fix binaries for packaging in Nix or custom prefixes

## When to choose
- you need to patch ELF binaries without recompiling them
- you are building packages with relocated or isolated library paths
- you want to repoint a binary at a different libc or loader

## When to avoid
- you need to patch Mach-O (macOS) or PE (Windows) binaries
- you want a library API rather than a command-line tool
- you need deep binary analysis or disassembly features

## Facets
- artifact type: cli-tool
- maturity: stable
- function: developer-tools, build-tool, file-system
- domain: developer-tools, operating-systems
- platform: cli, cpp
- tags: elf, binary-patching, rpath, dynamic-linker, nixos, linker, command-line, linux

## Member repositories
- NixOS/patchelf (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:40.379807+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:22:12.291274+00:00, confidence not recorded.
  - readme: https://github.com/NixOS/patchelf (fetched 2026-08-28T04:08:40.379807+00:00, sha eb6635840383)
- Data as of 2026-08-30T08:39:29.467469+00:00.
