diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-10-10 05:05:18 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-10-10 05:05:18 +0000 |
commit | 5caef232bd39883502df77a39c1c6d1114620f56 (patch) | |
tree | 4924acba8fcb03abece6971f6be412dac75c612e /ld/ld.1 | |
parent | 034fd45d55751069bf6588ffcc08932eff22cd82 (diff) | |
download | gdb-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/ld.1')
-rw-r--r-- | ld/ld.1 | 56 |
1 files changed, 56 insertions, 0 deletions
@@ -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. |