rtldi is an ELF program interpreter for juggling multiple glibc 6 libraries.
Version: 0.94rtldi is an ELF program interpreter that enables each main executable program to use its own runtime loader and shared libraries, independent of the default versions installed in /lib, and independent of any other main executable program.
Operating System: Linux
Thus rtldi facilitates the simultaneous interoperation of programs that originally were linked using different generations of glibc6. In theory glibc6 is backward compatible (a given binary executable should run correctly using any subsequent version of glibc6), but in practice there have been enough bugs and glitches at various times to require workarounds.
Example: If the PT_INTERP of an executable a.elf is /2.2.4-24/rtldi (instead of /lib/ld-linux.so.2), then the executable runs effectively as if it were invoked via
/2.2.4-24/ld-linux.so.2 --library-path /2.2.4-24:$LD_LIBRARY_PATH /path/of/execve/a.elf args... and will use /2.2.4-24/libc.so.6 for its glibc6. rtldi uses its own path prefix in PT_INTERP as the prefix for ld-linux.so.2, and as the first directory path in the colon-separated list argument following --library-path.
The --library-path argument replaces LD_LIBRARY_PATH for a.elf only, without modifying LD_LIBRARY_PATH for a.elf or for any children that a.elf may invoke. (This is a feature of ld-linux.so.2.) Also, the process name remains "a.elf".
New ELF executables can specify the runtime loader by building with -Wl,--dynamic-linker=/path/to/rtldi. Old executables that specify /lib/ld-linux.so.2 for their PT_INTERP can be modified by using a binary file editor.
Find the Offset of the INTERP string by using readelf --program-headers a.elf. The replacement string cannot be longer, and must be terminated by '