Skip to content

add --force option to write ELF binary without changes#633

Open
conao3 wants to merge 1 commit intoNixOS:masterfrom
conao3:feature/issue-590
Open

add --force option to write ELF binary without changes#633
conao3 wants to merge 1 commit intoNixOS:masterfrom
conao3:feature/issue-590

Conversation

@conao3
Copy link
Copy Markdown

@conao3 conao3 commented Jan 7, 2026

Closes #590

Add --force option that forces patchelf to write out the ELF binary even when no modifications were made.

This is useful for fixing ELF binaries that have issues like "Program headers not in the first page" on FreeBSD. Previously, users had to use a workaround like:

patchelf --set-interpreter $(patchelf --print-interpreter elf) elf

Now they can simply use:

patchelf --force elf

Thank you!

Please do your best to include a regression test
so that the quality of future releases can be preserved.

  • Regression test included (tests/force.sh)

This option forces patchelf to write out the ELF binary even when no
modifications were made. This is useful for fixing ELF binaries that
have issues like "Program headers not in the first page" on FreeBSD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow forcing a write-out of the ELF binary

1 participant