Make the glibc fallback library path runtime-configurable
https://github.com/ValveSoftware/steam-runtime/issues/704
-
ld-libs: Make the glibc fallback library path runtime-configurable
At the time this was originally implemented, documentation said that the fallback path was always
/lib:/usr/lib, but this turns out not to be entirely true: it's actually$(slibdir):$(libdir)(or just$(libdir)if$(slibdir)is equal), which are distro- and architecture-dependent, for example/lib64:/usr/lib64on Fedora x86_64, or/usr/lib32on Arch i386 multilib.It is possible to introspect these from ld.so(8) by running it with the
--list-diagnosticsoption and searching forpath.system_dirs, but we probably don't want to do that from as precarious a position as libcapsule itself.A caller might know this better than we do, for example by introspecting glibc or by having distro-specific knowledge. Provide a way that they can pass this information in.
-
capture-libs: Make the hard-coded glibc search path runtime-configurable
As in the previous commit, a caller might know this better than we do, for example by introspecting glibc or by having distro-specific knowledge.