diff options
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 8dfb4ab..8d40f80 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -614,21 +614,24 @@ of the function. By default, the linker uses @code{_init} as the function to call. @cindex archive files, from cmd line -@kindex -l@var{archive} -@kindex --library=@var{archive} -@item -l@var{archive} -@itemx --library=@var{archive} -Add archive file @var{archive} to the list of files to link. This -option may be used any number of times. @command{ld} will search its -path-list for occurrences of @code{lib@var{archive}.a} for every -@var{archive} specified. +@kindex -l@var{namespec} +@kindex --library=@var{namespec} +@item -l@var{namespec} +@itemx --library=@var{namespec} +Add the archive or object file specified by @var{namespec} to the +list of files to link. This option may be used any number of times. +If @var{namespec} is of the form @file{:@var{filename}}, @command{ld} +will search the library path for a file called @var{filename}, otherise it +will search the library path for a file called @file{lib@var{namespec}.a}. On systems which support shared libraries, @command{ld} may also search for -libraries with extensions other than @code{.a}. Specifically, on ELF -and SunOS systems, @command{ld} will search a directory for a library with -an extension of @code{.so} before searching for one with an extension of -@code{.a}. By convention, a @code{.so} extension indicates a shared -library. +files other than @file{lib@var{namespec}.a}. Specifically, on ELF +and SunOS systems, @command{ld} will search a directory for a library +called @file{lib@var{namespec}.so} before searching for one called +@file{lib@var{namespec}.a}. (By convention, a @code{.so} extension +indicates a shared library.) Note that this behavior does not apply +to @file{:@var{filename}}, which always specifies a file called +@var{filename}. The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which |