diff options
Diffstat (limited to 'share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/Link-Options.html')
-rw-r--r-- | share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/Link-Options.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/Link-Options.html b/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/Link-Options.html index 6b53fe7..93ba821 100644 --- a/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/Link-Options.html +++ b/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/Link-Options.html @@ -56,23 +56,23 @@ Up: <a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invokin <h3 class="section">3.13 Options for Linking</h3> -<p><a name="index-link-options-989"></a><a name="index-options_002c-linking-990"></a> +<p><a name="index-link-options-991"></a><a name="index-options_002c-linking-992"></a> These options come into play when the compiler links object files into an executable output file. They are meaningless if the compiler is not doing a link step. -<a name="index-file-names-991"></a> +<a name="index-file-names-993"></a> <dl><dt><var>object-file-name</var><dd>A file name that does not end in a special recognized suffix is considered to name an object file or library. (Object files are distinguished from libraries by the linker according to the file contents.) If linking is done, these object files are used as input to the linker. - <br><dt><code>-c</code><dt><code>-S</code><dt><code>-E</code><dd><a name="index-c-992"></a><a name="index-S-993"></a><a name="index-E-994"></a>If any of these options is used, then the linker is not run, and + <br><dt><code>-c</code><dt><code>-S</code><dt><code>-E</code><dd><a name="index-c-994"></a><a name="index-S-995"></a><a name="index-E-996"></a>If any of these options is used, then the linker is not run, and object file names should not be used as arguments. See <a href="Overall-Options.html#Overall-Options">Overall Options</a>. - <p><a name="index-Libraries-995"></a><br><dt><code>-l</code><var>library</var><dt><code>-l </code><var>library</var><dd><a name="index-l-996"></a>Search the library named <var>library</var> when linking. (The second + <p><a name="index-Libraries-997"></a><br><dt><code>-l</code><var>library</var><dt><code>-l </code><var>library</var><dd><a name="index-l-998"></a>Search the library named <var>library</var> when linking. (The second alternative with the library as a separate argument is only for POSIX compliance and is not recommended.) @@ -98,14 +98,14 @@ difference between using an <samp><span class="option">-l</span></samp> option a is that <samp><span class="option">-l</span></samp> surrounds <var>library</var> with ‘<samp><span class="samp">lib</span></samp>’ and ‘<samp><span class="samp">.a</span></samp>’ and searches several directories. - <br><dt><code>-lobjc</code><dd><a name="index-lobjc-997"></a>You need this special case of the <samp><span class="option">-l</span></samp> option in order to + <br><dt><code>-lobjc</code><dd><a name="index-lobjc-999"></a>You need this special case of the <samp><span class="option">-l</span></samp> option in order to link an Objective-C or Objective-C++ program. - <br><dt><code>-nostartfiles</code><dd><a name="index-nostartfiles-998"></a>Do not use the standard system startup files when linking. + <br><dt><code>-nostartfiles</code><dd><a name="index-nostartfiles-1000"></a>Do not use the standard system startup files when linking. The standard system libraries are used normally, unless <samp><span class="option">-nostdlib</span></samp> or <samp><span class="option">-nodefaultlibs</span></samp> is used. - <br><dt><code>-nodefaultlibs</code><dd><a name="index-nodefaultlibs-999"></a>Do not use the standard system libraries when linking. + <br><dt><code>-nodefaultlibs</code><dd><a name="index-nodefaultlibs-1001"></a>Do not use the standard system libraries when linking. Only the libraries you specify will be passed to the linker, options specifying linkage of the system libraries, such as <code>-static-libgcc</code> or <code>-shared-libgcc</code>, will be ignored. @@ -116,7 +116,7 @@ These entries are usually resolved by entries in libc. These entry points should be supplied through some other mechanism when this option is specified. - <br><dt><code>-nostdlib</code><dd><a name="index-nostdlib-1000"></a>Do not use the standard system startup files or libraries when linking. + <br><dt><code>-nostdlib</code><dd><a name="index-nostdlib-1002"></a>Do not use the standard system startup files or libraries when linking. No startup files and only the libraries you specify will be passed to the linker, options specifying linkage of the system libraries, such as <code>-static-libgcc</code> or <code>-shared-libgcc</code>, will be ignored. @@ -126,7 +126,7 @@ These entries are usually resolved by entries in libc. These entry points should be supplied through some other mechanism when this option is specified. - <p><a name="index-g_t_0040option_007b_002dlgcc_007d_002c-use-with-_0040option_007b_002dnostdlib_007d-1001"></a><a name="index-g_t_0040option_007b_002dnostdlib_007d-and-unresolved-references-1002"></a><a name="index-unresolved-references-and-_0040option_007b_002dnostdlib_007d-1003"></a><a name="index-g_t_0040option_007b_002dlgcc_007d_002c-use-with-_0040option_007b_002dnodefaultlibs_007d-1004"></a><a name="index-g_t_0040option_007b_002dnodefaultlibs_007d-and-unresolved-references-1005"></a><a name="index-unresolved-references-and-_0040option_007b_002dnodefaultlibs_007d-1006"></a>One of the standard libraries bypassed by <samp><span class="option">-nostdlib</span></samp> and + <p><a name="index-g_t_0040option_007b_002dlgcc_007d_002c-use-with-_0040option_007b_002dnostdlib_007d-1003"></a><a name="index-g_t_0040option_007b_002dnostdlib_007d-and-unresolved-references-1004"></a><a name="index-unresolved-references-and-_0040option_007b_002dnostdlib_007d-1005"></a><a name="index-g_t_0040option_007b_002dlgcc_007d_002c-use-with-_0040option_007b_002dnodefaultlibs_007d-1006"></a><a name="index-g_t_0040option_007b_002dnodefaultlibs_007d-and-unresolved-references-1007"></a><a name="index-unresolved-references-and-_0040option_007b_002dnodefaultlibs_007d-1008"></a>One of the standard libraries bypassed by <samp><span class="option">-nostdlib</span></samp> and <samp><span class="option">-nodefaultlibs</span></samp> is <samp><span class="file">libgcc.a</span></samp>, a library of internal subroutines which GCC uses to overcome shortcomings of particular machines, or special needs for some languages. @@ -139,29 +139,29 @@ This ensures that you have no unresolved references to internal GCC library subroutines. (For example, ‘<samp><span class="samp">__main</span></samp>’, used to ensure C++ constructors will be called; see <a href="../gccint/Collect2.html#Collect2"><code>collect2</code></a>.) - <br><dt><code>-pie</code><dd><a name="index-pie-1007"></a>Produce a position independent executable on targets that support it. + <br><dt><code>-pie</code><dd><a name="index-pie-1009"></a>Produce a position independent executable on targets that support it. For predictable results, you must also specify the same set of options that were used to generate code (<samp><span class="option">-fpie</span></samp>, <samp><span class="option">-fPIE</span></samp>, or model suboptions) when you specify this option. - <br><dt><code>-rdynamic</code><dd><a name="index-rdynamic-1008"></a>Pass the flag <samp><span class="option">-export-dynamic</span></samp> to the ELF linker, on targets + <br><dt><code>-rdynamic</code><dd><a name="index-rdynamic-1010"></a>Pass the flag <samp><span class="option">-export-dynamic</span></samp> to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. This option is needed for some uses of <code>dlopen</code> or to allow obtaining backtraces from within a program. - <br><dt><code>-s</code><dd><a name="index-s-1009"></a>Remove all symbol table and relocation information from the executable. + <br><dt><code>-s</code><dd><a name="index-s-1011"></a>Remove all symbol table and relocation information from the executable. - <br><dt><code>-static</code><dd><a name="index-static-1010"></a>On systems that support dynamic linking, this prevents linking with the shared + <br><dt><code>-static</code><dd><a name="index-static-1012"></a>On systems that support dynamic linking, this prevents linking with the shared libraries. On other systems, this option has no effect. - <br><dt><code>-shared</code><dd><a name="index-shared-1011"></a>Produce a shared object which can then be linked with other objects to + <br><dt><code>-shared</code><dd><a name="index-shared-1013"></a>Produce a shared object which can then be linked with other objects to form an executable. Not all systems support this option. For predictable results, you must also specify the same set of options that were used to generate code (<samp><span class="option">-fpic</span></samp>, <samp><span class="option">-fPIC</span></samp>, or model suboptions) when you specify this option.<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a> - <br><dt><code>-shared-libgcc</code><dt><code>-static-libgcc</code><dd><a name="index-shared_002dlibgcc-1012"></a><a name="index-static_002dlibgcc-1013"></a>On systems that provide <samp><span class="file">libgcc</span></samp> as a shared library, these options + <br><dt><code>-shared-libgcc</code><dt><code>-static-libgcc</code><dd><a name="index-shared_002dlibgcc-1014"></a><a name="index-static_002dlibgcc-1015"></a>On systems that provide <samp><span class="file">libgcc</span></samp> as a shared library, these options force the use of either the shared or static version respectively. If no shared version of <samp><span class="file">libgcc</span></samp> was built when the compiler was configured, these options have no effect. @@ -205,17 +205,17 @@ the program without going all the way to a fully static link. The link <samp><span class="file">libstdc++</span></samp> statically, without necessarily linking other libraries statically. - <br><dt><code>-symbolic</code><dd><a name="index-symbolic-1014"></a>Bind references to global symbols when building a shared object. Warn + <br><dt><code>-symbolic</code><dd><a name="index-symbolic-1016"></a>Bind references to global symbols when building a shared object. Warn about any unresolved references (unless overridden by the link editor option ‘<samp><span class="samp">-Xlinker -z -Xlinker defs</span></samp>’). Only a few systems support this option. - <br><dt><code>-T </code><var>script</var><dd><a name="index-T-1015"></a><a name="index-linker-script-1016"></a>Use <var>script</var> as the linker script. This option is supported by most + <br><dt><code>-T </code><var>script</var><dd><a name="index-T-1017"></a><a name="index-linker-script-1018"></a>Use <var>script</var> as the linker script. This option is supported by most systems using the GNU linker. On some targets, such as bare-board targets without an operating system, the <samp><span class="option">-T</span></samp> option may be required when linking to avoid references to undefined symbols. - <br><dt><code>-Xlinker </code><var>option</var><dd><a name="index-Xlinker-1017"></a>Pass <var>option</var> as an option to the linker. You can use this to + <br><dt><code>-Xlinker </code><var>option</var><dd><a name="index-Xlinker-1019"></a>Pass <var>option</var> as an option to the linker. You can use this to supply system-specific linker options that GCC does not recognize. <p>If you want to pass an option that takes a separate argument, you must use @@ -232,14 +232,14 @@ syntax than as separate arguments. For example, you can specify ‘<samp><span class="samp">-Xlinker -Map -Xlinker output.map</span></samp>’. Other linkers may not support this syntax for command-line options. - <br><dt><code>-Wl,</code><var>option</var><dd><a name="index-Wl-1018"></a>Pass <var>option</var> as an option to the linker. If <var>option</var> contains + <br><dt><code>-Wl,</code><var>option</var><dd><a name="index-Wl-1020"></a>Pass <var>option</var> as an option to the linker. If <var>option</var> contains commas, it is split into multiple options at the commas. You can use this syntax to pass an argument to the option. For example, ‘<samp><span class="samp">-Wl,-Map,output.map</span></samp>’ passes ‘<samp><span class="samp">-Map output.map</span></samp>’ to the linker. When using the GNU linker, you can also get the same effect with ‘<samp><span class="samp">-Wl,-Map=output.map</span></samp>’. - <br><dt><code>-u </code><var>symbol</var><dd><a name="index-u-1019"></a>Pretend the symbol <var>symbol</var> is undefined, to force linking of + <br><dt><code>-u </code><var>symbol</var><dd><a name="index-u-1021"></a>Pretend the symbol <var>symbol</var> is undefined, to force linking of library modules to define it. You can use <samp><span class="option">-u</span></samp> multiple times with different symbols to force loading of additional library modules. </dl> |