Skip to content

Commit ca0bd6d

Browse files
author
Vladimir Kotal
committed
the -R is no longer widely used compiler option
1 parent 9210c82 commit ca0bd6d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

intro.tex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@
983983
\begin{tabular}{ll}
984984
\texttt{-o \emph{file}} & output file name (default \texttt{a.out})\\
985985
\texttt{-l\emph{lib}} & link with library \texttt{lib\emph{lib}.so} or
986-
\texttt{lib\emph{lib}.a}\\
986+
\texttt{lib\emph{lib}.a}\\
987987
\texttt{-L\emph{path}} & path to libraries (\texttt{-l\emph{lib}})\\
988988
\texttt{-shared} & create a dynamic library\\
989989
\texttt{-non\_shared} & create a static executable
@@ -998,11 +998,15 @@
998998
\item Note that different systems support different options. For example,
999999
\texttt{ld} on Solaris does not support \texttt{-shared} and
10001000
\texttt{-non\_shared}, and you have to use alternatives.
1001-
\item An option \texttt{-R} allows to specify where to look for libraries when
1002-
loading the executable via the dynamic linker. That path might be different
1003-
from the path used during building the object, modifiable via \texttt{-L}.
1004-
\item Often you do not use the linker directly at all but pass all the linker
1005-
options via the compiler.
1001+
\item In most cases the linker is not used directly. Some linker specific
1002+
options (like \texttt{-l}) are specified as compiler options. The compiler then
1003+
passes these to the linker.
1004+
\item For linker options that the compiler is not aware of, one can use
1005+
the \texttt{-Xlinker} or \texttt{-Wl} compiler options to pass them to the
1006+
linker. For example, the \texttt{-rpath} linker option allows to specify where
1007+
to look for libraries when loading the executable via the dynamic linker.
1008+
That path might be different from the path used during building the object,
1009+
modifiable via \texttt{-L}.
10061010
\end{itemize}
10071011

10081012
%%%%%

0 commit comments

Comments
 (0)