Embedded Linux Tricks
How to run an executable compiled with a libc version different than the default one
The first option is to run the executable with the following wrapper:
$PREFIX is the directory where the non-standard libc is and
$BINARY is the binary that needs to be executed. This approach doesn’t maintain the
argv for the program being executed (so it can be a problem for programs that use it to decide what to do such as git).
The second option is to use the
patchelf tool to set a different interpreter (
$PREFIX/lib/:$PREFIX/usr/lib/ ) in the binary.
The script below takes some debian binary packages from
./debs and automatically patches them: