[PATCH v3 1/2] rtld: Add --no-default-paths option

Fergus Dall sidereal@google.com
Mon Jun 7 10:28:19 GMT 2021


gnu formatting fixes have been applied to the test files, and the SONAMEs
for libc and libdl now use <gnu/lib-names.h>

-- 8< --
This option causes the default library search path to be skipped,
using only the paths in DT_RPATH, LD_LIBRARY_PATH, and
DT_RUNPATH. This option implies --inhibit-cache, as there is no point
in searching a cache of system libraries when we are not using the
system libraries at all.

This is necessary to preserve negative search results when isolating
applications from the system libraries. This can be important when an
application uses dlopen at run time to load optional libraries.

When a shared library is required by the application, it can be
isolated by putting appropriate versions of the libraries in
directories specified in LD_LIBRARY_PATH, because the library search
will always terminate before potentially loading any system libraries.

On the other hand, if the application should be run without an
optional library, the search will proceed past the LD_LIBRARY_PATH
directories into the default system libraries, potentially causing an
incorrect library to be linked.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-0001-rtld-Add-no-default-paths-option.patch
Type: application/x-patch
Size: 5604 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20210607/18e11551/attachment.bin>


More information about the Libc-alpha mailing list