patchelf
patchelf copied to clipboard
Add --remove-needed-version
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.
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
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 ?
@maxirmx Thanks for your error report.
Could you check the new commit for whether the problem persists?
@maxirmx Thanks for your error report.
Could you check the new commit for whether the problem persists?
Thank you, @chitao1234. You have fixed it.
@chitao1234 Do you consider releasing this version on your own ?
Would love to this new feature merged!
+1 on getting this merged please!!
Any progress on this? I also have a few usecases for this feature, and it would be great to see it merged.
Would love to see this too
@Mic92 Would you mind having a look a this one ? Is is ready to ship and can unbreak the tool in some cases.
@peeley
Any progress on this? I also have a few usecases for this feature, and it would be great to see it merged.
i have a little script that does very unelegantly strip version info. maybe could be of help. https://github.com/ohnekopf/elfnover