diff options
author | Nick Clifton <nickc@redhat.com> | 2023-05-16 11:19:11 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-05-16 11:20:55 +0100 |
commit | 0a7dda4f7af1e2911d125726cd3b0ddb42617875 (patch) | |
tree | 2c14ceb96d1316f61d515e3ca825d19f86253b20 /ld | |
parent | e2fe3cbd0cd11f536261ef2e283dd704ed30c7a4 (diff) | |
download | binutils-0a7dda4f7af1e2911d125726cd3b0ddb42617875.zip binutils-0a7dda4f7af1e2911d125726cd3b0ddb42617875.tar.gz binutils-0a7dda4f7af1e2911d125726cd3b0ddb42617875.tar.bz2 |
-Ur option documentation
* ld.texi (-Ur): Clarify the actions of this option.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 4 | ||||
-rw-r--r-- | ld/ld.texi | 20 |
2 files changed, 16 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index dac58cd..788410a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2023-05-16 Nick Clifton <nickc@redhat.com> + + * ld.texi (-Ur): Clarify the actions of this option. + 2023-05-10 Nick Clifton <nickc@redhat.com> PR 16566 @@ -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 |