📄 environment.html
字号:
<html lang="en">
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="Environment">Environment</a>,
Previous:<a rel="previous" accesskey="p" href="Options.html#Options">Options</a>,
Up:<a rel="up" accesskey="u" href="Invocation.html#Invocation">Invocation</a>
<hr><br>
</div>
<h3 class="section">Environment Variables</h3>
<p>You can change the behavior of <code>ld</code> with the environment variables
<code>GNUTARGET</code>, <code>LDEMULATION</code>, and <code>COLLECT_NO_DEMANGLE</code>.
<p><code>GNUTARGET</code> determines the input-file object format if you don't
use <code>-b</code> (or its synonym <code>--format</code>). Its value should be one
of the BFD names for an input format (see <a href="BFD.html#BFD">BFD</a>). If there is no
<code>GNUTARGET</code> in the environment, <code>ld</code> uses the natural format
of the target. If <code>GNUTARGET</code> is set to <code>default</code> then BFD
attempts to discover the input format by examining binary input files;
this method often succeeds, but there are potential ambiguities, since
there is no method of ensuring that the magic number used to specify
object-file formats is unique. However, the configuration procedure for
BFD on each system places the conventional format for that system first
in the search-list, so ambiguities are resolved in favor of convention.
<p><code>LDEMULATION</code> determines the default emulation if you don't use the
<code>-m</code> option. The emulation can affect various aspects of linker
behaviour, particularly the default linker script. You can list the
available emulations with the <code>--verbose</code> or <code>-V</code> options. If
the <code>-m</code> option is not used, and the <code>LDEMULATION</code> environment
variable is not defined, the default emulation depends upon how the
linker was configured.
<p>Normally, the linker will default to demangling symbols. However, if
<code>COLLECT_NO_DEMANGLE</code> is set in the environment, then it will
default to not demangling symbols. This environment variable is used in
a similar fashion by the <code>gcc</code> linker wrapper program. The default
may be overridden by the <code>--demangle</code> and <code>--no-demangle</code>
options.
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -