How to set a system-wide library path policy?
Jeffrey Walton
noloader@gmail.com
Fri Jun 7 14:53:00 GMT 2019
I'm having trouble figuring out how to setup library path policy on Fedora 29.
I need to articulate to the system loader:
1. programs in /bin must only link to libs in /lib64
2. programs in /usr/bin must only link to libs in /usr/lib64
3. programs in /usr/local/bin may use libraries in /usr/local/lib64 or
/usr/lib64
As far as I know, the distro supplies (1) and (2). They know nothing
about my libraries in /usr/local. When the distro is ready, it will
push updated programs and libraries as needed. The distro binaries
should not use my libraries.
The reason I need it is, the libs in /usr/local have various
compatibility problems. I've had bash, grep and sed from /usr and
/usr/bin die because I built a library in /usr/local with a sanitizer,
and the program or another library had undefined behavior or a memory
error that surfaced. It basically makes the system unusable.
Additional problems I have managed to side-step so far include
removing unaligned access in /usr/local programs and libraries.
Sometimes that involves modifying a struct. Different stuct
definitions are surely going to cause problems.
How do I tell the system loader to only use distro libraries for
distro binaries?
Jeff
More information about the Binutils
mailing list