aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texi
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@wdc.com>2019-06-07 19:25:21 +0100
committerMaciej W. Rozycki <macro@wdc.com>2019-06-07 19:25:21 +0100
commitc1b00498af77c012beed6809175f38923906ecb9 (patch)
tree67c171af3264b694e8a619362fe397fc75041e24 /ld/ld.texi
parent942d35f72bea5a0d19a5d0e0a5ca533e37a88b2c (diff)
downloadgdb-c1b00498af77c012beed6809175f38923906ecb9.zip
gdb-c1b00498af77c012beed6809175f38923906ecb9.tar.gz
gdb-c1b00498af77c012beed6809175f38923906ecb9.tar.bz2
LD/doc: Clarify `-rpath' option's semantics WRT link-time dependencies
Mention in the description of the `-rpath' LD option the restrictions the option has with respect to searching link-time dependencies of shared objects referred in the link. Previously these restrictions were only documented along with the `-rpath-link' option, which may not be the place one would consider when looking for the semantics of `-rpath'. Copy the relevant part of the `-rpath-link' option description then, splitting the now overlong paragraph into three, for legibility. ld/ * ld.texi (Options): Also document `-rpath' option restrictions in the description of the option itself.
Diffstat (limited to 'ld/ld.texi')
-rw-r--r--ld/ld.texi17
1 files changed, 11 insertions, 6 deletions
diff --git a/ld/ld.texi b/ld/ld.texi
index 671a2a5..8d5c7bc 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -1958,12 +1958,17 @@ line. It overrides @samp{-s} and @samp{-S}.
Add a directory to the runtime library search path. This is used when
linking an ELF executable with shared objects. All @option{-rpath}
arguments are concatenated and passed to the runtime linker, which uses
-them to locate shared objects at runtime. The @option{-rpath} option is
-also used when locating shared objects which are needed by shared
-objects explicitly included in the link; see the description of the
-@option{-rpath-link} option. If @option{-rpath} is not used when linking an
-ELF executable, the contents of the environment variable
-@code{LD_RUN_PATH} will be used if it is defined.
+them to locate shared objects at runtime.
+
+The @option{-rpath} option is also used when locating shared objects which
+are needed by shared objects explicitly included in the link; see the
+description of the @option{-rpath-link} option. Searching @option{-rpath}
+in this way is only supported by native linkers and cross linkers which
+have been configured with the @option{--with-sysroot} option.
+
+If @option{-rpath} is not used when linking an ELF executable, the
+contents of the environment variable @code{LD_RUN_PATH} will be used if it
+is defined.
The @option{-rpath} option may also be used on SunOS. By default, on
SunOS, the linker will form a runtime search path out of all the