patchelf

Modify dynamic ELF executables and libraries after compilation

brewmacoslinux
Try with needOr install directly
Source

About

Modify dynamic ELF executables

Commands

patchelf

Examples

Change the interpreter (dynamic linker) of an ELF binary$ patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 ./myprogram
Add a new RPATH to an executable to specify library search paths$ patchelf --set-rpath /usr/local/lib:$ORIGIN/../lib ./myprogram
Replace a needed library dependency with another$ patchelf --replace-needed libold.so.1 libnew.so.1 ./myprogram