I want to remove some of the paths the linker uses to find .so libraries for testing purposes.
I have found a way to add library paths:
Are there a variable similar to
LD_LIBRARY_PATH that I can use to remove library paths such as
/usr/lib that are not in
LD_LIBRARY_PATH but picked up by the linker? I.e. how can I ignore paths that are given in /etc/ld.so.conf.d/ ?
The reason for this is that I am busy creating a program that, for a given executable, it recursively finds library dependencies. I want to see if I can make a program more portable by finding all its dependencies, copying those dependencies into a local directory, and make a local-run bash script to setup LD_LIBRARY_PATH and then run the executable. I want to test if this local-run-executable works after previously important library search paths are removed.