diff options
Diffstat (limited to 'ld/ld.texi')
-rw-r--r-- | ld/ld.texi | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -1139,14 +1139,18 @@ can be used multiple times to require additional symbols. @kindex -Ur @cindex constructors @item -Ur -For anything other than C++ programs, this option is equivalent to -@samp{-r}: it generates relocatable output---i.e., an output file that can in -turn serve as input to @command{ld}. When linking C++ programs, @samp{-Ur} -@emph{does} resolve references to constructors, unlike @samp{-r}. -It does not work to use @samp{-Ur} on files that were themselves linked -with @samp{-Ur}; once the constructor table has been built, it cannot -be added to. Use @samp{-Ur} only for the last partial link, and -@samp{-r} for the others. + +For programs that do not use constructors or destructors, or for ELF +based systems this option is equivalent to @option{-r}: it generates +relocatable output---i.e., an output file that can in turn serve as +input to @command{ld}. For other binaries however the @option{-Ur} +option is similar to @option{-r} but it also resolves references to +constructors and destructors. + +It does not work to use @option{-Ur} on files that were themselves +linked with @option{-Ur}; once the constructor table has been built, +it cannot be added to. Use @option{-Ur} only for the last partial +link, and @option{-r} for the others. @kindex --orphan-handling=@var{MODE} @cindex orphan sections |