I am searching for a way to make existing proprietary ELF-binaries, which are linked against specific versions of system libraries, portable. With portable I mean making the executable work on every system with the same processor architecture and a compatible system kernel, without necessarily having the source code of the libraries (if there is no way without having the source code, it'll be fine too).
So far I thought of two possibilities, but I don't know if they are at all possible and if yes, which to choose:
- Searching all linked libraries and their dependencies and include them in a subdirectory of the binary and changing the Library-Path to that directory.
- Relinking the libraries statically into the binary file to one big executable (if the program doesn't verify itself based on a checksum).
Licensing is no issue as I don't want to distribute the created portable programs, it's for private use only.
Thanks for your answers.