patchelf
patchelf copied to clipboard
A small utility to modify the dynamic linker and RPATH of ELF executables
The GNU linker merges together items that share a common suffix in the dynamic string table, where RPath lives. If you have an Rpath like `somedir/lib` and a symbol called...
**Describe the bug** After running `patchelf --remove-rpath` on a shared library, `readelf -a | grep $OLD_RPATH` will show no matches. However the string has been left behind in the binary....
Maybe it's something worth considering. Every test passes and the rewriteSectionsExecutable seems to be very tricky to make robust. If anyone knows a scenario that will fail with this fix,...
Thank you! Please do your best to include [a regression test](https://github.com/NixOS/patchelf/blob/master/tests/build-id.sh) so that the quality of future releases can be preserved.
I have created the change that adds cleaning of the dynstr. All unreferenced symbols are removed if --clean-strtab option is given and the section is shrunk. It could solve issues...
Hi! I would like to suggest (and implement if agreed) an improvement to the testability of the project. I noticed that it's hard to exercise a specific part of the...
Hi, I started to implement a simple version of `--clean-strtab` as suggested in https://github.com/NixOS/patchelf/issues/449. Some attention points: - I'm not sure I got all the points. - This is really...
I started to investigate the reason for this comment `/* !!! Why do we stop after a .dynstr section? I can't remember! */` I removed the condition, and investigated failing...
Instead of using fixed flags of RW for the new program header, holding the replaced sections, check if the write or execute flags is required by any accompanying section. If...
**Describe the bug** # readelf -S ld-2.17.so | grep dynamic [17] .dynamic DYNAMIC 0000000000221e00 00021e00 # readelf -S ld-linux-x86-64.so.2 | grep dynamic [17] .dynamic DYNAMIC 0000000000221e00 00021e00 # patchelf --set-rpath...