{"slug": "patchelf", "name": "patchelf", "category": "terminal", "category_name": "Terminal and shell", "description": "", "recommenders": 3, "commenters": 3, "warners": 0, "score": 2.563, "rising": -0.98, "first": "2025-12-21", "latest": "2026-06-18", "why": "Ah you can use https://github.com/NixOS/patchelf/pull/564", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 2, "neutral": 1, "compare": 0, "warn": 0}, "spark": [0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "Ah you can use https://github.com/NixOS/patchelf/pull/564", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/nixos/patchelf", "official_url": "https://github.com/NixOS/patchelf", "pricing": "", "aliases": ["patchelf"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 777445925, "item_id": 48590370, "url": "https://news.ycombinator.com/item?id=48590370", "by": "reinitctxoffset", "date": "2026-06-18", "version": null, "stance": "recommend", "quote": "`patchelf` works.", "excerpt": "I'm pretty committed to the `nix` ecosystem (I rewrote `nix` from scratch to unbreak it: https://gist.github.com/b7r6/90107d8e8ebe81fb0577b9c033b6ab00, so, pretty committed), but I can't endorse it in it's current form after learning how the sausage is made and enough math to know why it's not just buggy but conceptually unsalvagable with the current `nixpkgs` and the current purity dogma. And `home-manager` is maybe", "context": "", "use_case": "", "switched_from": "", "story": "Migrating from GNU Stow to Chezmoi"}, {"id": 743125024, "item_id": 46445314, "url": "https://news.ycombinator.com/item?id=46445314", "by": "btdmaster", "date": "2025-12-31", "version": null, "stance": "recommend", "quote": "Ah you can use https://github.com/NixOS/patchelf/pull/564", "excerpt": "Ah you can use https://github.com/NixOS/patchelf/pull/564 So you can do e.g. `patchelf --remove-needed-version libm.so.6 GLIBC_2.29 ./mybinary` instead of replacing glibc wholesale (step 2 and 3) and assuming all of used glibc by the executable is ABI compatible this will just work (it's worked for a small binary for me, YMMV).", "context": "", "use_case": "Removing symbol versions from binaries", "switched_from": "", "story": "Loss32: Let's Build a Win32/Linux"}, {"id": 741546048, "item_id": 46346628, "url": "https://news.ycombinator.com/item?id=46346628", "by": "photios", "date": "2025-12-21", "version": null, "stance": "recommend", "quote": "OP would probably have a field day with NixOS's patchelf tool", "excerpt": "OP would probably have a field day with NixOS's patchelf tool: https://github.com/NixOS/patchelf", "context": "", "use_case": "", "switched_from": "", "story": "ELF Crimes: Program Interpreter Fun"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["removing symbol versions from binaries", "binary patching"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=48588413", "title": "Migrating from GNU Stow to Chezmoi", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46424173", "title": "Loss32: Let's Build a Win32/Linux", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46433035", "title": "Win32 is the stable Linux ABI", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46345975", "title": "ELF Crimes: Program Interpreter Fun", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"recommend": 1, "neutral": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {"recommend": 1}, "2026-07": {}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "quotes": [{"id": 777445925, "item_id": 48590370, "url": "https://news.ycombinator.com/item?id=48590370", "by": "reinitctxoffset", "date": "2026-06-18", "version": null, "stance": "recommend", "quote": "`patchelf` works.", "excerpt": "I'm pretty committed to the `nix` ecosystem (I rewrote `nix` from scratch to unbreak it: https://gist.github.com/b7r6/90107d8e8ebe81fb0577b9c033b6ab00, so, pretty committed), but I can't endorse it in it's current form after learning how the sausage is made and enough math to know why it's not just buggy but conceptually unsalvagable with the current `nixpkgs` and the current purity dogma. And `home-manager` is maybe", "context": "", "use_case": "", "switched_from": "", "story": "Migrating from GNU Stow to Chezmoi"}, {"id": 743125024, "item_id": 46445314, "url": "https://news.ycombinator.com/item?id=46445314", "by": "btdmaster", "date": "2025-12-31", "version": null, "stance": "recommend", "quote": "Ah you can use https://github.com/NixOS/patchelf/pull/564", "excerpt": "Ah you can use https://github.com/NixOS/patchelf/pull/564 So you can do e.g. `patchelf --remove-needed-version libm.so.6 GLIBC_2.29 ./mybinary` instead of replacing glibc wholesale (step 2 and 3) and assuming all of used glibc by the executable is ABI compatible this will just work (it's worked for a small binary for me, YMMV).", "context": "", "use_case": "Removing symbol versions from binaries", "switched_from": "", "story": "Loss32: Let's Build a Win32/Linux"}, {"id": 743037744, "item_id": 46439859, "url": "https://news.ycombinator.com/item?id=46439859", "by": "btdmaster", "date": "2025-12-30", "version": null, "stance": "neutral", "quote": "", "excerpt": "Yes you can do this, thanks for mentioning I was interested and checked how you would go about it. 1. Delete the shared symbol versioning as per https://stackoverflow.com/a/73388939 (patchelf --clear-symbol-version exp mybinary) 2. Replace libc.so with a fake library that has the right version symbol with a version script e.g. version.map GLIBC_2.29 { global: *; }; With an empty fake_libc.c `gcc -shared -fPIC -Wl,--v", "context": "", "use_case": "Binary patching", "switched_from": "", "story": "Win32 is the stable Linux ABI"}, {"id": 741546048, "item_id": 46346628, "url": "https://news.ycombinator.com/item?id=46346628", "by": "photios", "date": "2025-12-21", "version": null, "stance": "recommend", "quote": "OP would probably have a field day with NixOS's patchelf tool", "excerpt": "OP would probably have a field day with NixOS's patchelf tool: https://github.com/NixOS/patchelf", "context": "", "use_case": "", "switched_from": "", "story": "ELF Crimes: Program Interpreter Fun"}]}