Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --remove-needed-version #564

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

chitao1234
Copy link

This pr adds a new switch --remove-needed-version, to removing symbol versioning used by libraries like glibc. This switch should fix the use case of issue #284, #252.

I have included a regression test and updated the man page.

Should fix NixOS#252, NixOS#284, --remove-needed-version works by removing
specified version in .gnu.version_r, and resets version in referenced
entry in .gnu.version.
@jfmherokiller
Copy link

i hope this gets added because i regularly run into this use case when dealing with either legacy software or when copying software to unsusual platforms like the steamdeck.

my current issue is trying to copy waypipe to steamdeck

@maxirmx
Copy link

maxirmx commented Aug 31, 2024

Thank you for the great tool

It works fine with gnu toolchain, but when I compile with clang I get

patchelf: /home/maxirmx/Projects/tebako/deps/src/_patchelf/src/patchelf.cc:946: void ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, unsigned long, unsigned long, Elf64_Dyn, Elf64_Sym, unsigned short, Elf64_Verdef, Elf64_Verdaux, Elf64_Verneed, Elf64_Vernaux, Elf64_Rel, Elf64_Rela, 64>::rewriteSectionsExecutable() [Elf_Ehdr = Elf64_Ehdr, Elf_Phdr = Elf64_Phdr, Elf_Shdr = Elf64_Shdr, Elf_Addr = unsigned long, Elf_Off = unsigned long, Elf_Dyn = Elf64_Dyn, Elf_Sym = Elf64_Sym, Elf_Versym = unsigned short, Elf_Verdef = Elf64_Verdef, Elf_Verdaux = Elf64_Verdaux, Elf_Verneed = Elf64_Verneed, Elf_Vernaux = Elf64_Vernaux, Elf_Rel = Elf64_Rel, Elf_Rela = Elf64_Rela, ElfClass = 64]: Assertion `lastReplaced != 0' failed.

Do you think it can be fixed ?

@chitao1234
Copy link
Author

@maxirmx Thanks for your error report.

Could you check the new commit for whether the problem persists?

@maxirmx
Copy link

maxirmx commented Sep 3, 2024

@maxirmx Thanks for your error report.

Could you check the new commit for whether the problem persists?

Thank you, @chitao1234. You have fixed it.

@maxirmx
Copy link

maxirmx commented Sep 3, 2024

@chitao1234 Do you consider releasing this version on your own ?

@kcgthb
Copy link

kcgthb commented Oct 31, 2024

Would love to this new feature merged!

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.

4 participants