Question

I have a build system which generates binaries with a hardcoded RPATH. If the required package isn't on the current machine, I have a package manager which will download & untar the missing library.

Can I hook the linux dynamic linker so I can run my package manager if it fails to find a library? And then rerun the dynamic linker once the library is available?

Was it helpful?

Solution

use -Wl,--dynamic-linker=file (see man ld)

But overloading the dynamic linker will only work for loading executables, not for shared libraries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top