public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] ld: Improve documentation of -rpath-link search paths
@ 2024-03-13 10:13 Jonathan Wakely
  2024-03-18 16:51 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2024-03-13 10:13 UTC (permalink / raw)
  To: binutils

This change tries to clarify that the list of search paths given under
the -rpath-link option are only used when looking for additional
libraries to satisfy DT_NEEDED dependencies, not for libraries named
with -l options. It seems to be a common misunderstanding that this list
implies that LD_LIBRARY_PATH can be used instead of naming directories
with -L options.
---
 ld/ld.texi | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/ld/ld.texi b/ld/ld.texi
index 6f234752278..57a7e2ae2ea 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -2427,7 +2427,8 @@ of the input files.
 When the linker encounters such a dependency when doing a non-shared,
 non-relocatable link, it will automatically try to locate the required
 shared library and include it in the link, if it is not included
-explicitly.  In such a case, the @option{-rpath-link} option
+explicitly.  In such a case, several directories are searched as
+described below.  The @option{-rpath-link} option
 specifies the first set of directories to search.  The
 @option{-rpath-link} option may specify a sequence of directory names
 either by specifying a list of names separated by colons, or by
@@ -2445,11 +2446,12 @@ supported.
 
 This option should be used with caution as it overrides the search path
 that may have been hard compiled into a shared library. In such a case it
-is possible to use unintentionally a different search path than the
-runtime linker would do.
+is possible to unintentionally use a different search path than the
+runtime linker would have used.
 
-The linker uses the following search paths to locate required shared
-libraries:
+When additional shared libraries are required, the linker uses the
+following search paths to locate them.  These paths are not used to find
+libraries that are included in the link explicitly using @option{-l}.
 
 @enumerate
 @item
-- 
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-18 19:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 10:13 [PATCH] ld: Improve documentation of -rpath-link search paths Jonathan Wakely
2024-03-18 16:51 ` Nick Clifton
2024-03-18 19:26   ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).