diff options
author | Craig Scott <craig.scott@crascit.com> | 2022-06-27 10:36:58 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2022-07-03 04:34:41 (GMT) |
commit | d185f7c0a8cac19edaea8d54c2a12b51a622731b (patch) | |
tree | 96ab4b102d1d8a94536b0e09915d2911d3c505d5 /Help/variable/LINK_GROUP_PREDEFINED_FEATURES.txt | |
parent | 8c562ece28b7a13ddb734b8c51710ebafe9ac570 (diff) | |
download | CMake-d185f7c0a8cac19edaea8d54c2a12b51a622731b.zip CMake-d185f7c0a8cac19edaea8d54c2a12b51a622731b.tar.gz CMake-d185f7c0a8cac19edaea8d54c2a12b51a622731b.tar.bz2 |
Help: Rework $<LINK_LIBRARY>, $<LINK_GROUP> and related docs
These changes restructure the docs to improve readability and flow,
correct grammar and typos, and fix errors and inconsistencies in
some of the examples.
Fixes: #23684
Diffstat (limited to 'Help/variable/LINK_GROUP_PREDEFINED_FEATURES.txt')
-rw-r--r-- | Help/variable/LINK_GROUP_PREDEFINED_FEATURES.txt | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Help/variable/LINK_GROUP_PREDEFINED_FEATURES.txt b/Help/variable/LINK_GROUP_PREDEFINED_FEATURES.txt index 5f1a11b..557886e 100644 --- a/Help/variable/LINK_GROUP_PREDEFINED_FEATURES.txt +++ b/Help/variable/LINK_GROUP_PREDEFINED_FEATURES.txt @@ -1,22 +1,22 @@ -**Circular references with static libraries** - -Some linkers are one-pass only so to handle circular references between -static libraries, the following feature can be used: - ``RESCAN`` - The specified static libraries are searched repeatedly until no - new undefined references are created. Normally, an static library is searched - only once in the order that it is specified on the command line. If a symbol - in that library is needed to resolve an undefined symbol referred to by an - object in an library that appears later on the command line, the linker would - not be able to resolve that reference. By grouping the static libraries, they - all be searched repeatedly until all possible references are resolved (use - linker options ``--start-group`` and ``--end-group`` or, on ``SunOS``, - ``-z rescan-start`` and ``-z rescan-end``). + Some linkers are single-pass only. For such linkers, circular references + between libraries typically result in unresolved symbols. This feature + instructs the linker to search the specified static libraries repeatedly + until no new undefined references are created. + + Normally, a static library is searched only once in the order that it is + specified on the command line. If a symbol in that library is needed to + resolve an undefined symbol referred to by an object in a library that + appears later on the command line, the linker would not be able to resolve + that reference. By grouping the static libraries with the ``RESCAN`` + feature, they will all be searched repeatedly until all possible references + are resolved. This will use linker options like ``--start-group`` and + ``--end-group``, or on SunOS, ``-z rescan-start`` and ``-z rescan-end``. Using this feature has a significant performance cost. It is best to use it only when there are unavoidable circular references between two or more static libraries. - This feature is available on ``Linux``, ``BSD``, and ``SunOS`` target - platforms as well as ``Windows`` when ``GNU`` toolchain is used. + This feature is available when using toolchains that target Linux, BSD, and + SunOS. It can also be used when targeting Windows platforms if the GNU + toolchain is used. |