aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-10-10 05:05:18 +0000
committerIan Lance Taylor <ian@airs.com>1995-10-10 05:05:18 +0000
commit5caef232bd39883502df77a39c1c6d1114620f56 (patch)
tree4924acba8fcb03abece6971f6be412dac75c612e /ld
parent034fd45d55751069bf6588ffcc08932eff22cd82 (diff)
downloadgdb-5caef232bd39883502df77a39c1c6d1114620f56.zip
gdb-5caef232bd39883502df77a39c1c6d1114620f56.tar.gz
gdb-5caef232bd39883502df77a39c1c6d1114620f56.tar.bz2
* ld.h (args_type): Add rpath_link field.
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for required dependencies in rpath_link path. Only search LD_LIBRARY_PATH when configured native. * lexsup.c (parse_args): Recognize -rpath-link. * ld.1, ld.texinfo: Document -rpath-link.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/ld.156
2 files changed, 65 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index d6a0de6..2f13b32 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
+Tue Oct 10 01:01:51 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ld.h (args_type): Add rpath_link field.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for
+ required dependencies in rpath_link path. Only search
+ LD_LIBRARY_PATH when configured native.
+ * lexsup.c (parse_args): Recognize -rpath-link.
+ * ld.1, ld.texinfo: Document -rpath-link.
+
Sat Oct 7 17:07:17 1995 Ian Lance Taylor <ian@cygnus.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
diff --git a/ld/ld.1 b/ld/ld.1
index 082bafa..d2ace47 100644
--- a/ld/ld.1
+++ b/ld/ld.1
@@ -82,6 +82,12 @@ ld \- the GNU linker
\&\|]
.RB "[\|" \-relax "\|]"
.RB "[\|" \-r | \-Ur "\|]"
+.RB "[\|" "\-rpath\ "\c
+.I directory\c
+\&\|]
+.RB "[\|" "\-rpath\-link\ "\c
+.I directory\c
+\&\|]
.RB "[\|" \-S "\|]"
.RB "[\|" \-s "\|]"
.RB "[\|" \-shared "\|]"
@@ -692,6 +698,56 @@ This option does the same as \c
\&.
.TP
+.B \-rpath\ \fIdirectory
+Add a directory to the runtime library search path. This is used when
+linking an ELF executable with shared objects. All
+.B \-rpath
+arguments are concatenated and passed to the runtime linker, which uses
+them to locate shared objects at runtime. The
+.B \-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
+.B \-rpath\-link
+option.
+
+The
+.B \-rpath
+option may also be used on SunOS. By default, on SunOS, the linker
+will form a runtime search patch out of all the
+.B \-L
+options it is given. If a
+.B \-rpath option is used, the runtime search path
+will be formed exclusively using the
+.B \-rpath
+options, ignoring
+the
+.B \-L
+options. This can be useful when using gcc, which adds many
+.B \-L
+options which may be on NFS mounted filesystems.
+
+.TP
+.B \-rpath\-link\ \fIdirectory
+When using ELF, one shared library may require another. This happens
+when an
+.B ld\ \-shared
+link includes a shared library as one of the input files.
+
+When the linker encounters such a dependency when doing a non-shared,
+non-relocateable 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
+.B \-rpath\-link
+option specifies the first set of directories to search. The
+.B \-rpath\-link
+option may specify a sequence of directory names either by specifying
+a list of names separated by colons, or by appearing multiple times.
+
+If the required shared library is not found, the linker will issue a
+warning and continue with the link.
+
+.TP
.B \-S
Omits debugger symbol information (but not all symbols) from the output file.