arduino-0018-windows
This commit is contained in:
parent
157fd6f1a1
commit
f39fc49523
5182 changed files with 950586 additions and 0 deletions
|
@ -0,0 +1,192 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>ARM - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="i960.html#i960" title="i960">
|
||||
<link rel="next" href="HPPA-ELF32.html#HPPA-ELF32" title="HPPA ELF32">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="ARM"></a>Next: <a rel="next" accesskey="n" href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="i960.html#i960">i960</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.4 <span class="command">ld</span> and the ARM family</h3>
|
||||
|
||||
<p><a name="index-ARM-interworking-support-532"></a><a name="index-_002d_002dsupport_002dold_002dcode-533"></a>For the ARM, <span class="command">ld</span> will generate code stubs to allow functions calls
|
||||
between ARM and Thumb code. These stubs only work with code that has
|
||||
been compiled and assembled with the <span class="samp">-mthumb-interwork</span> command
|
||||
line option. If it is necessary to link with old ARM object files or
|
||||
libraries, which have not been compiled with the -mthumb-interwork
|
||||
option then the <span class="samp">--support-old-code</span> command line switch should be
|
||||
given to the linker. This will make it generate larger stub functions
|
||||
which will work with non-interworking aware ARM code. Note, however,
|
||||
the linker does not support generating stubs for function calls to
|
||||
non-interworking aware Thumb code.
|
||||
|
||||
<p><a name="index-thumb-entry-point-534"></a><a name="index-entry-point_002c-thumb-535"></a><a name="index-_002d_002dthumb_002dentry_003d_0040var_007bentry_007d-536"></a>The <span class="samp">--thumb-entry</span> switch is a duplicate of the generic
|
||||
<span class="samp">--entry</span> switch, in that it sets the program's starting address.
|
||||
But it also sets the bottom bit of the address, so that it can be
|
||||
branched to using a BX instruction, and the program will start
|
||||
executing in Thumb mode straight away.
|
||||
|
||||
<p><a name="index-BE8-537"></a><a name="index-_002d_002dbe8-538"></a>The <span class="samp">--be8</span> switch instructs <span class="command">ld</span> to generate BE8 format
|
||||
executables. This option is only valid when linking big-endian objects.
|
||||
The resulting image will contain big-endian data and little-endian code.
|
||||
|
||||
<p><a name="index-TARGET1-539"></a><a name="index-_002d_002dtarget1_002drel-540"></a><a name="index-_002d_002dtarget1_002dabs-541"></a>The <span class="samp">R_ARM_TARGET1</span> relocation is typically used for entries in the
|
||||
<span class="samp">.init_array</span> section. It is interpreted as either <span class="samp">R_ARM_REL32</span>
|
||||
or <span class="samp">R_ARM_ABS32</span>, depending on the target. The <span class="samp">--target1-rel</span>
|
||||
and <span class="samp">--target1-abs</span> switches override the default.
|
||||
|
||||
<p><a name="index-TARGET2-542"></a><a name="index-_002d_002dtarget2_003d_0040var_007btype_007d-543"></a>The <span class="samp">--target2=type</span> switch overrides the default definition of the
|
||||
<span class="samp">R_ARM_TARGET2</span> relocation. Valid values for <span class="samp">type</span>, their
|
||||
meanings, and target defaults are as follows:
|
||||
<dl>
|
||||
<dt><span class="samp">rel</span><dd><span class="samp">R_ARM_REL32</span> (arm*-*-elf, arm*-*-eabi)
|
||||
<br><dt><span class="samp">abs</span><dd><span class="samp">R_ARM_ABS32</span> (arm*-*-symbianelf)
|
||||
<br><dt><span class="samp">got-rel</span><dd><span class="samp">R_ARM_GOT_PREL</span> (arm*-*-linux, arm*-*-*bsd)
|
||||
</dl>
|
||||
|
||||
<p><a name="index-FIX_005fV4BX-544"></a><a name="index-_002d_002dfix_002dv4bx-545"></a>The <span class="samp">R_ARM_V4BX</span> relocation (defined by the ARM AAELF
|
||||
specification) enables objects compiled for the ARMv4 architecture to be
|
||||
interworking-safe when linked with other objects compiled for ARMv4t, but
|
||||
also allows pure ARMv4 binaries to be built from the same ARMv4 objects.
|
||||
|
||||
<p>In the latter case, the switch <span class="option">--fix-v4bx</span> must be passed to the
|
||||
linker, which causes v4t <code>BX rM</code> instructions to be rewritten as
|
||||
<code>MOV PC,rM</code>, since v4 processors do not have a <code>BX</code> instruction.
|
||||
|
||||
<p>In the former case, the switch should not be used, and <span class="samp">R_ARM_V4BX</span>
|
||||
relocations are ignored.
|
||||
|
||||
<p><a name="index-FIX_005fV4BX_005fINTERWORKING-546"></a><a name="index-_002d_002dfix_002dv4bx_002dinterworking-547"></a>Replace <code>BX rM</code> instructions identified by <span class="samp">R_ARM_V4BX</span>
|
||||
relocations with a branch to the following veneer:
|
||||
|
||||
<pre class="smallexample"> TST rM, #1
|
||||
MOVEQ PC, rM
|
||||
BX Rn
|
||||
</pre>
|
||||
<p>This allows generation of libraries/applications that work on ARMv4 cores
|
||||
and are still interworking safe. Note that the above veneer clobbers the
|
||||
condition flags, so may cause incorrect progrm behavior in rare cases.
|
||||
|
||||
<p><a name="index-USE_005fBLX-548"></a><a name="index-_002d_002duse_002dblx-549"></a>The <span class="samp">--use-blx</span> switch enables the linker to use ARM/Thumb
|
||||
BLX instructions (available on ARMv5t and above) in various
|
||||
situations. Currently it is used to perform calls via the PLT from Thumb
|
||||
code using BLX rather than using BX and a mode-switching stub before
|
||||
each PLT entry. This should lead to such calls executing slightly faster.
|
||||
|
||||
<p>This option is enabled implicitly for SymbianOS, so there is no need to
|
||||
specify it if you are using that target.
|
||||
|
||||
<p><a name="index-VFP11_005fDENORM_005fFIX-550"></a><a name="index-_002d_002dvfp11_002ddenorm_002dfix-551"></a>The <span class="samp">--vfp11-denorm-fix</span> switch enables a link-time workaround for a
|
||||
bug in certain VFP11 coprocessor hardware, which sometimes allows
|
||||
instructions with denorm operands (which must be handled by support code)
|
||||
to have those operands overwritten by subsequent instructions before
|
||||
the support code can read the intended values.
|
||||
|
||||
<p>The bug may be avoided in scalar mode if you allow at least one
|
||||
intervening instruction between a VFP11 instruction which uses a register
|
||||
and another instruction which writes to the same register, or at least two
|
||||
intervening instructions if vector mode is in use. The bug only affects
|
||||
full-compliance floating-point mode: you do not need this workaround if
|
||||
you are using "runfast" mode. Please contact ARM for further details.
|
||||
|
||||
<p>If you know you are using buggy VFP11 hardware, you can
|
||||
enable this workaround by specifying the linker option
|
||||
<span class="samp">--vfp-denorm-fix=scalar</span> if you are using the VFP11 scalar
|
||||
mode only, or <span class="samp">--vfp-denorm-fix=vector</span> if you are using
|
||||
vector mode (the latter also works for scalar code). The default is
|
||||
<span class="samp">--vfp-denorm-fix=none</span>.
|
||||
|
||||
<p>If the workaround is enabled, instructions are scanned for
|
||||
potentially-troublesome sequences, and a veneer is created for each
|
||||
such sequence which may trigger the erratum. The veneer consists of the
|
||||
first instruction of the sequence and a branch back to the subsequent
|
||||
instruction. The original instruction is then replaced with a branch to
|
||||
the veneer. The extra cycles required to call and return from the veneer
|
||||
are sufficient to avoid the erratum in both the scalar and vector cases.
|
||||
|
||||
<p><a name="index-NO_005fENUM_005fSIZE_005fWARNING-552"></a><a name="index-_002d_002dno_002denum_002dsize_002dwarning-553"></a>The <span class="option">--no-enum-size-warning</span> switch prevents the linker from
|
||||
warning when linking object files that specify incompatible EABI
|
||||
enumeration size attributes. For example, with this switch enabled,
|
||||
linking of an object file using 32-bit enumeration values with another
|
||||
using enumeration values fitted into the smallest possible space will
|
||||
not be diagnosed.
|
||||
|
||||
<p><a name="index-NO_005fWCHAR_005fSIZE_005fWARNING-554"></a><a name="index-_002d_002dno_002dwchar_002dsize_002dwarning-555"></a>The <span class="option">--no-wchar-size-warning</span> switch prevents the linker from
|
||||
warning when linking object files that specify incompatible EABI
|
||||
<code>wchar_t</code> size attributes. For example, with this switch enabled,
|
||||
linking of an object file using 32-bit <code>wchar_t</code> values with another
|
||||
using 16-bit <code>wchar_t</code> values will not be diagnosed.
|
||||
|
||||
<p><a name="index-PIC_005fVENEER-556"></a><a name="index-_002d_002dpic_002dveneer-557"></a>The <span class="samp">--pic-veneer</span> switch makes the linker use PIC sequences for
|
||||
ARM/Thumb interworking veneers, even if the rest of the binary
|
||||
is not PIC. This avoids problems on uClinux targets where
|
||||
<span class="samp">--emit-relocs</span> is used to generate relocatable binaries.
|
||||
|
||||
<p><a name="index-STUB_005fGROUP_005fSIZE-558"></a><a name="index-_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-559"></a>The linker will automatically generate and insert small sequences of
|
||||
code into a linked ARM ELF executable whenever an attempt is made to
|
||||
perform a function call to a symbol that is too far away. The
|
||||
placement of these sequences of instructions - called stubs - is
|
||||
controlled by the command line option <span class="option">--stub-group-size=N</span>.
|
||||
The placement is important because a poor choice can create a need for
|
||||
duplicate stubs, increasing the code sizw. The linker will try to
|
||||
group stubs together in order to reduce interruptions to the flow of
|
||||
code, but it needs guidance as to how big these groups should be and
|
||||
where they should be placed.
|
||||
|
||||
<p>The value of <span class="samp">N</span>, the parameter to the
|
||||
<span class="option">--stub-group-size=</span> option controls where the stub groups are
|
||||
placed. If it is negative then all stubs are placed before the first
|
||||
branch that needs them. If it is positive then the stubs can be
|
||||
placed either before or after the branches that need them. If the
|
||||
value of <span class="samp">N</span> is 1 (either +1 or -1) then the linker will choose
|
||||
exactly where to place groups of stubs, using its built in heuristics.
|
||||
A value of <span class="samp">N</span> greater than 1 (or smaller than -1) tells the
|
||||
linker that a single group of stubs can service at most <span class="samp">N</span> bytes
|
||||
from the input sections.
|
||||
|
||||
<p>The default, if <span class="option">--stub-group-size=</span> is not specified, is
|
||||
<span class="samp">N = +1</span>.
|
||||
|
||||
<p>Farcalls stubs insertion is fully supported for the ARM-EABI target
|
||||
only, because it relies on object files properties not present
|
||||
otherwise.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Assignments - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="Simple-Commands.html#Simple-Commands" title="Simple Commands">
|
||||
<link rel="next" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Assignments"></a>Next: <a rel="next" accesskey="n" href="SECTIONS.html#SECTIONS">SECTIONS</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.5 Assigning Values to Symbols</h3>
|
||||
|
||||
<p><a name="index-assignment-in-scripts-356"></a><a name="index-symbol-definition_002c-scripts-357"></a><a name="index-variables_002c-defining-358"></a>You may assign a value to a symbol in a linker script. This will define
|
||||
the symbol and place it into the symbol table with a global scope.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Simple-Assignments.html#Simple-Assignments">Simple Assignments</a>: Simple Assignments
|
||||
<li><a accesskey="2" href="PROVIDE.html#PROVIDE">PROVIDE</a>: PROVIDE
|
||||
<li><a accesskey="3" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">PROVIDE_HIDDEN</a>: PROVIDE_HIDDEN
|
||||
<li><a accesskey="4" href="Source-Code-Reference.html#Source-Code-Reference">Source Code Reference</a>: How to use a linker script defined symbol in source code
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>BFD information loss - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="BFD-outline.html#BFD-outline" title="BFD outline">
|
||||
<link rel="next" href="Canonical-format.html#Canonical-format" title="Canonical format">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="BFD-information-loss"></a>Next: <a rel="next" accesskey="n" href="Canonical-format.html#Canonical-format">Canonical format</a>,
|
||||
Up: <a rel="up" accesskey="u" href="BFD-outline.html#BFD-outline">BFD outline</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">5.1.1 Information Loss</h4>
|
||||
|
||||
<p><em>Information can be lost during output.</em> The output formats
|
||||
supported by BFD do not provide identical facilities, and
|
||||
information which can be described in one form has nowhere to go in
|
||||
another format. One example of this is alignment information in
|
||||
<code>b.out</code>. There is nowhere in an <code>a.out</code> format file to store
|
||||
alignment information on the contained data, so when a file is linked
|
||||
from <code>b.out</code> and an <code>a.out</code> image is produced, alignment
|
||||
information will not propagate to the output file. (The linker will
|
||||
still use the alignment information internally, so the link is performed
|
||||
correctly).
|
||||
|
||||
<p>Another example is COFF section names. COFF files may contain an
|
||||
unlimited number of sections, each one with a textual section name. If
|
||||
the target of the link is a format which does not have many sections (e.g.,
|
||||
<code>a.out</code>) or has sections without names (e.g., the Oasys format), the
|
||||
link cannot be done simply. You can circumvent this problem by
|
||||
describing the desired input-to-output section mapping with the linker command
|
||||
language.
|
||||
|
||||
<p><em>Information can be lost during canonicalization.</em> The BFD
|
||||
internal canonical form of the external formats is not exhaustive; there
|
||||
are structures in input formats for which there is no direct
|
||||
representation internally. This means that the BFD back ends
|
||||
cannot maintain all possible data richness through the transformation
|
||||
between external to internal and back to external formats.
|
||||
|
||||
<p>This limitation is only a problem when an application reads one
|
||||
format and writes another. Each BFD back end is responsible for
|
||||
maintaining as much data as possible, and the internal BFD
|
||||
canonical form has structures which are opaque to the BFD core,
|
||||
and exported only to the back ends. When a file is read in one format,
|
||||
the canonical form is generated for BFD and the application. At the
|
||||
same time, the back end saves away any information which may otherwise
|
||||
be lost. If the data is then written back in the same format, the back
|
||||
end routine will be able to use the canonical form provided by the
|
||||
BFD core as well as the information it prepared earlier. Since
|
||||
there is a great deal of commonality between back ends,
|
||||
there is no information lost when
|
||||
linking or copying big endian COFF to little endian COFF, or <code>a.out</code> to
|
||||
<code>b.out</code>. When a mixture of formats is linked, the information is
|
||||
only lost from the files whose format differs from the destination.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>BFD outline - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="BFD.html#BFD" title="BFD">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="BFD-outline"></a>Up: <a rel="up" accesskey="u" href="BFD.html#BFD">BFD</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">5.1 How It Works: An Outline of BFD</h3>
|
||||
|
||||
<p><a name="index-opening-object-files-635"></a><!-- This summary of BFD is shared by the BFD and LD docs. -->
|
||||
When an object file is opened, BFD subroutines automatically determine
|
||||
the format of the input object file. They then build a descriptor in
|
||||
memory with pointers to routines that will be used to access elements of
|
||||
the object file's data structures.
|
||||
|
||||
<p>As different information from the object files is required,
|
||||
BFD reads from different sections of the file and processes them.
|
||||
For example, a very common operation for the linker is processing symbol
|
||||
tables. Each BFD back end provides a routine for converting
|
||||
between the object file's representation of symbols and an internal
|
||||
canonical format. When the linker asks for the symbol table of an object
|
||||
file, it calls through a memory pointer to the routine from the
|
||||
relevant BFD back end which reads and converts the table into a canonical
|
||||
form. The linker then operates upon the canonical form. When the link is
|
||||
finished and the linker writes the output file's symbol table,
|
||||
another BFD back end routine is called to take the newly
|
||||
created symbol table and convert it into the chosen output format.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="BFD-information-loss.html#BFD-information-loss">BFD information loss</a>: Information Loss
|
||||
<li><a accesskey="2" href="Canonical-format.html#Canonical-format">Canonical format</a>: The BFD canonical object-file format
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>BFD - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="next" href="Reporting-Bugs.html#Reporting-Bugs" title="Reporting Bugs">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="BFD"></a>Next: <a rel="next" accesskey="n" href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">5 BFD</h2>
|
||||
|
||||
<p><a name="index-back-end-629"></a><a name="index-object-file-management-630"></a><a name="index-object-formats-available-631"></a><a name="index-objdump-_002di-632"></a>The linker accesses object and archive files using the BFD libraries.
|
||||
These libraries allow the linker to use the same routines to operate on
|
||||
object files whatever the object file format. A different object file
|
||||
format can be supported simply by creating a new BFD back end and adding
|
||||
it to the library. To conserve runtime memory, however, the linker and
|
||||
associated tools are usually configured to support only a subset of the
|
||||
object file formats available. You can use <code>objdump -i</code>
|
||||
(see <a href="../binutils/objdump.html#objdump">objdump (The GNU Binary Utilities)</a>) to
|
||||
list all the formats available for your configuration.
|
||||
|
||||
<p><a name="index-BFD-requirements-633"></a><a name="index-requirements-for-BFD-634"></a>As with most implementations, BFD is a compromise between
|
||||
several conflicting requirements. The major factor influencing
|
||||
BFD design was efficiency: any time used converting between
|
||||
formats is time which would not have been spent had BFD not
|
||||
been involved. This is partly offset by abstraction payback; since
|
||||
BFD simplifies applications and back ends, more time and care
|
||||
may be spent optimizing algorithms for a greater speed.
|
||||
|
||||
<p>One minor artifact of the BFD solution which you should bear in
|
||||
mind is the potential for information loss. There are two places where
|
||||
useful information can be lost using the BFD mechanism: during
|
||||
conversion and during output. See <a href="BFD-information-loss.html#BFD-information-loss">BFD information loss</a>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="BFD-outline.html#BFD-outline">BFD outline</a>: How it works: an outline of BFD
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Basic Script Concepts - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="next" href="Script-Format.html#Script-Format" title="Script Format">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Basic-Script-Concepts"></a>Next: <a rel="next" accesskey="n" href="Script-Format.html#Script-Format">Script Format</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.1 Basic Linker Script Concepts</h3>
|
||||
|
||||
<p><a name="index-linker-script-concepts-310"></a>We need to define some basic concepts and vocabulary in order to
|
||||
describe the linker script language.
|
||||
|
||||
<p>The linker combines input files into a single output file. The output
|
||||
file and each input file are in a special data format known as an
|
||||
<dfn>object file format</dfn>. Each file is called an <dfn>object file</dfn>.
|
||||
The output file is often called an <dfn>executable</dfn>, but for our
|
||||
purposes we will also call it an object file. Each object file has,
|
||||
among other things, a list of <dfn>sections</dfn>. We sometimes refer to a
|
||||
section in an input file as an <dfn>input section</dfn>; similarly, a section
|
||||
in the output file is an <dfn>output section</dfn>.
|
||||
|
||||
<p>Each section in an object file has a name and a size. Most sections
|
||||
also have an associated block of data, known as the <dfn>section
|
||||
contents</dfn>. A section may be marked as <dfn>loadable</dfn>, which mean that
|
||||
the contents should be loaded into memory when the output file is run.
|
||||
A section with no contents may be <dfn>allocatable</dfn>, which means that an
|
||||
area in memory should be set aside, but nothing in particular should be
|
||||
loaded there (in some cases this memory must be zeroed out). A section
|
||||
which is neither loadable nor allocatable typically contains some sort
|
||||
of debugging information.
|
||||
|
||||
<p>Every loadable or allocatable output section has two addresses. The
|
||||
first is the <dfn>VMA</dfn>, or virtual memory address. This is the address
|
||||
the section will have when the output file is run. The second is the
|
||||
<dfn>LMA</dfn>, or load memory address. This is the address at which the
|
||||
section will be loaded. In most cases the two addresses will be the
|
||||
same. An example of when they might be different is when a data section
|
||||
is loaded into ROM, and then copied into RAM when the program starts up
|
||||
(this technique is often used to initialize global variables in a ROM
|
||||
based system). In this case the ROM address would be the LMA, and the
|
||||
RAM address would be the VMA.
|
||||
|
||||
<p>You can see the sections in an object file by using the <code>objdump</code>
|
||||
program with the <span class="samp">-h</span> option.
|
||||
|
||||
<p>Every object file also has a list of <dfn>symbols</dfn>, known as the
|
||||
<dfn>symbol table</dfn>. A symbol may be defined or undefined. Each symbol
|
||||
has a name, and each defined symbol has an address, among other
|
||||
information. If you compile a C or C++ program into an object file, you
|
||||
will get a defined symbol for every defined function and global or
|
||||
static variable. Every undefined function or global variable which is
|
||||
referenced in the input file will become an undefined symbol.
|
||||
|
||||
<p>You can see the symbols in an object file by using the <code>nm</code>
|
||||
program, or by using the <code>objdump</code> program with the <span class="samp">-t</span>
|
||||
option.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Bug Criteria - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Reporting-Bugs.html#Reporting-Bugs" title="Reporting Bugs">
|
||||
<link rel="next" href="Bug-Reporting.html#Bug-Reporting" title="Bug Reporting">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Bug-Criteria"></a>Next: <a rel="next" accesskey="n" href="Bug-Reporting.html#Bug-Reporting">Bug Reporting</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">6.1 Have You Found a Bug?</h3>
|
||||
|
||||
<p><a name="index-bug-criteria-640"></a>
|
||||
If you are not sure whether you have found a bug, here are some guidelines:
|
||||
|
||||
|
||||
<a name="index-fatal-signal-641"></a>
|
||||
<a name="index-linker-crash-642"></a>
|
||||
<a name="index-crash-of-linker-643"></a>
|
||||
<ul><li>If the linker gets a fatal signal, for any input whatever, that is a
|
||||
<span class="command">ld</span> bug. Reliable linkers never crash.
|
||||
|
||||
<p><a name="index-error-on-valid-input-644"></a><li>If <span class="command">ld</span> produces an error message for valid input, that is a bug.
|
||||
|
||||
<p><a name="index-invalid-input-645"></a><li>If <span class="command">ld</span> does not produce an error message for invalid input, that
|
||||
may be a bug. In the general case, the linker can not verify that
|
||||
object files are correct.
|
||||
|
||||
<li>If you are an experienced user of linkers, your suggestions for
|
||||
improvement of <span class="command">ld</span> are welcome in any case.
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Bug Reporting - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Reporting-Bugs.html#Reporting-Bugs" title="Reporting Bugs">
|
||||
<link rel="prev" href="Bug-Criteria.html#Bug-Criteria" title="Bug Criteria">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Bug-Reporting"></a>Previous: <a rel="previous" accesskey="p" href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">6.2 How to Report Bugs</h3>
|
||||
|
||||
<p><a name="index-bug-reports-646"></a><a name="index-_0040command_007bld_007d-bugs_002c-reporting-647"></a>
|
||||
A number of companies and individuals offer support for <span class="sc">gnu</span>
|
||||
products. If you obtained <span class="command">ld</span> from a support organization, we
|
||||
recommend you contact that organization first.
|
||||
|
||||
<p>You can find contact information for many support companies and
|
||||
individuals in the file <span class="file">etc/SERVICE</span> in the <span class="sc">gnu</span> Emacs
|
||||
distribution.
|
||||
|
||||
<p>Otherwise, send bug reports for <span class="command">ld</span> to
|
||||
<a href="http://www.sourceware.org/bugzilla/">http://www.sourceware.org/bugzilla/</a>.
|
||||
|
||||
<p>The fundamental principle of reporting bugs usefully is this:
|
||||
<strong>report all the facts</strong>. If you are not sure whether to state a
|
||||
fact or leave it out, state it!
|
||||
|
||||
<p>Often people omit facts because they think they know what causes the
|
||||
problem and assume that some details do not matter. Thus, you might
|
||||
assume that the name of a symbol you use in an example does not
|
||||
matter. Well, probably it does not, but one cannot be sure. Perhaps
|
||||
the bug is a stray memory reference which happens to fetch from the
|
||||
location where that name is stored in memory; perhaps, if the name
|
||||
were different, the contents of that location would fool the linker
|
||||
into doing the right thing despite the bug. Play it safe and give a
|
||||
specific, complete example. That is the easiest thing for you to do,
|
||||
and the most helpful.
|
||||
|
||||
<p>Keep in mind that the purpose of a bug report is to enable us to fix
|
||||
the bug if it is new to us. Therefore, always write your bug reports
|
||||
on the assumption that the bug has not been reported previously.
|
||||
|
||||
<p>Sometimes people give a few sketchy facts and ask, “Does this ring a
|
||||
bell?” This cannot help us fix a bug, so it is basically useless. We
|
||||
respond by asking for enough details to enable us to investigate.
|
||||
You might as well expedite matters by sending them to begin with.
|
||||
|
||||
<p>To enable us to fix the bug, you should include all these things:
|
||||
|
||||
<ul>
|
||||
<li>The version of <span class="command">ld</span>. <span class="command">ld</span> announces it if you start it with
|
||||
the <span class="samp">--version</span> argument.
|
||||
|
||||
<p>Without this, we will not know whether there is any point in looking for
|
||||
the bug in the current version of <span class="command">ld</span>.
|
||||
|
||||
<li>Any patches you may have applied to the <span class="command">ld</span> source, including any
|
||||
patches made to the <code>BFD</code> library.
|
||||
|
||||
<li>The type of machine you are using, and the operating system name and
|
||||
version number.
|
||||
|
||||
<li>What compiler (and its version) was used to compile <span class="command">ld</span>—e.g.
|
||||
“<code>gcc-2.7</code>”.
|
||||
|
||||
<li>The command arguments you gave the linker to link your example and
|
||||
observe the bug. To guarantee you will not omit something important,
|
||||
list them all. A copy of the Makefile (or the output from make) is
|
||||
sufficient.
|
||||
|
||||
<p>If we were to try to guess the arguments, we would probably guess wrong
|
||||
and then we might not encounter the bug.
|
||||
|
||||
<li>A complete input file, or set of input files, that will reproduce the
|
||||
bug. It is generally most helpful to send the actual object files
|
||||
provided that they are reasonably small. Say no more than 10K. For
|
||||
bigger files you can either make them available by FTP or HTTP or else
|
||||
state that you are willing to send the object file(s) to whomever
|
||||
requests them. (Note - your email will be going to a mailing list, so
|
||||
we do not want to clog it up with large attachments). But small
|
||||
attachments are best.
|
||||
|
||||
<p>If the source files were assembled using <code>gas</code> or compiled using
|
||||
<code>gcc</code>, then it may be OK to send the source files rather than the
|
||||
object files. In this case, be sure to say exactly what version of
|
||||
<code>gas</code> or <code>gcc</code> was used to produce the object files. Also say
|
||||
how <code>gas</code> or <code>gcc</code> were configured.
|
||||
|
||||
<li>A description of what behavior you observe that you believe is
|
||||
incorrect. For example, “It gets a fatal signal.”
|
||||
|
||||
<p>Of course, if the bug is that <span class="command">ld</span> gets a fatal signal, then we
|
||||
will certainly notice it. But if the bug is incorrect output, we might
|
||||
not notice unless it is glaringly wrong. You might as well not give us
|
||||
a chance to make a mistake.
|
||||
|
||||
<p>Even if the problem you experience is a fatal signal, you should still
|
||||
say so explicitly. Suppose something strange is going on, such as, your
|
||||
copy of <span class="command">ld</span> is out of sync, or you have encountered a bug in the
|
||||
C library on your system. (This has happened!) Your copy might crash
|
||||
and ours would not. If you told us to expect a crash, then when ours
|
||||
fails to crash, we would know that the bug was not happening for us. If
|
||||
you had not told us to expect a crash, then we would not be able to draw
|
||||
any conclusion from our observations.
|
||||
|
||||
<li>If you wish to suggest changes to the <span class="command">ld</span> source, send us context
|
||||
diffs, as generated by <code>diff</code> with the <span class="samp">-u</span>, <span class="samp">-c</span>, or
|
||||
<span class="samp">-p</span> option. Always send diffs from the old file to the new file.
|
||||
If you even discuss something in the <span class="command">ld</span> source, refer to it by
|
||||
context, not by line number.
|
||||
|
||||
<p>The line numbers in our development sources will not match those in your
|
||||
sources. Your line numbers would convey no useful information to us.
|
||||
</ul>
|
||||
|
||||
<p>Here are some things that are not necessary:
|
||||
|
||||
<ul>
|
||||
<li>A description of the envelope of the bug.
|
||||
|
||||
<p>Often people who encounter a bug spend a lot of time investigating
|
||||
which changes to the input file will make the bug go away and which
|
||||
changes will not affect it.
|
||||
|
||||
<p>This is often time consuming and not very useful, because the way we
|
||||
will find the bug is by running a single example under the debugger
|
||||
with breakpoints, not by pure deduction from a series of examples.
|
||||
We recommend that you save your time for something else.
|
||||
|
||||
<p>Of course, if you can find a simpler example to report <em>instead</em>
|
||||
of the original one, that is a convenience for us. Errors in the
|
||||
output will be easier to spot, running under the debugger will take
|
||||
less time, and so on.
|
||||
|
||||
<p>However, simplification is not vital; if you do not want to do this,
|
||||
report the bug anyway and send us the entire test case you used.
|
||||
|
||||
<li>A patch for the bug.
|
||||
|
||||
<p>A patch for the bug does help us if it is a good one. But do not omit
|
||||
the necessary information, such as the test case, on the assumption that
|
||||
a patch is all we need. We might see problems with your patch and decide
|
||||
to fix the problem another way, or we might not understand it at all.
|
||||
|
||||
<p>Sometimes with a program as complicated as <span class="command">ld</span> it is very hard to
|
||||
construct an example that will make the program follow a certain path
|
||||
through the code. If you do not send us the example, we will not be
|
||||
able to construct one, so we will not be able to verify that the bug is
|
||||
fixed.
|
||||
|
||||
<p>And if we cannot understand what bug you are trying to fix, or why your
|
||||
patch should be an improvement, we will not install it. A test case will
|
||||
help us to understand.
|
||||
|
||||
<li>A guess about what the bug is or what it depends on.
|
||||
|
||||
<p>Such guesses are usually wrong. Even we cannot guess right about such
|
||||
things without first using the debugger to find the facts.
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Builtin Functions - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Expression-Section.html#Expression-Section" title="Expression Section">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Builtin-Functions"></a>Previous: <a rel="previous" accesskey="p" href="Expression-Section.html#Expression-Section">Expression Section</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.8 Builtin Functions</h4>
|
||||
|
||||
<p><a name="index-functions-in-expressions-486"></a>The linker script language includes a number of builtin functions for
|
||||
use in linker script expressions.
|
||||
|
||||
<dl>
|
||||
<dt><code>ABSOLUTE(</code><var>exp</var><code>)</code><dd><a name="index-ABSOLUTE_0028_0040var_007bexp_007d_0029-487"></a><a name="index-expression_002c-absolute-488"></a>Return the absolute (non-relocatable, as opposed to non-negative) value
|
||||
of the expression <var>exp</var>. Primarily useful to assign an absolute
|
||||
value to a symbol within a section definition, where symbol values are
|
||||
normally section relative. See <a href="Expression-Section.html#Expression-Section">Expression Section</a>.
|
||||
|
||||
<br><dt><code>ADDR(</code><var>section</var><code>)</code><dd><a name="index-ADDR_0028_0040var_007bsection_007d_0029-489"></a><a name="index-section-address-in-expression-490"></a>Return the absolute address (the VMA) of the named <var>section</var>. Your
|
||||
script must previously have defined the location of that section. In
|
||||
the following example, <code>symbol_1</code> and <code>symbol_2</code> are assigned
|
||||
identical values:
|
||||
<pre class="smallexample"> SECTIONS { ...
|
||||
.output1 :
|
||||
{
|
||||
start_of_output_1 = ABSOLUTE(.);
|
||||
...
|
||||
}
|
||||
.output :
|
||||
{
|
||||
symbol_1 = ADDR(.output1);
|
||||
symbol_2 = start_of_output_1;
|
||||
}
|
||||
... }
|
||||
</pre>
|
||||
<br><dt><code>ALIGN(</code><var>align</var><code>)</code><dt><code>ALIGN(</code><var>exp</var><code>,</code><var>align</var><code>)</code><dd><a name="index-ALIGN_0028_0040var_007balign_007d_0029-491"></a><a name="index-ALIGN_0028_0040var_007bexp_007d_002c_0040var_007balign_007d_0029-492"></a><a name="index-round-up-location-counter-493"></a><a name="index-align-location-counter-494"></a><a name="index-round-up-expression-495"></a><a name="index-align-expression-496"></a>Return the location counter (<code>.</code>) or arbitrary expression aligned
|
||||
to the next <var>align</var> boundary. The single operand <code>ALIGN</code>
|
||||
doesn't change the value of the location counter—it just does
|
||||
arithmetic on it. The two operand <code>ALIGN</code> allows an arbitrary
|
||||
expression to be aligned upwards (<code>ALIGN(</code><var>align</var><code>)</code> is
|
||||
equivalent to <code>ALIGN(., </code><var>align</var><code>)</code>).
|
||||
|
||||
<p>Here is an example which aligns the output <code>.data</code> section to the
|
||||
next <code>0x2000</code> byte boundary after the preceding section and sets a
|
||||
variable within the section to the next <code>0x8000</code> boundary after the
|
||||
input sections:
|
||||
<pre class="smallexample"> SECTIONS { ...
|
||||
.data ALIGN(0x2000): {
|
||||
*(.data)
|
||||
variable = ALIGN(0x8000);
|
||||
}
|
||||
... }
|
||||
</pre>
|
||||
<p class="noindent">The first use of <code>ALIGN</code> in this example specifies the location of
|
||||
a section because it is used as the optional <var>address</var> attribute of
|
||||
a section definition (see <a href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a>). The second use
|
||||
of <code>ALIGN</code> is used to defines the value of a symbol.
|
||||
|
||||
<p>The builtin function <code>NEXT</code> is closely related to <code>ALIGN</code>.
|
||||
|
||||
<br><dt><code>ALIGNOF(</code><var>section</var><code>)</code><dd><a name="index-ALIGNOF_0028_0040var_007bsection_007d_0029-497"></a><a name="index-section-alignment-498"></a>Return the alignment in bytes of the named <var>section</var>, if that section has
|
||||
been allocated. If the section has not been allocated when this is
|
||||
evaluated, the linker will report an error. In the following example,
|
||||
the alignment of the <code>.output</code> section is stored as the first
|
||||
value in that section.
|
||||
<pre class="smallexample"> SECTIONS{ ...
|
||||
.output {
|
||||
LONG (ALIGNOF (.output))
|
||||
...
|
||||
}
|
||||
... }
|
||||
</pre>
|
||||
<br><dt><code>BLOCK(</code><var>exp</var><code>)</code><dd><a name="index-BLOCK_0028_0040var_007bexp_007d_0029-499"></a>This is a synonym for <code>ALIGN</code>, for compatibility with older linker
|
||||
scripts. It is most often seen when setting the address of an output
|
||||
section.
|
||||
|
||||
<br><dt><code>DATA_SEGMENT_ALIGN(</code><var>maxpagesize</var><code>, </code><var>commonpagesize</var><code>)</code><dd><a name="index-DATA_005fSEGMENT_005fALIGN_0028_0040var_007bmaxpagesize_007d_002c-_0040var_007bcommonpagesize_007d_0029-500"></a>This is equivalent to either
|
||||
<pre class="smallexample"> (ALIGN(<var>maxpagesize</var>) + (. & (<var>maxpagesize</var> - 1)))
|
||||
</pre>
|
||||
<p>or
|
||||
<pre class="smallexample"> (ALIGN(<var>maxpagesize</var>) + (. & (<var>maxpagesize</var> - <var>commonpagesize</var>)))
|
||||
</pre>
|
||||
<p class="noindent">depending on whether the latter uses fewer <var>commonpagesize</var> sized pages
|
||||
for the data segment (area between the result of this expression and
|
||||
<code>DATA_SEGMENT_END</code>) than the former or not.
|
||||
If the latter form is used, it means <var>commonpagesize</var> bytes of runtime
|
||||
memory will be saved at the expense of up to <var>commonpagesize</var> wasted
|
||||
bytes in the on-disk file.
|
||||
|
||||
<p>This expression can only be used directly in <code>SECTIONS</code> commands, not in
|
||||
any output section descriptions and only once in the linker script.
|
||||
<var>commonpagesize</var> should be less or equal to <var>maxpagesize</var> and should
|
||||
be the system page size the object wants to be optimized for (while still
|
||||
working on system page sizes up to <var>maxpagesize</var>).
|
||||
|
||||
<p class="noindent">Example:
|
||||
<pre class="smallexample"> . = DATA_SEGMENT_ALIGN(0x10000, 0x2000);
|
||||
</pre>
|
||||
<br><dt><code>DATA_SEGMENT_END(</code><var>exp</var><code>)</code><dd><a name="index-DATA_005fSEGMENT_005fEND_0028_0040var_007bexp_007d_0029-501"></a>This defines the end of data segment for <code>DATA_SEGMENT_ALIGN</code>
|
||||
evaluation purposes.
|
||||
|
||||
<pre class="smallexample"> . = DATA_SEGMENT_END(.);
|
||||
</pre>
|
||||
<br><dt><code>DATA_SEGMENT_RELRO_END(</code><var>offset</var><code>, </code><var>exp</var><code>)</code><dd><a name="index-DATA_005fSEGMENT_005fRELRO_005fEND_0028_0040var_007boffset_007d_002c-_0040var_007bexp_007d_0029-502"></a>This defines the end of the <code>PT_GNU_RELRO</code> segment when
|
||||
<span class="samp">-z relro</span> option is used. Second argument is returned.
|
||||
When <span class="samp">-z relro</span> option is not present, <code>DATA_SEGMENT_RELRO_END</code>
|
||||
does nothing, otherwise <code>DATA_SEGMENT_ALIGN</code> is padded so that
|
||||
<var>exp</var> + <var>offset</var> is aligned to the most commonly used page
|
||||
boundary for particular target. If present in the linker script,
|
||||
it must always come in between <code>DATA_SEGMENT_ALIGN</code> and
|
||||
<code>DATA_SEGMENT_END</code>.
|
||||
|
||||
<pre class="smallexample"> . = DATA_SEGMENT_RELRO_END(24, .);
|
||||
</pre>
|
||||
<br><dt><code>DEFINED(</code><var>symbol</var><code>)</code><dd><a name="index-DEFINED_0028_0040var_007bsymbol_007d_0029-503"></a><a name="index-symbol-defaults-504"></a>Return 1 if <var>symbol</var> is in the linker global symbol table and is
|
||||
defined before the statement using DEFINED in the script, otherwise
|
||||
return 0. You can use this function to provide
|
||||
default values for symbols. For example, the following script fragment
|
||||
shows how to set a global symbol <span class="samp">begin</span> to the first location in
|
||||
the <span class="samp">.text</span> section—but if a symbol called <span class="samp">begin</span> already
|
||||
existed, its value is preserved:
|
||||
|
||||
<pre class="smallexample"> SECTIONS { ...
|
||||
.text : {
|
||||
begin = DEFINED(begin) ? begin : . ;
|
||||
...
|
||||
}
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
<br><dt><code>LENGTH(</code><var>memory</var><code>)</code><dd><a name="index-LENGTH_0028_0040var_007bmemory_007d_0029-505"></a>Return the length of the memory region named <var>memory</var>.
|
||||
|
||||
<br><dt><code>LOADADDR(</code><var>section</var><code>)</code><dd><a name="index-LOADADDR_0028_0040var_007bsection_007d_0029-506"></a><a name="index-section-load-address-in-expression-507"></a>Return the absolute LMA of the named <var>section</var>. This is normally
|
||||
the same as <code>ADDR</code>, but it may be different if the <code>AT</code>
|
||||
attribute is used in the output section definition (see <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a>).
|
||||
|
||||
<p><a name="index-MAX-508"></a><br><dt><code>MAX(</code><var>exp1</var><code>, </code><var>exp2</var><code>)</code><dd>Returns the maximum of <var>exp1</var> and <var>exp2</var>.
|
||||
|
||||
<p><a name="index-MIN-509"></a><br><dt><code>MIN(</code><var>exp1</var><code>, </code><var>exp2</var><code>)</code><dd>Returns the minimum of <var>exp1</var> and <var>exp2</var>.
|
||||
|
||||
<br><dt><code>NEXT(</code><var>exp</var><code>)</code><dd><a name="index-NEXT_0028_0040var_007bexp_007d_0029-510"></a><a name="index-unallocated-address_002c-next-511"></a>Return the next unallocated address that is a multiple of <var>exp</var>.
|
||||
This function is closely related to <code>ALIGN(</code><var>exp</var><code>)</code>; unless you
|
||||
use the <code>MEMORY</code> command to define discontinuous memory for the
|
||||
output file, the two functions are equivalent.
|
||||
|
||||
<br><dt><code>ORIGIN(</code><var>memory</var><code>)</code><dd><a name="index-ORIGIN_0028_0040var_007bmemory_007d_0029-512"></a>Return the origin of the memory region named <var>memory</var>.
|
||||
|
||||
<br><dt><code>SEGMENT_START(</code><var>segment</var><code>, </code><var>default</var><code>)</code><dd><a name="index-SEGMENT_005fSTART_0028_0040var_007bsegment_007d_002c-_0040var_007bdefault_007d_0029-513"></a>Return the base address of the named <var>segment</var>. If an explicit
|
||||
value has been given for this segment (with a command-line <span class="samp">-T</span>
|
||||
option) that value will be returned; otherwise the value will be
|
||||
<var>default</var>. At present, the <span class="samp">-T</span> command-line option can only
|
||||
be used to set the base address for the “text”, “data”, and
|
||||
“bss” sections, but you use <code>SEGMENT_START</code> with any segment
|
||||
name.
|
||||
|
||||
<br><dt><code>SIZEOF(</code><var>section</var><code>)</code><dd><a name="index-SIZEOF_0028_0040var_007bsection_007d_0029-514"></a><a name="index-section-size-515"></a>Return the size in bytes of the named <var>section</var>, if that section has
|
||||
been allocated. If the section has not been allocated when this is
|
||||
evaluated, the linker will report an error. In the following example,
|
||||
<code>symbol_1</code> and <code>symbol_2</code> are assigned identical values:
|
||||
<pre class="smallexample"> SECTIONS{ ...
|
||||
.output {
|
||||
.start = . ;
|
||||
...
|
||||
.end = . ;
|
||||
}
|
||||
symbol_1 = .end - .start ;
|
||||
symbol_2 = SIZEOF(.output);
|
||||
... }
|
||||
</pre>
|
||||
<br><dt><code>SIZEOF_HEADERS</code><dt><code>sizeof_headers</code><dd><a name="index-SIZEOF_005fHEADERS-516"></a><a name="index-header-size-517"></a>Return the size in bytes of the output file's headers. This is
|
||||
information which appears at the start of the output file. You can use
|
||||
this number when setting the start address of the first section, if you
|
||||
choose, to facilitate paging.
|
||||
|
||||
<p><a name="index-not-enough-room-for-program-headers-518"></a><a name="index-program-headers_002c-not-enough-room-519"></a>When producing an ELF output file, if the linker script uses the
|
||||
<code>SIZEOF_HEADERS</code> builtin function, the linker must compute the
|
||||
number of program headers before it has determined all the section
|
||||
addresses and sizes. If the linker later discovers that it needs
|
||||
additional program headers, it will report an error <span class="samp">not enough
|
||||
room for program headers</span>. To avoid this error, you must avoid using
|
||||
the <code>SIZEOF_HEADERS</code> function, or you must rework your linker
|
||||
script to avoid forcing the linker to use additional program headers, or
|
||||
you must define the program headers yourself using the <code>PHDRS</code>
|
||||
command (see <a href="PHDRS.html#PHDRS">PHDRS</a>).
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Canonical format - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="BFD-outline.html#BFD-outline" title="BFD outline">
|
||||
<link rel="prev" href="BFD-information-loss.html#BFD-information-loss" title="BFD information loss">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Canonical-format"></a>Previous: <a rel="previous" accesskey="p" href="BFD-information-loss.html#BFD-information-loss">BFD information loss</a>,
|
||||
Up: <a rel="up" accesskey="u" href="BFD-outline.html#BFD-outline">BFD outline</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">5.1.2 The BFD canonical object-file format</h4>
|
||||
|
||||
<p>The greatest potential for loss of information occurs when there is the least
|
||||
overlap between the information provided by the source format, that
|
||||
stored by the canonical format, and that needed by the
|
||||
destination format. A brief description of the canonical form may help
|
||||
you understand which kinds of data you can count on preserving across
|
||||
conversions.
|
||||
<a name="index-BFD-canonical-format-636"></a><a name="index-internal-object_002dfile-format-637"></a>
|
||||
<dl>
|
||||
<dt><em>files</em><dd>Information stored on a per-file basis includes target machine
|
||||
architecture, particular implementation format type, a demand pageable
|
||||
bit, and a write protected bit. Information like Unix magic numbers is
|
||||
not stored here—only the magic numbers' meaning, so a <code>ZMAGIC</code>
|
||||
file would have both the demand pageable bit and the write protected
|
||||
text bit set. The byte order of the target is stored on a per-file
|
||||
basis, so that big- and little-endian object files may be used with one
|
||||
another.
|
||||
|
||||
<br><dt><em>sections</em><dd>Each section in the input file contains the name of the section, the
|
||||
section's original address in the object file, size and alignment
|
||||
information, various flags, and pointers into other BFD data
|
||||
structures.
|
||||
|
||||
<br><dt><em>symbols</em><dd>Each symbol contains a pointer to the information for the object file
|
||||
which originally defined it, its name, its value, and various flag
|
||||
bits. When a BFD back end reads in a symbol table, it relocates all
|
||||
symbols to make them relative to the base of the section where they were
|
||||
defined. Doing this ensures that each symbol points to its containing
|
||||
section. Each symbol also has a varying amount of hidden private data
|
||||
for the BFD back end. Since the symbol points to the original file, the
|
||||
private data format for that symbol is accessible. <code>ld</code> can
|
||||
operate on a collection of symbols of wildly different formats without
|
||||
problems.
|
||||
|
||||
<p>Normal global and simple local symbols are maintained on output, so an
|
||||
output file (no matter its format) will retain symbols pointing to
|
||||
functions and to global, static, and common variables. Some symbol
|
||||
information is not worth retaining; in <code>a.out</code>, type information is
|
||||
stored in the symbol table as long symbol names. This information would
|
||||
be useless to most COFF debuggers; the linker has command line switches
|
||||
to allow users to throw it away.
|
||||
|
||||
<p>There is one word of type information within the symbol, so if the
|
||||
format supports symbol type information within symbols (for example, COFF,
|
||||
IEEE, Oasys) and the type is simple enough to fit within one word
|
||||
(nearly everything but aggregates), the information will be preserved.
|
||||
|
||||
<br><dt><em>relocation level</em><dd>Each canonical BFD relocation record contains a pointer to the symbol to
|
||||
relocate to, the offset of the data to relocate, the section the data
|
||||
is in, and a pointer to a relocation type descriptor. Relocation is
|
||||
performed by passing messages through the relocation type
|
||||
descriptor and the symbol pointer. Therefore, relocations can be performed
|
||||
on output data using a relocation method that is only available in one of the
|
||||
input formats. For instance, Oasys provides a byte relocation format.
|
||||
A relocation record requesting this relocation type would point
|
||||
indirectly to a routine to perform this, so the relocation may be
|
||||
performed on a byte being written to a 68k COFF file, even though 68k COFF
|
||||
has no such relocation type.
|
||||
|
||||
<br><dt><em>line numbers</em><dd>Object formats can contain, for debugging purposes, some form of mapping
|
||||
between symbols, source line numbers, and addresses in the output file.
|
||||
These addresses have to be relocated along with the symbol information.
|
||||
Each symbol with an associated list of line number records points to the
|
||||
first record of the list. The head of a line number list consists of a
|
||||
pointer to the symbol, which allows finding out the address of the
|
||||
function whose line number is being described. The rest of the list is
|
||||
made up of pairs: offsets into the section and line numbers. Any format
|
||||
which can simply derive this information can pass it successfully
|
||||
between formats (COFF, IEEE and Oasys).
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Constants - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="next" href="Symbols.html#Symbols" title="Symbols">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Constants"></a>Next: <a rel="next" accesskey="n" href="Symbols.html#Symbols">Symbols</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.1 Constants</h4>
|
||||
|
||||
<p><a name="index-integer-notation-456"></a><a name="index-constants-in-linker-scripts-457"></a>All constants are integers.
|
||||
|
||||
<p>As in C, the linker considers an integer beginning with <span class="samp">0</span> to be
|
||||
octal, and an integer beginning with <span class="samp">0x</span> or <span class="samp">0X</span> to be
|
||||
hexadecimal. The linker considers other integers to be decimal.
|
||||
|
||||
<p><a name="index-scaled-integers-458"></a><a name="index-K-and-M-integer-suffixes-459"></a><a name="index-M-and-K-integer-suffixes-460"></a><a name="index-suffixes-for-integers-461"></a><a name="index-integer-suffixes-462"></a>In addition, you can use the suffixes <code>K</code> and <code>M</code> to scale a
|
||||
constant by
|
||||
<!-- TEXI2ROFF-KILL -->
|
||||
<!-- END TEXI2ROFF-KILL -->
|
||||
<code>1024</code> or <code>1024*1024</code>
|
||||
<!-- TEXI2ROFF-KILL -->
|
||||
<!-- END TEXI2ROFF-KILL -->
|
||||
respectively. For example, the following all refer to the same quantity:
|
||||
<pre class="smallexample"> _fourk_1 = 4K;
|
||||
_fourk_2 = 4096;
|
||||
_fourk_3 = 0x1000;
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Entry Point - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Simple-Commands.html#Simple-Commands" title="Simple Commands">
|
||||
<link rel="next" href="File-Commands.html#File-Commands" title="File Commands">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Entry-Point"></a>Next: <a rel="next" accesskey="n" href="File-Commands.html#File-Commands">File Commands</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.1 Setting the Entry Point</h4>
|
||||
|
||||
<p><a name="index-ENTRY_0028_0040var_007bsymbol_007d_0029-315"></a><a name="index-start-of-execution-316"></a><a name="index-first-instruction-317"></a><a name="index-entry-point-318"></a>The first instruction to execute in a program is called the <dfn>entry
|
||||
point</dfn>. You can use the <code>ENTRY</code> linker script command to set the
|
||||
entry point. The argument is a symbol name:
|
||||
<pre class="smallexample"> ENTRY(<var>symbol</var>)
|
||||
</pre>
|
||||
<p>There are several ways to set the entry point. The linker will set the
|
||||
entry point by trying each of the following methods in order, and
|
||||
stopping when one of them succeeds:
|
||||
<ul>
|
||||
<li>the <span class="samp">-e</span> <var>entry</var> command-line option;
|
||||
<li>the <code>ENTRY(</code><var>symbol</var><code>)</code> command in a linker script;
|
||||
<li>the value of the symbol <code>start</code>, if defined;
|
||||
<li>the address of the first byte of the <span class="samp">.text</span> section, if present;
|
||||
<li>The address <code>0</code>.
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Environment - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Invocation.html#Invocation" title="Invocation">
|
||||
<link rel="prev" href="Options.html#Options" title="Options">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="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">2.2 Environment Variables</h3>
|
||||
|
||||
<!-- man begin ENVIRONMENT -->
|
||||
<p>You can change the behaviour of <span class="command">ld</span> with the environment variables
|
||||
<code>GNUTARGET</code>,
|
||||
<code>LDEMULATION</code> and <code>COLLECT_NO_DEMANGLE</code>.
|
||||
|
||||
<p><a name="index-GNUTARGET-300"></a><a name="index-default-input-format-301"></a><code>GNUTARGET</code> determines the input-file object format if you don't
|
||||
use <span class="samp">-b</span> (or its synonym <span class="samp">--format</span>). 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, <span class="command">ld</span> 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><a name="index-LDEMULATION-302"></a><a name="index-default-emulation-303"></a><a name="index-emulation_002c-default-304"></a><code>LDEMULATION</code> determines the default emulation if you don't use the
|
||||
<span class="samp">-m</span> option. The emulation can affect various aspects of linker
|
||||
behaviour, particularly the default linker script. You can list the
|
||||
available emulations with the <span class="samp">--verbose</span> or <span class="samp">-V</span> options. If
|
||||
the <span class="samp">-m</span> 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><a name="index-COLLECT_005fNO_005fDEMANGLE-305"></a><a name="index-demangling_002c-default-306"></a>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 <span class="samp">--demangle</span> and <span class="samp">--no-demangle</span>
|
||||
options.
|
||||
|
||||
<!-- man end -->
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Evaluation - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Operators.html#Operators" title="Operators">
|
||||
<link rel="next" href="Expression-Section.html#Expression-Section" title="Expression Section">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Evaluation"></a>Next: <a rel="next" accesskey="n" href="Expression-Section.html#Expression-Section">Expression Section</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Operators.html#Operators">Operators</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.6 Evaluation</h4>
|
||||
|
||||
<p><a name="index-lazy-evaluation-478"></a><a name="index-expression-evaluation-order-479"></a>The linker evaluates expressions lazily. It only computes the value of
|
||||
an expression when absolutely necessary.
|
||||
|
||||
<p>The linker needs some information, such as the value of the start
|
||||
address of the first section, and the origins and lengths of memory
|
||||
regions, in order to do any linking at all. These values are computed
|
||||
as soon as possible when the linker reads in the linker script.
|
||||
|
||||
<p>However, other values (such as symbol values) are not known or needed
|
||||
until after storage allocation. Such values are evaluated later, when
|
||||
other information (such as the sizes of output sections) is available
|
||||
for use in the symbol assignment expression.
|
||||
|
||||
<p>The sizes of sections cannot be known until after allocation, so
|
||||
assignments dependent upon these are not performed until after
|
||||
allocation.
|
||||
|
||||
<p>Some expressions, such as those depending upon the location counter
|
||||
<span class="samp">.</span>, must be evaluated during section allocation.
|
||||
|
||||
<p>If the result of an expression is required, but the value is not
|
||||
available, then an error results. For example, a script like the
|
||||
following
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
.text 9+this_isnt_constant :
|
||||
{ *(.text) }
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent">will cause the error message <span class="samp">non constant expression for initial
|
||||
address</span>.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Expression Section - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Evaluation.html#Evaluation" title="Evaluation">
|
||||
<link rel="next" href="Builtin-Functions.html#Builtin-Functions" title="Builtin Functions">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Expression-Section"></a>Next: <a rel="next" accesskey="n" href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Evaluation.html#Evaluation">Evaluation</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.7 The Section of an Expression</h4>
|
||||
|
||||
<p><a name="index-expression-sections-480"></a><a name="index-absolute-expressions-481"></a><a name="index-relative-expressions-482"></a><a name="index-absolute-and-relocatable-symbols-483"></a><a name="index-relocatable-and-absolute-symbols-484"></a><a name="index-symbols_002c-relocatable-and-absolute-485"></a>When the linker evaluates an expression, the result is either absolute
|
||||
or relative to some section. A relative expression is expressed as a
|
||||
fixed offset from the base of a section.
|
||||
|
||||
<p>The position of the expression within the linker script determines
|
||||
whether it is absolute or relative. An expression which appears within
|
||||
an output section definition is relative to the base of the output
|
||||
section. An expression which appears elsewhere will be absolute.
|
||||
|
||||
<p>A symbol set to a relative expression will be relocatable if you request
|
||||
relocatable output using the <span class="samp">-r</span> option. That means that a
|
||||
further link operation may change the value of the symbol. The symbol's
|
||||
section will be the section of the relative expression.
|
||||
|
||||
<p>A symbol set to an absolute expression will retain the same value
|
||||
through any further link operation. The symbol will be absolute, and
|
||||
will not have any particular associated section.
|
||||
|
||||
<p>You can use the builtin function <code>ABSOLUTE</code> to force an expression
|
||||
to be absolute when it would otherwise be relative. For example, to
|
||||
create an absolute symbol set to the address of the end of the output
|
||||
section <span class="samp">.data</span>:
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
.data : { *(.data) _edata = ABSOLUTE(.); }
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent">If <span class="samp">ABSOLUTE</span> were not used, <span class="samp">_edata</span> would be relative to the
|
||||
<span class="samp">.data</span> section.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Expressions - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="VERSION.html#VERSION" title="VERSION">
|
||||
<link rel="next" href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts" title="Implicit Linker Scripts">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Expressions"></a>Next: <a rel="next" accesskey="n" href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts">Implicit Linker Scripts</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="VERSION.html#VERSION">VERSION</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.10 Expressions in Linker Scripts</h3>
|
||||
|
||||
<p><a name="index-expressions-454"></a><a name="index-arithmetic-455"></a>The syntax for expressions in the linker script language is identical to
|
||||
that of C expressions. All expressions are evaluated as integers. All
|
||||
expressions are evaluated in the same size, which is 32 bits if both the
|
||||
host and target are 32 bits, and is otherwise 64 bits.
|
||||
|
||||
<p>You can use and set symbol values in expressions.
|
||||
|
||||
<p>The linker defines several special purpose builtin functions for use in
|
||||
expressions.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Constants.html#Constants">Constants</a>: Constants
|
||||
<li><a accesskey="2" href="Symbols.html#Symbols">Symbols</a>: Symbol Names
|
||||
<li><a accesskey="3" href="Orphan-Sections.html#Orphan-Sections">Orphan Sections</a>: Orphan Sections
|
||||
<li><a accesskey="4" href="Location-Counter.html#Location-Counter">Location Counter</a>: The Location Counter
|
||||
<li><a accesskey="5" href="Operators.html#Operators">Operators</a>: Operators
|
||||
<li><a accesskey="6" href="Evaluation.html#Evaluation">Evaluation</a>: Evaluation
|
||||
<li><a accesskey="7" href="Expression-Section.html#Expression-Section">Expression Section</a>: The Section of an Expression
|
||||
<li><a accesskey="8" href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a>: Builtin Functions
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>File Commands - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Simple-Commands.html#Simple-Commands" title="Simple Commands">
|
||||
<link rel="prev" href="Entry-Point.html#Entry-Point" title="Entry Point">
|
||||
<link rel="next" href="Format-Commands.html#Format-Commands" title="Format Commands">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="File-Commands"></a>Next: <a rel="next" accesskey="n" href="Format-Commands.html#Format-Commands">Format Commands</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Entry-Point.html#Entry-Point">Entry Point</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.2 Commands Dealing with Files</h4>
|
||||
|
||||
<p><a name="index-linker-script-file-commands-319"></a>Several linker script commands deal with files.
|
||||
|
||||
<dl>
|
||||
<dt><code>INCLUDE </code><var>filename</var><dd><a name="index-INCLUDE-_0040var_007bfilename_007d-320"></a><a name="index-including-a-linker-script-321"></a>Include the linker script <var>filename</var> at this point. The file will
|
||||
be searched for in the current directory, and in any directory specified
|
||||
with the <span class="option">-L</span> option. You can nest calls to <code>INCLUDE</code> up to
|
||||
10 levels deep.
|
||||
|
||||
<p>You can place <code>INCLUDE</code> directives at the top level, in <code>MEMORY</code> or
|
||||
<code>SECTIONS</code> commands, or in output section descriptions.
|
||||
|
||||
<br><dt><code>INPUT(</code><var>file</var><code>, </code><var>file</var><code>, ...)</code><dt><code>INPUT(</code><var>file</var> <var>file</var><code> ...)</code><dd><a name="index-INPUT_0028_0040var_007bfiles_007d_0029-322"></a><a name="index-input-files-in-linker-scripts-323"></a><a name="index-input-object-files-in-linker-scripts-324"></a><a name="index-linker-script-input-object-files-325"></a>The <code>INPUT</code> command directs the linker to include the named files
|
||||
in the link, as though they were named on the command line.
|
||||
|
||||
<p>For example, if you always want to include <span class="file">subr.o</span> any time you do
|
||||
a link, but you can't be bothered to put it on every link command line,
|
||||
then you can put <span class="samp">INPUT (subr.o)</span> in your linker script.
|
||||
|
||||
<p>In fact, if you like, you can list all of your input files in the linker
|
||||
script, and then invoke the linker with nothing but a <span class="samp">-T</span> option.
|
||||
|
||||
<p>In case a <dfn>sysroot prefix</dfn> is configured, and the filename starts
|
||||
with the <span class="samp">/</span> character, and the script being processed was
|
||||
located inside the <dfn>sysroot prefix</dfn>, the filename will be looked
|
||||
for in the <dfn>sysroot prefix</dfn>. Otherwise, the linker will try to
|
||||
open the file in the current directory. If it is not found, the
|
||||
linker will search through the archive library search path. See the
|
||||
description of <span class="samp">-L</span> in <a href="Options.html#Options">Command Line Options</a>.
|
||||
|
||||
<p>If you use <span class="samp">INPUT (-l</span><var>file</var><span class="samp">)</span>, <span class="command">ld</span> will transform the
|
||||
name to <code>lib</code><var>file</var><code>.a</code>, as with the command line argument
|
||||
<span class="samp">-l</span>.
|
||||
|
||||
<p>When you use the <code>INPUT</code> command in an implicit linker script, the
|
||||
files will be included in the link at the point at which the linker
|
||||
script file is included. This can affect archive searching.
|
||||
|
||||
<br><dt><code>GROUP(</code><var>file</var><code>, </code><var>file</var><code>, ...)</code><dt><code>GROUP(</code><var>file</var> <var>file</var><code> ...)</code><dd><a name="index-GROUP_0028_0040var_007bfiles_007d_0029-326"></a><a name="index-grouping-input-files-327"></a>The <code>GROUP</code> command is like <code>INPUT</code>, except that the named
|
||||
files should all be archives, and they are searched repeatedly until no
|
||||
new undefined references are created. See the description of <span class="samp">-(</span>
|
||||
in <a href="Options.html#Options">Command Line Options</a>.
|
||||
|
||||
<br><dt><code>AS_NEEDED(</code><var>file</var><code>, </code><var>file</var><code>, ...)</code><dt><code>AS_NEEDED(</code><var>file</var> <var>file</var><code> ...)</code><dd><a name="index-AS_005fNEEDED_0028_0040var_007bfiles_007d_0029-328"></a>This construct can appear only inside of the <code>INPUT</code> or <code>GROUP</code>
|
||||
commands, among other filenames. The files listed will be handled
|
||||
as if they appear directly in the <code>INPUT</code> or <code>GROUP</code> commands,
|
||||
with the exception of ELF shared libraries, that will be added only
|
||||
when they are actually needed. This construct essentially enables
|
||||
<span class="option">--as-needed</span> option for all the files listed inside of it
|
||||
and restores previous <span class="option">--as-needed</span> resp. <span class="option">--no-as-needed</span>
|
||||
setting afterwards.
|
||||
|
||||
<br><dt><code>OUTPUT(</code><var>filename</var><code>)</code><dd><a name="index-OUTPUT_0028_0040var_007bfilename_007d_0029-329"></a><a name="index-output-file-name-in-linker-script-330"></a>The <code>OUTPUT</code> command names the output file. Using
|
||||
<code>OUTPUT(</code><var>filename</var><code>)</code> in the linker script is exactly like using
|
||||
<span class="samp">-o </span><var>filename</var> on the command line (see <a href="Options.html#Options">Command Line Options</a>). If both are used, the command line option takes
|
||||
precedence.
|
||||
|
||||
<p>You can use the <code>OUTPUT</code> command to define a default name for the
|
||||
output file other than the usual default of <span class="file">a.out</span>.
|
||||
|
||||
<br><dt><code>SEARCH_DIR(</code><var>path</var><code>)</code><dd><a name="index-SEARCH_005fDIR_0028_0040var_007bpath_007d_0029-331"></a><a name="index-library-search-path-in-linker-script-332"></a><a name="index-archive-search-path-in-linker-script-333"></a><a name="index-search-path-in-linker-script-334"></a>The <code>SEARCH_DIR</code> command adds <var>path</var> to the list of paths where
|
||||
<span class="command">ld</span> looks for archive libraries. Using
|
||||
<code>SEARCH_DIR(</code><var>path</var><code>)</code> is exactly like using <span class="samp">-L </span><var>path</var>
|
||||
on the command line (see <a href="Options.html#Options">Command Line Options</a>). If both
|
||||
are used, then the linker will search both paths. Paths specified using
|
||||
the command line option are searched first.
|
||||
|
||||
<br><dt><code>STARTUP(</code><var>filename</var><code>)</code><dd><a name="index-STARTUP_0028_0040var_007bfilename_007d_0029-335"></a><a name="index-first-input-file-336"></a>The <code>STARTUP</code> command is just like the <code>INPUT</code> command, except
|
||||
that <var>filename</var> will become the first input file to be linked, as
|
||||
though it were specified first on the command line. This may be useful
|
||||
when using a system in which the entry point is always the start of the
|
||||
first file.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Forced Input Alignment - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link rel="prev" href="Forced-Output-Alignment.html#Forced-Output-Alignment" title="Forced Output Alignment">
|
||||
<link rel="next" href="Output-Section-Region.html#Output-Section-Region" title="Output Section Region">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Forced-Input-Alignment"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Forced-Output-Alignment.html#Forced-Output-Alignment">Forced Output Alignment</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.4 Forced Input Alignment</h5>
|
||||
|
||||
<p><a name="index-SUBALIGN_0028_0040var_007bsubsection_005falign_007d_0029-417"></a><a name="index-forcing-input-section-alignment-418"></a><a name="index-input-section-alignment-419"></a>You can force input section alignment within an output section by using
|
||||
SUBALIGN. The value specified overrides any alignment given by input
|
||||
sections, whether larger or smaller.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Forced Output Alignment - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link rel="prev" href="Output-Section-LMA.html#Output-Section-LMA" title="Output Section LMA">
|
||||
<link rel="next" href="Forced-Input-Alignment.html#Forced-Input-Alignment" title="Forced Input Alignment">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Forced-Output-Alignment"></a>Next: <a rel="next" accesskey="n" href="Forced-Input-Alignment.html#Forced-Input-Alignment">Forced Input Alignment</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.3 Forced Output Alignment</h5>
|
||||
|
||||
<p><a name="index-ALIGN_0028_0040var_007bsection_005falign_007d_0029-414"></a><a name="index-forcing-output-section-alignment-415"></a><a name="index-output-section-alignment-416"></a>You can increase an output section's alignment by using ALIGN.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Format Commands - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Simple-Commands.html#Simple-Commands" title="Simple Commands">
|
||||
<link rel="prev" href="File-Commands.html#File-Commands" title="File Commands">
|
||||
<link rel="next" href="Miscellaneous-Commands.html#Miscellaneous-Commands" title="Miscellaneous Commands">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Format-Commands"></a>Next: <a rel="next" accesskey="n" href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="File-Commands.html#File-Commands">File Commands</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.3 Commands Dealing with Object File Formats</h4>
|
||||
|
||||
<p>A couple of linker script commands deal with object file formats.
|
||||
|
||||
<dl>
|
||||
<dt><code>OUTPUT_FORMAT(</code><var>bfdname</var><code>)</code><dt><code>OUTPUT_FORMAT(</code><var>default</var><code>, </code><var>big</var><code>, </code><var>little</var><code>)</code><dd><a name="index-OUTPUT_005fFORMAT_0028_0040var_007bbfdname_007d_0029-337"></a><a name="index-output-file-format-in-linker-script-338"></a>The <code>OUTPUT_FORMAT</code> command names the BFD format to use for the
|
||||
output file (see <a href="BFD.html#BFD">BFD</a>). Using <code>OUTPUT_FORMAT(</code><var>bfdname</var><code>)</code> is
|
||||
exactly like using <span class="samp">--oformat </span><var>bfdname</var> on the command line
|
||||
(see <a href="Options.html#Options">Command Line Options</a>). If both are used, the command
|
||||
line option takes precedence.
|
||||
|
||||
<p>You can use <code>OUTPUT_FORMAT</code> with three arguments to use different
|
||||
formats based on the <span class="samp">-EB</span> and <span class="samp">-EL</span> command line options.
|
||||
This permits the linker script to set the output format based on the
|
||||
desired endianness.
|
||||
|
||||
<p>If neither <span class="samp">-EB</span> nor <span class="samp">-EL</span> are used, then the output format
|
||||
will be the first argument, <var>default</var>. If <span class="samp">-EB</span> is used, the
|
||||
output format will be the second argument, <var>big</var>. If <span class="samp">-EL</span> is
|
||||
used, the output format will be the third argument, <var>little</var>.
|
||||
|
||||
<p>For example, the default linker script for the MIPS ELF target uses this
|
||||
command:
|
||||
<pre class="smallexample"> OUTPUT_FORMAT(elf32-bigmips, elf32-bigmips, elf32-littlemips)
|
||||
</pre>
|
||||
<p>This says that the default format for the output file is
|
||||
<span class="samp">elf32-bigmips</span>, but if the user uses the <span class="samp">-EL</span> command line
|
||||
option, the output file will be created in the <span class="samp">elf32-littlemips</span>
|
||||
format.
|
||||
|
||||
<br><dt><code>TARGET(</code><var>bfdname</var><code>)</code><dd><a name="index-TARGET_0028_0040var_007bbfdname_007d_0029-339"></a><a name="index-input-file-format-in-linker-script-340"></a>The <code>TARGET</code> command names the BFD format to use when reading input
|
||||
files. It affects subsequent <code>INPUT</code> and <code>GROUP</code> commands.
|
||||
This command is like using <span class="samp">-b </span><var>bfdname</var> on the command line
|
||||
(see <a href="Options.html#Options">Command Line Options</a>). If the <code>TARGET</code> command
|
||||
is used but <code>OUTPUT_FORMAT</code> is not, then the last <code>TARGET</code>
|
||||
command is also used to set the format for the output file. See <a href="BFD.html#BFD">BFD</a>.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,422 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>GNU Free Documentation License - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="MRI.html#MRI" title="MRI">
|
||||
<link rel="next" href="LD-Index.html#LD-Index" title="LD Index">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="GNU-Free-Documentation-License"></a>Next: <a rel="next" accesskey="n" href="LD-Index.html#LD-Index">LD Index</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="MRI.html#MRI">MRI</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="appendix">Appendix B GNU Free Documentation License</h2>
|
||||
|
||||
<div align="center">Version 1.1, March 2000</div>
|
||||
|
||||
<pre class="display"> Copyright (C) 2000, 2003 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
</pre>
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<ol type=1 start=0>
|
||||
<li>PREAMBLE
|
||||
|
||||
<p>The purpose of this License is to make a manual, textbook, or other
|
||||
written document “free” in the sense of freedom: to assure everyone
|
||||
the effective freedom to copy and redistribute it, with or without
|
||||
modifying it, either commercially or noncommercially. Secondarily,
|
||||
this License preserves for the author and publisher a way to get
|
||||
credit for their work, while not being considered responsible for
|
||||
modifications made by others.
|
||||
|
||||
<p>This License is a kind of “copyleft”, which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
<p>We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>APPLICABILITY AND DEFINITIONS
|
||||
|
||||
<p>This License applies to any manual or other work that contains a
|
||||
notice placed by the copyright holder saying it can be distributed
|
||||
under the terms of this License. The “Document”, below, refers to any
|
||||
such manual or work. Any member of the public is a licensee, and is
|
||||
addressed as “you.”
|
||||
|
||||
<p>A “Modified Version” of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
<p>A “Secondary Section” is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (For example, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
<p>The “Invariant Sections” are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License.
|
||||
|
||||
<p>The “Cover Texts” are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License.
|
||||
|
||||
<p>A “Transparent” copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, whose contents can be viewed and edited directly and
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup has been designed to thwart or discourage
|
||||
subsequent modification by readers is not Transparent. A copy that is
|
||||
not “Transparent” is called “Opaque.”
|
||||
|
||||
<p>Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML designed for human modification. Opaque formats include
|
||||
PostScript, PDF, proprietary formats that can be read and edited only
|
||||
by proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML produced by some word processors for output
|
||||
purposes only.
|
||||
|
||||
<p>The “Title Page” means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, “Title Page” means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>VERBATIM COPYING
|
||||
|
||||
<p>You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
<p>You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>COPYING IN QUANTITY
|
||||
|
||||
<p>If you publish printed copies of the Document numbering more than 100,
|
||||
and the Document's license notice requires Cover Texts, you must enclose
|
||||
the copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
<p>If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
<p>If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a publicly-accessible computer-network location containing a complete
|
||||
Transparent copy of the Document, free of added material, which the
|
||||
general network-using public has access to download anonymously at no
|
||||
charge using public-standard network protocols. If you use the latter
|
||||
option, you must take reasonably prudent steps, when you begin
|
||||
distribution of Opaque copies in quantity, to ensure that this
|
||||
Transparent copy will remain thus accessible at the stated location
|
||||
until at least one year after the last time you distribute an Opaque
|
||||
copy (directly or through your agents or retailers) of that edition to
|
||||
the public.
|
||||
|
||||
<p>It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>MODIFICATIONS
|
||||
|
||||
<p>You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
<p>A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.<br>
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has less than five).<br>
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.<br>
|
||||
D. Preserve all the copyright notices of the Document.<br>
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.<br>
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.<br>
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.<br>
|
||||
H. Include an unaltered copy of this License.<br>
|
||||
I. Preserve the section entitled “History”, and its title, and add to
|
||||
it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section entitled “History” in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.<br>
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the “History” section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.<br>
|
||||
K. In any section entitled “Acknowledgements” or “Dedications”,
|
||||
preserve the section's title, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.<br>
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.<br>
|
||||
M. Delete any section entitled “Endorsements.” Such a section
|
||||
may not be included in the Modified Version.<br>
|
||||
N. Do not retitle any existing section as “Endorsements”
|
||||
or to conflict in title with any Invariant Section.<br>
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
<p>You may add a section entitled “Endorsements”, provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties–for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
<p>You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
<p>The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>COMBINING DOCUMENTS
|
||||
|
||||
<p>You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice.
|
||||
|
||||
<p>The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
<p>In the combination, you must combine any sections entitled “History”
|
||||
in the various original documents, forming one section entitled
|
||||
“History”; likewise combine any sections entitled “Acknowledgements”,
|
||||
and any sections entitled “Dedications.” You must delete all sections
|
||||
entitled “Endorsements.”
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>COLLECTIONS OF DOCUMENTS
|
||||
|
||||
<p>You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
<p>You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
<p>A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, does not as a whole count as a Modified Version
|
||||
of the Document, provided no compilation copyright is claimed for the
|
||||
compilation. Such a compilation is called an “aggregate”, and this
|
||||
License does not apply to the other self-contained works thus compiled
|
||||
with the Document, on account of their being thus compiled, if they
|
||||
are not themselves derivative works of the Document.
|
||||
|
||||
<p>If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one quarter
|
||||
of the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that surround only the Document within the aggregate.
|
||||
Otherwise they must appear on covers around the whole aggregate.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>TRANSLATION
|
||||
|
||||
<p>Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License provided that you also include the
|
||||
original English version of this License. In case of a disagreement
|
||||
between the translation and the original English version of this
|
||||
License, the original English version will prevail.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>TERMINATION
|
||||
|
||||
<p>You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
<pre class="sp">
|
||||
|
||||
</pre>
|
||||
<li>FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
<p>The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
http://www.gnu.org/copyleft/.
|
||||
|
||||
<p>Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License “or any later version” applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
</ol>
|
||||
|
||||
<h3 class="unnumberedsec">ADDENDUM: How to use this License for your documents</h3>
|
||||
|
||||
<p>To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with the Invariant Sections being <var>list their titles</var>, with the
|
||||
Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts being <var>list</var>.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License."
|
||||
</pre>
|
||||
<p>If you have no Invariant Sections, write “with no Invariant Sections”
|
||||
instead of saying which ones are invariant. If you have no
|
||||
Front-Cover Texts, write “no Front-Cover Texts” instead of
|
||||
“Front-Cover Texts being <var>list</var>”; likewise for Back-Cover Texts.
|
||||
|
||||
<p>If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>H8/300 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="next" href="i960.html#i960" title="i960">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="H8_002f300"></a>Next: <a rel="next" accesskey="n" href="i960.html#i960">i960</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.1 <span class="command">ld</span> and the H8/300</h3>
|
||||
|
||||
<p><a name="index-H8_002f300-support-522"></a>For the H8/300, <span class="command">ld</span> can perform these global optimizations when
|
||||
you specify the <span class="samp">--relax</span> command-line option.
|
||||
|
||||
|
||||
<a name="index-relaxing-on-H8_002f300-523"></a>
|
||||
<dl><dt><em>relaxing address modes</em><dd><span class="command">ld</span> finds all <code>jsr</code> and <code>jmp</code> instructions whose
|
||||
targets are within eight bits, and turns them into eight-bit
|
||||
program-counter relative <code>bsr</code> and <code>bra</code> instructions,
|
||||
respectively.
|
||||
|
||||
<p><a name="index-synthesizing-on-H8_002f300-524"></a><br><dt><em>synthesizing instructions</em><dd><!-- FIXME: specifically mov.b, or any mov instructions really? -->
|
||||
<span class="command">ld</span> finds all <code>mov.b</code> instructions which use the
|
||||
sixteen-bit absolute address form, but refer to the top
|
||||
page of memory, and changes them to use the eight-bit address form.
|
||||
(That is: the linker turns <span class="samp">mov.b </span><code>@</code><var>aa</var><span class="samp">:16</span> into
|
||||
<span class="samp">mov.b </span><code>@</code><var>aa</var><span class="samp">:8</span> whenever the address <var>aa</var> is in the
|
||||
top page of memory).
|
||||
|
||||
<br><dt><em>bit manipulation instructions</em><dd><span class="command">ld</span> finds all bit manipulation instructions like <code>band, bclr,
|
||||
biand, bild, bior, bist, bixor, bld, bnot, bor, bset, bst, btst, bxor</code>
|
||||
which use 32 bit and 16 bit absolute address form, but refer to the top
|
||||
page of memory, and changes them to use the 8 bit address form.
|
||||
(That is: the linker turns <span class="samp">bset #xx:3,</span><code>@</code><var>aa</var><span class="samp">:32</span> into
|
||||
<span class="samp">bset #xx:3,</span><code>@</code><var>aa</var><span class="samp">:8</span> whenever the address <var>aa</var> is in
|
||||
the top page of memory).
|
||||
|
||||
<br><dt><em>system control instructions</em><dd><span class="command">ld</span> finds all <code>ldc.w, stc.w</code> instructions which use the
|
||||
32 bit absolute address form, but refer to the top page of memory, and
|
||||
changes them to use 16 bit address form.
|
||||
(That is: the linker turns <span class="samp">ldc.w </span><code>@</code><var>aa</var><span class="samp">:32,ccr</span> into
|
||||
<span class="samp">ldc.w </span><code>@</code><var>aa</var><span class="samp">:16,ccr</span> whenever the address <var>aa</var> is in
|
||||
the top page of memory).
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>HPPA ELF32 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="ARM.html#ARM" title="ARM">
|
||||
<link rel="next" href="M68K.html#M68K" title="M68K">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="HPPA-ELF32"></a>Next: <a rel="next" accesskey="n" href="M68K.html#M68K">M68K</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="ARM.html#ARM">ARM</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.5 <span class="command">ld</span> and HPPA 32-bit ELF Support</h3>
|
||||
|
||||
<p><a name="index-HPPA-multiple-sub_002dspace-stubs-560"></a><a name="index-_002d_002dmulti_002dsubspace-561"></a>When generating a shared library, <span class="command">ld</span> will by default generate
|
||||
import stubs suitable for use with a single sub-space application.
|
||||
The <span class="samp">--multi-subspace</span> switch causes <span class="command">ld</span> to generate export
|
||||
stubs, and different (larger) import stubs suitable for use with
|
||||
multiple sub-spaces.
|
||||
|
||||
<p><a name="index-HPPA-stub-grouping-562"></a><a name="index-_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-563"></a>Long branch stubs and import/export stubs are placed by <span class="command">ld</span> in
|
||||
stub sections located between groups of input sections.
|
||||
<span class="samp">--stub-group-size</span> specifies the maximum size of a group of input
|
||||
sections handled by one stub section. Since branch offsets are signed,
|
||||
a stub section may serve two groups of input sections, one group before
|
||||
the stub section, and one group after it. However, when using
|
||||
conditional branches that require stubs, it may be better (for branch
|
||||
prediction) that stub sections only serve one group of input sections.
|
||||
A negative value for <span class="samp">N</span> chooses this scheme, ensuring that
|
||||
branches to stubs always use a negative offset. Two special values of
|
||||
<span class="samp">N</span> are recognized, <span class="samp">1</span> and <span class="samp">-1</span>. These both instruct
|
||||
<span class="command">ld</span> to automatically size input section groups for the branch types
|
||||
detected, with the same behaviour regarding stub placement as other
|
||||
positive or negative values of <span class="samp">N</span> respectively.
|
||||
|
||||
<p>Note that <span class="samp">--stub-group-size</span> does not split input sections. A
|
||||
single input section larger than the group size specified will of course
|
||||
create a larger group (of one section). If input sections are too
|
||||
large, it may not be possible for a branch to reach its stub.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Implicit Linker Scripts - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Implicit-Linker-Scripts"></a>Previous: <a rel="previous" accesskey="p" href="Expressions.html#Expressions">Expressions</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.11 Implicit Linker Scripts</h3>
|
||||
|
||||
<p><a name="index-implicit-linker-scripts-520"></a>If you specify a linker input file which the linker can not recognize as
|
||||
an object file or an archive file, it will try to read the file as a
|
||||
linker script. If the file can not be parsed as a linker script, the
|
||||
linker will report an error.
|
||||
|
||||
<p>An implicit linker script will not replace the default linker script.
|
||||
|
||||
<p>Typically an implicit linker script would contain only symbol
|
||||
assignments, or the <code>INPUT</code>, <code>GROUP</code>, or <code>VERSION</code>
|
||||
commands.
|
||||
|
||||
<p>Any input files read because of an implicit linker script will be read
|
||||
at the position in the command line where the implicit linker script was
|
||||
read. This can affect archive searching.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Input Section Basics - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Input-Section.html#Input-Section" title="Input Section">
|
||||
<link rel="next" href="Input-Section-Wildcards.html#Input-Section-Wildcards" title="Input Section Wildcards">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Input-Section-Basics"></a>Next: <a rel="next" accesskey="n" href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Input-Section.html#Input-Section">Input Section</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.1 Input Section Basics</h5>
|
||||
|
||||
<p><a name="index-input-section-basics-368"></a>An input section description consists of a file name optionally followed
|
||||
by a list of section names in parentheses.
|
||||
|
||||
<p>The file name and the section name may be wildcard patterns, which we
|
||||
describe further below (see <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a>).
|
||||
|
||||
<p>The most common input section description is to include all input
|
||||
sections with a particular name in the output section. For example, to
|
||||
include all input <span class="samp">.text</span> sections, you would write:
|
||||
<pre class="smallexample"> *(.text)
|
||||
</pre>
|
||||
<p class="noindent">Here the <span class="samp">*</span> is a wildcard which matches any file name. To exclude a list
|
||||
of files from matching the file name wildcard, EXCLUDE_FILE may be used to
|
||||
match all files except the ones specified in the EXCLUDE_FILE list. For
|
||||
example:
|
||||
<pre class="smallexample"> *(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors)
|
||||
</pre>
|
||||
<p>will cause all .ctors sections from all files except <span class="file">crtend.o</span> and
|
||||
<span class="file">otherfile.o</span> to be included.
|
||||
|
||||
<p>There are two ways to include more than one section:
|
||||
<pre class="smallexample"> *(.text .rdata)
|
||||
*(.text) *(.rdata)
|
||||
</pre>
|
||||
<p class="noindent">The difference between these is the order in which the <span class="samp">.text</span> and
|
||||
<span class="samp">.rdata</span> input sections will appear in the output section. In the
|
||||
first example, they will be intermingled, appearing in the same order as
|
||||
they are found in the linker input. In the second example, all
|
||||
<span class="samp">.text</span> input sections will appear first, followed by all
|
||||
<span class="samp">.rdata</span> input sections.
|
||||
|
||||
<p>You can specify a file name to include sections from a particular file.
|
||||
You would do this if one or more of your files contain special data that
|
||||
needs to be at a particular location in memory. For example:
|
||||
<pre class="smallexample"> data.o(.data)
|
||||
</pre>
|
||||
<p>You can also specify files within archives by writing a pattern
|
||||
matching the archive, a colon, then the pattern matching the file,
|
||||
with no whitespace around the colon.
|
||||
|
||||
<dl>
|
||||
<dt><span class="samp">archive:file</span><dd>matches file within archive
|
||||
<br><dt><span class="samp">archive:</span><dd>matches the whole archive
|
||||
<br><dt><span class="samp">:file</span><dd>matches file but not one in an archive
|
||||
</dl>
|
||||
|
||||
<p>Either one or both of <span class="samp">archive</span> and <span class="samp">file</span> can contain shell
|
||||
wildcards. On DOS based file systems, the linker will assume that a
|
||||
single letter followed by a colon is a drive specifier, so
|
||||
<span class="samp">c:myfile.o</span> is a simple file specification, not <span class="samp">myfile.o</span>
|
||||
within an archive called <span class="samp">c</span>. <span class="samp">archive:file</span> filespecs may
|
||||
also be used within an <code>EXCLUDE_FILE</code> list, but may not appear in
|
||||
other linker script contexts. For instance, you cannot extract a file
|
||||
from an archive by using <span class="samp">archive:file</span> in an <code>INPUT</code>
|
||||
command.
|
||||
|
||||
<p>If you use a file name without a list of sections, then all sections in
|
||||
the input file will be included in the output section. This is not
|
||||
commonly done, but it may by useful on occasion. For example:
|
||||
<pre class="smallexample"> data.o
|
||||
</pre>
|
||||
<p>When you use a file name which is not an <span class="samp">archive:file</span> specifier
|
||||
and does not contain any wild card
|
||||
characters, the linker will first see if you also specified the file
|
||||
name on the linker command line or in an <code>INPUT</code> command. If you
|
||||
did not, the linker will attempt to open the file as an input file, as
|
||||
though it appeared on the command line. Note that this differs from an
|
||||
<code>INPUT</code> command, because the linker will not search for the file in
|
||||
the archive search path.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Input Section Common - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Input-Section.html#Input-Section" title="Input Section">
|
||||
<link rel="prev" href="Input-Section-Wildcards.html#Input-Section-Wildcards" title="Input Section Wildcards">
|
||||
<link rel="next" href="Input-Section-Keep.html#Input-Section-Keep" title="Input Section Keep">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Input-Section-Common"></a>Next: <a rel="next" accesskey="n" href="Input-Section-Keep.html#Input-Section-Keep">Input Section Keep</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Input-Section.html#Input-Section">Input Section</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.3 Input Section for Common Symbols</h5>
|
||||
|
||||
<p><a name="index-common-symbol-placement-376"></a><a name="index-uninitialized-data-placement-377"></a>A special notation is needed for common symbols, because in many object
|
||||
file formats common symbols do not have a particular input section. The
|
||||
linker treats common symbols as though they are in an input section
|
||||
named <span class="samp">COMMON</span>.
|
||||
|
||||
<p>You may use file names with the <span class="samp">COMMON</span> section just as with any
|
||||
other input sections. You can use this to place common symbols from a
|
||||
particular input file in one section while common symbols from other
|
||||
input files are placed in another section.
|
||||
|
||||
<p>In most cases, common symbols in input files will be placed in the
|
||||
<span class="samp">.bss</span> section in the output file. For example:
|
||||
<pre class="smallexample"> .bss { *(.bss) *(COMMON) }
|
||||
</pre>
|
||||
<p><a name="index-scommon-section-378"></a><a name="index-small-common-symbols-379"></a>Some object file formats have more than one type of common symbol. For
|
||||
example, the MIPS ELF object file format distinguishes standard common
|
||||
symbols and small common symbols. In this case, the linker will use a
|
||||
different special section name for other types of common symbols. In
|
||||
the case of MIPS ELF, the linker uses <span class="samp">COMMON</span> for standard common
|
||||
symbols and <span class="samp">.scommon</span> for small common symbols. This permits you
|
||||
to map the different types of common symbols into memory at different
|
||||
locations.
|
||||
|
||||
<p><a name="index-_005bCOMMON_005d-380"></a>You will sometimes see <span class="samp">[COMMON]</span> in old linker scripts. This
|
||||
notation is now considered obsolete. It is equivalent to
|
||||
<span class="samp">*(COMMON)</span>.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Input Section Example - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Input-Section.html#Input-Section" title="Input Section">
|
||||
<link rel="prev" href="Input-Section-Keep.html#Input-Section-Keep" title="Input Section Keep">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Input-Section-Example"></a>Previous: <a rel="previous" accesskey="p" href="Input-Section-Keep.html#Input-Section-Keep">Input Section Keep</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Input-Section.html#Input-Section">Input Section</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.5 Input Section Example</h5>
|
||||
|
||||
<p>The following example is a complete linker script. It tells the linker
|
||||
to read all of the sections from file <span class="file">all.o</span> and place them at the
|
||||
start of output section <span class="samp">outputa</span> which starts at location
|
||||
<span class="samp">0x10000</span>. All of section <span class="samp">.input1</span> from file <span class="file">foo.o</span>
|
||||
follows immediately, in the same output section. All of section
|
||||
<span class="samp">.input2</span> from <span class="file">foo.o</span> goes into output section
|
||||
<span class="samp">outputb</span>, followed by section <span class="samp">.input1</span> from <span class="file">foo1.o</span>.
|
||||
All of the remaining <span class="samp">.input1</span> and <span class="samp">.input2</span> sections from any
|
||||
files are written to output section <span class="samp">outputc</span>.
|
||||
|
||||
<pre class="smallexample"> SECTIONS {
|
||||
outputa 0x10000 :
|
||||
{
|
||||
all.o
|
||||
foo.o (.input1)
|
||||
}
|
||||
outputb :
|
||||
{
|
||||
foo.o (.input2)
|
||||
foo1.o (.input1)
|
||||
}
|
||||
outputc :
|
||||
{
|
||||
*(.input1)
|
||||
*(.input2)
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Input Section Keep - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Input-Section.html#Input-Section" title="Input Section">
|
||||
<link rel="prev" href="Input-Section-Common.html#Input-Section-Common" title="Input Section Common">
|
||||
<link rel="next" href="Input-Section-Example.html#Input-Section-Example" title="Input Section Example">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Input-Section-Keep"></a>Next: <a rel="next" accesskey="n" href="Input-Section-Example.html#Input-Section-Example">Input Section Example</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Input-Section.html#Input-Section">Input Section</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.4 Input Section and Garbage Collection</h5>
|
||||
|
||||
<p><a name="index-KEEP-381"></a><a name="index-garbage-collection-382"></a>When link-time garbage collection is in use (<span class="samp">--gc-sections</span>),
|
||||
it is often useful to mark sections that should not be eliminated.
|
||||
This is accomplished by surrounding an input section's wildcard entry
|
||||
with <code>KEEP()</code>, as in <code>KEEP(*(.init))</code> or
|
||||
<code>KEEP(SORT_BY_NAME(*)(.ctors))</code>.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Input Section Wildcards - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Input-Section.html#Input-Section" title="Input Section">
|
||||
<link rel="prev" href="Input-Section-Basics.html#Input-Section-Basics" title="Input Section Basics">
|
||||
<link rel="next" href="Input-Section-Common.html#Input-Section-Common" title="Input Section Common">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Input-Section-Wildcards"></a>Next: <a rel="next" accesskey="n" href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Input-Section-Basics.html#Input-Section-Basics">Input Section Basics</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Input-Section.html#Input-Section">Input Section</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.2 Input Section Wildcard Patterns</h5>
|
||||
|
||||
<p><a name="index-input-section-wildcards-369"></a><a name="index-wildcard-file-name-patterns-370"></a><a name="index-file-name-wildcard-patterns-371"></a><a name="index-section-name-wildcard-patterns-372"></a>In an input section description, either the file name or the section
|
||||
name or both may be wildcard patterns.
|
||||
|
||||
<p>The file name of <span class="samp">*</span> seen in many examples is a simple wildcard
|
||||
pattern for the file name.
|
||||
|
||||
<p>The wildcard patterns are like those used by the Unix shell.
|
||||
|
||||
<dl>
|
||||
<dt><span class="samp">*</span><dd>matches any number of characters
|
||||
<br><dt><span class="samp">?</span><dd>matches any single character
|
||||
<br><dt><span class="samp">[</span><var>chars</var><span class="samp">]</span><dd>matches a single instance of any of the <var>chars</var>; the <span class="samp">-</span>
|
||||
character may be used to specify a range of characters, as in
|
||||
<span class="samp">[a-z]</span> to match any lower case letter
|
||||
<br><dt><span class="samp">\</span><dd>quotes the following character
|
||||
</dl>
|
||||
|
||||
<p>When a file name is matched with a wildcard, the wildcard characters
|
||||
will not match a <span class="samp">/</span> character (used to separate directory names on
|
||||
Unix). A pattern consisting of a single <span class="samp">*</span> character is an
|
||||
exception; it will always match any file name, whether it contains a
|
||||
<span class="samp">/</span> or not. In a section name, the wildcard characters will match
|
||||
a <span class="samp">/</span> character.
|
||||
|
||||
<p>File name wildcard patterns only match files which are explicitly
|
||||
specified on the command line or in an <code>INPUT</code> command. The linker
|
||||
does not search directories to expand wildcards.
|
||||
|
||||
<p>If a file name matches more than one wildcard pattern, or if a file name
|
||||
appears explicitly and is also matched by a wildcard pattern, the linker
|
||||
will use the first match in the linker script. For example, this
|
||||
sequence of input section descriptions is probably in error, because the
|
||||
<span class="file">data.o</span> rule will not be used:
|
||||
<pre class="smallexample"> .data : { *(.data) }
|
||||
.data1 : { data.o(.data) }
|
||||
</pre>
|
||||
<p><a name="index-SORT_005fBY_005fNAME-373"></a>Normally, the linker will place files and sections matched by wildcards
|
||||
in the order in which they are seen during the link. You can change
|
||||
this by using the <code>SORT_BY_NAME</code> keyword, which appears before a wildcard
|
||||
pattern in parentheses (e.g., <code>SORT_BY_NAME(.text*)</code>). When the
|
||||
<code>SORT_BY_NAME</code> keyword is used, the linker will sort the files or sections
|
||||
into ascending order by name before placing them in the output file.
|
||||
|
||||
<p><a name="index-SORT_005fBY_005fALIGNMENT-374"></a><code>SORT_BY_ALIGNMENT</code> is very similar to <code>SORT_BY_NAME</code>. The
|
||||
difference is <code>SORT_BY_ALIGNMENT</code> will sort sections into
|
||||
ascending order by alignment before placing them in the output file.
|
||||
|
||||
<p><a name="index-SORT-375"></a><code>SORT</code> is an alias for <code>SORT_BY_NAME</code>.
|
||||
|
||||
<p>When there are nested section sorting commands in linker script, there
|
||||
can be at most 1 level of nesting for section sorting commands.
|
||||
|
||||
<ol type=1 start=1>
|
||||
<li><code>SORT_BY_NAME</code> (<code>SORT_BY_ALIGNMENT</code> (wildcard section pattern)).
|
||||
It will sort the input sections by name first, then by alignment if 2
|
||||
sections have the same name.
|
||||
<li><code>SORT_BY_ALIGNMENT</code> (<code>SORT_BY_NAME</code> (wildcard section pattern)).
|
||||
It will sort the input sections by alignment first, then by name if 2
|
||||
sections have the same alignment.
|
||||
<li><code>SORT_BY_NAME</code> (<code>SORT_BY_NAME</code> (wildcard section pattern)) is
|
||||
treated the same as <code>SORT_BY_NAME</code> (wildcard section pattern).
|
||||
<li><code>SORT_BY_ALIGNMENT</code> (<code>SORT_BY_ALIGNMENT</code> (wildcard section pattern))
|
||||
is treated the same as <code>SORT_BY_ALIGNMENT</code> (wildcard section pattern).
|
||||
<li>All other nested section sorting commands are invalid.
|
||||
</ol>
|
||||
|
||||
<p>When both command line section sorting option and linker script
|
||||
section sorting command are used, section sorting command always
|
||||
takes precedence over the command line option.
|
||||
|
||||
<p>If the section sorting command in linker script isn't nested, the
|
||||
command line option will make the section sorting command to be
|
||||
treated as nested sorting command.
|
||||
|
||||
<ol type=1 start=1>
|
||||
<li><code>SORT_BY_NAME</code> (wildcard section pattern ) with
|
||||
<span class="option">--sort-sections alignment</span> is equivalent to
|
||||
<code>SORT_BY_NAME</code> (<code>SORT_BY_ALIGNMENT</code> (wildcard section pattern)).
|
||||
<li><code>SORT_BY_ALIGNMENT</code> (wildcard section pattern) with
|
||||
<span class="option">--sort-section name</span> is equivalent to
|
||||
<code>SORT_BY_ALIGNMENT</code> (<code>SORT_BY_NAME</code> (wildcard section pattern)).
|
||||
</ol>
|
||||
|
||||
<p>If the section sorting command in linker script is nested, the
|
||||
command line option will be ignored.
|
||||
|
||||
<p>If you ever get confused about where input sections are going, use the
|
||||
<span class="samp">-M</span> linker option to generate a map file. The map file shows
|
||||
precisely how input sections are mapped to output sections.
|
||||
|
||||
<p>This example shows how wildcard patterns might be used to partition
|
||||
files. This linker script directs the linker to place all <span class="samp">.text</span>
|
||||
sections in <span class="samp">.text</span> and all <span class="samp">.bss</span> sections in <span class="samp">.bss</span>.
|
||||
The linker will place the <span class="samp">.data</span> section from all files beginning
|
||||
with an upper case character in <span class="samp">.DATA</span>; for all other files, the
|
||||
linker will place the <span class="samp">.data</span> section in <span class="samp">.data</span>.
|
||||
<pre class="smallexample"> SECTIONS {
|
||||
.text : { *(.text) }
|
||||
.DATA : { [A-Z]*(.data) }
|
||||
.data : { *(.data) }
|
||||
.bss : { *(.bss) }
|
||||
}
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Input Section - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Output-Section-Address.html#Output-Section-Address" title="Output Section Address">
|
||||
<link rel="next" href="Output-Section-Data.html#Output-Section-Data" title="Output Section Data">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Input-Section"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.4 Input Section Description</h4>
|
||||
|
||||
<p><a name="index-input-sections-366"></a><a name="index-mapping-input-sections-to-output-sections-367"></a>The most common output section command is an input section description.
|
||||
|
||||
<p>The input section description is the most basic linker script operation.
|
||||
You use output sections to tell the linker how to lay out your program
|
||||
in memory. You use input section descriptions to tell the linker how to
|
||||
map the input files into your memory layout.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Input-Section-Basics.html#Input-Section-Basics">Input Section Basics</a>: Input section basics
|
||||
<li><a accesskey="2" href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a>: Input section wildcard patterns
|
||||
<li><a accesskey="3" href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a>: Input section for common symbols
|
||||
<li><a accesskey="4" href="Input-Section-Keep.html#Input-Section-Keep">Input Section Keep</a>: Input section and garbage collection
|
||||
<li><a accesskey="5" href="Input-Section-Example.html#Input-Section-Example">Input Section Example</a>: Input section example
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Invocation - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Overview.html#Overview" title="Overview">
|
||||
<link rel="next" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Invocation"></a>Next: <a rel="next" accesskey="n" href="Scripts.html#Scripts">Scripts</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Overview.html#Overview">Overview</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">2 Invocation</h2>
|
||||
|
||||
<!-- man begin DESCRIPTION -->
|
||||
<p>The <span class="sc">gnu</span> linker <span class="command">ld</span> is meant to cover a broad range of situations,
|
||||
and to be as compatible as possible with other linkers. As a result,
|
||||
you have many choices to control its behavior.
|
||||
|
||||
<!-- man end -->
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Options.html#Options">Options</a>: Command Line Options
|
||||
<li><a accesskey="2" href="Environment.html#Environment">Environment</a>: Environment Variables
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,699 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>LD Index - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" title="GNU Free Documentation License">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="LD-Index"></a>Previous: <a rel="previous" accesskey="p" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">LD Index</h2>
|
||||
|
||||
<ul class="index-cp" compact>
|
||||
<li><a href="Symbols.html#index-_0022-466"><code>"</code></a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-_002d_0028-126"><code>-(</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002daccept_002dunknown_002dinput_002darch-128"><code>--accept-unknown-input-arch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dadd_002dneeded-132"><code>--add-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dadd_002dstdcall_002dalias-258"><code>--add-stdcall-alias</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dallow_002dmultiple_002ddefinition-181"><code>--allow-multiple-definition</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dallow_002dshlib_002dundefined-183"><code>--allow-shlib-undefined</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002darchitecture_003d_0040var_007barch_007d-10"><code>--architecture=</code><var>arch</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002das_002dneeded-130"><code>--as-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dauxiliary-36"><code>--auxiliary</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dbank_002dwindow-298"><code>--bank-window</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dbase_002dfile-259"><code>--base-file</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dbe8-538"><code>--be8</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-_002d_002dbss_002dplt-571"><code>--bss-plt</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dbuild_002did-256"><code>--build-id</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dbuild_002did_003d_0040var_007bstyle_007d-257"><code>--build-id=</code><var>style</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dcheck_002dsections-149"><code>--check-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dcref-152"><code>--cref</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddefault_002dimported_002dsymver-187"><code>--default-imported-symver</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddefault_002dscript_003d_0040var_007bscript_007d-103"><code>--default-script=</code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddefault_002dsymver-186"><code>--default-symver</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddefsym-_0040var_007bsymbol_007d_003d_0040var_007bexp_007d-156"><code>--defsym </code><var>symbol</var><code>=</code><var>exp</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddemangle_005b_003d_0040var_007bstyle_007d_005d-158"><code>--demangle[=</code><var>style</var><code>]</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddisable_002dauto_002dimage_002dbase-285"><code>--disable-auto-image-base</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddisable_002dauto_002dimport-289"><code>--disable-auto-import</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddisable_002dnew_002ddtags-252"><code>--disable-new-dtags</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddisable_002druntime_002dpseudo_002dreloc-291"><code>--disable-runtime-pseudo-reloc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddisable_002dstdcall_002dfixup-262"><code>--disable-stdcall-fixup</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddiscard_002dall-116"><code>--discard-all</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddiscard_002dlocals-119"><code>--discard-locals</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddll-260"><code>--dll</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddll_002dsearch_002dprefix-287"><code>--dll-search-prefix</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002ddotsyms-585"><code>--dotsyms</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddynamic_002dlinker-_0040var_007bfile_007d-162"><code>--dynamic-linker </code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddynamic_002dlist_002dcpp_002dnew-147"><code>--dynamic-list-cpp-new</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddynamic_002dlist_002dcpp_002dtypeinfo-148"><code>--dynamic-list-cpp-typeinfo</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddynamic_002dlist_002ddata-146"><code>--dynamic-list-data</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002ddynamic_002dlist_003d_0040var_007bdynamic_002dlist_002dfile_007d-145"><code>--dynamic-list=</code><var>dynamic-list-file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002deh_002dframe_002dhdr-250"><code>--eh-frame-hdr</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002demit_002drelocs-79"><code>--emit-relocs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-_002d_002demit_002dstack_002dsyms-611"><code>--emit-stack-syms</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-_002d_002demit_002dstub_002dsyms-576"><code>--emit-stub-syms</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002demit_002dstub_002dsyms-583"><code>--emit-stub-syms</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="SPU-ELF.html#index-_002d_002demit_002dstub_002dsyms-603"><code>--emit-stub-syms</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-_002d_002denable_002dauto_002dimage_002dbase-284"><code>--enable-auto-image-base</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002denable_002dauto_002dimport-288"><code>--enable-auto-import</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002denable_002dextra_002dpe_002ddebug-292"><code>--enable-extra-pe-debug</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002denable_002dnew_002ddtags-251"><code>--enable-new-dtags</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002denable_002druntime_002dpseudo_002dreloc-290"><code>--enable-runtime-pseudo-reloc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002denable_002dstdcall_002dfixup-261"><code>--enable-stdcall-fixup</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dentry_003d_0040var_007bentry_007d-25"><code>--entry=</code><var>entry</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002derror_002dunresolved_002dsymbols-246"><code>--error-unresolved-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dexclude_002dlibs-26"><code>--exclude-libs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dexclude_002dsymbols-265"><code>--exclude-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dexport_002dall_002dsymbols-264"><code>--export-all-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dexport_002ddynamic-29"><code>--export-dynamic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-_002d_002dextra_002doverlay_002dstubs-605"><code>--extra-overlay-stubs</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dfatal_002dwarnings-163"><code>--fatal-warnings</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dfile_002dalignment-266"><code>--file-alignment</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dfilter-38"><code>--filter</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dfix_002dv4bx-545"><code>--fix-v4bx</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dfix_002dv4bx_002dinterworking-547"><code>--fix-v4bx-interworking</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dforce_002ddynamic-81"><code>--force-dynamic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dforce_002dexe_002dsuffix-165"><code>--force-exe-suffix</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dformat_003d_0040var_007bformat_007d-13"><code>--format=</code><var>format</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="TI-COFF.html#index-_002d_002dformat_003d_0040var_007bversion_007d-613"><code>--format=</code><var>version</var></a>: <a href="TI-COFF.html#TI-COFF">TI COFF</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dgc_002dsections-166"><code>--gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dgot-299"><code>--got</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="M68K.html#index-_002d_002dgot_003d_0040var_007btype_007d-565"><code>--got=</code><var>type</var></a>: <a href="M68K.html#M68K">M68K</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dgpsize-43"><code>--gpsize</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dhash_002dsize_003d_0040var_007bnumber_007d-253"><code>--hash-size=</code><var>number</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dhash_002dstyle_003d_0040var_007bstyle_007d-254"><code>--hash-style=</code><var>style</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dheap-268"><code>--heap</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dhelp-174"><code>--help</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dimage_002dbase-270"><code>--image-base</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002djust_002dsymbols_003d_0040var_007bfile_007d-88"><code>--just-symbols=</code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dkill_002dat-271"><code>--kill-at</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dlarge_002daddress_002daware-272"><code>--large-address-aware</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dlibrary_002dpath_003d_0040var_007bdir_007d-57"><code>--library-path=</code><var>dir</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dlibrary_003d_0040var_007bnamespec_007d-54"><code>--library=</code><var>namespec</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-_002d_002dlocal_002dstore_003dlo_003ahi-607"><code>--local-store=lo:hi</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dmajor_002dimage_002dversion-273"><code>--major-image-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dmajor_002dos_002dversion-274"><code>--major-os-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dmajor_002dsubsystem_002dversion-275"><code>--major-subsystem-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dminor_002dimage_002dversion-276"><code>--minor-image-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dminor_002dos_002dversion-277"><code>--minor-os-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dminor_002dsubsystem_002dversion-278"><code>--minor-subsystem-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dmri_002dscript_003d_0040var_007bMRI_002dcmdfile_007d-17"><code>--mri-script=</code><var>MRI-cmdfile</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="HPPA-ELF32.html#index-_002d_002dmulti_002dsubspace-561"><code>--multi-subspace</code></a>: <a href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dnmagic-66"><code>--nmagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002daccept_002dunknown_002dinput_002darch-129"><code>--no-accept-unknown-input-arch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dadd_002dneeded-133"><code>--no-add-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dallow_002dshlib_002dundefined-184"><code>--no-allow-shlib-undefined</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002das_002dneeded-131"><code>--no-as-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dcheck_002dsections-150"><code>--no-check-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002ddefine_002dcommon-154"><code>--no-define-common</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002ddemangle-159"><code>--no-demangle</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002dno_002ddotsyms-586"><code>--no-dotsyms</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dno_002denum_002dsize_002dwarning-553"><code>--no-enum-size-warning</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dfatal_002dwarnings-164"><code>--no-fatal-warnings</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dgc_002dsections-167"><code>--no-gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dkeep_002dmemory-178"><code>--no-keep-memory</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002dno_002dmulti_002dtoc-596"><code>--no-multi-toc</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002domagic-71"><code>--no-omagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002dno_002dopd_002doptimize-590"><code>--no-opd-optimize</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="SPU-ELF.html#index-_002d_002dno_002doverlays-601"><code>--no-overlays</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dprint_002dgc_002dsections-170"><code>--no-print-gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Xtensa.html#index-_002d_002dno_002drelax-628"><code>--no-relax</code></a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-_002d_002dno_002dtls_002doptimize-578"><code>--no-tls-optimize</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002dno_002dtls_002doptimize-588"><code>--no-tls-optimize</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002dno_002dtoc_002doptimize-594"><code>--no-toc-optimize</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dtrampoline-297"><code>--no-trampoline</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dundefined-179"><code>--no-undefined</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dundefined_002dversion-185"><code>--no-undefined-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dwarn_002dmismatch-188"><code>--no-warn-mismatch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dwarn_002dsearch_002dmismatch-189"><code>--no-warn-search-mismatch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dno_002dwchar_002dsize_002dwarning-555"><code>--no-wchar-size-warning</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dno_002dwhole_002darchive-190"><code>--no-whole-archive</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dnoinhibit_002dexec-192"><code>--noinhibit-exec</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002dnon_002doverlapping_002dopd-592"><code>--non-overlapping-opd</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-_002d_002doformat-194"><code>--oformat</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002domagic-68"><code>--omagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dout_002dimplib-283"><code>--out-implib</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002doutput_002ddef-281"><code>--output-def</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002doutput_003d_0040var_007boutput_007d-74"><code>--output=</code><var>output</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dpic_002dexecutable-196"><code>--pic-executable</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dpic_002dveneer-557"><code>--pic-veneer</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="SPU-ELF.html#index-_002d_002dplugin-599"><code>--plugin</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dprint_002dgc_002dsections-169"><code>--print-gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dprint_002dmap-62"><code>--print-map</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dreduce_002dmemory_002doverheads-255"><code>--reduce-memory-overheads</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002drelax-200"><code>--relax</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="i960.html#index-_0040option_007b_002d_002drelax_007d-on-i960-526"><span class="option">--relax</span> on i960</a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-_002d_002drelax-on-PowerPC-568"><code>--relax on PowerPC</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Xtensa.html#index-_0040option_007b_002d_002drelax_007d-on-Xtensa-625"><span class="option">--relax</span> on Xtensa</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
<li><a href="Options.html#index-_002d_002drelocatable-86"><code>--relocatable</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dscript_003d_0040var_007bscript_007d-100"><code>--script=</code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-_002d_002dsdata_002dgot-574"><code>--sdata-got</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsection_002dalignment-293"><code>--section-alignment</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsection_002dstart-_0040var_007bsectionname_007d_003d_0040var_007borg_007d-223"><code>--section-start </code><var>sectionname</var><code>=</code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-_002d_002dsecure_002dplt-572"><code>--secure-plt</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsort_002dcommon-213"><code>--sort-common</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsort_002dsection-alignment-215"><code>--sort-section alignment</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsort_002dsection-name-214"><code>--sort-section name</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsplit_002dby_002dfile-216"><code>--split-by-file</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsplit_002dby_002dreloc-217"><code>--split-by-reloc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dstack-295"><code>--stack</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-_002d_002dstack_002danalysis-609"><code>--stack-analysis</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dstats-218"><code>--stats</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dstrip_002dall-91"><code>--strip-all</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dstrip_002ddebug-94"><code>--strip-debug</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-_002d_002dstub_002dgroup_002dsize-581"><code>--stub-group-size</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-559"><code>--stub-group-size=</code><var>N</var></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="HPPA-ELF32.html#index-_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-563"><code>--stub-group-size=</code><var>N</var></a>: <a href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsubsystem-296"><code>--subsystem</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dsupport_002dold_002dcode-533"><code>--support-old-code</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dsysroot-219"><code>--sysroot</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dtarget_002dhelp-175"><code>--target-help</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dtarget1_002dabs-541"><code>--target1-abs</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dtarget1_002drel-540"><code>--target1-rel</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dtarget2_003d_0040var_007btype_007d-543"><code>--target2=</code><var>type</var></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dthumb_002dentry_003d_0040var_007bentry_007d-536"><code>--thumb-entry=</code><var>entry</var></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dtrace-97"><code>--trace</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dtrace_002dsymbol_003d_0040var_007bsymbol_007d-122"><code>--trace-symbol=</code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dtraditional_002dformat-220"><code>--traditional-format</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dundefined_003d_0040var_007bsymbol_007d-106"><code>--undefined=</code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dunique_005b_003d_0040var_007bSECTION_007d_005d-110"><code>--unique[=</code><var>SECTION</var><code>]</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dunresolved_002dsymbols-228"><code>--unresolved-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002duse_002dblx-549"><code>--use-blx</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dverbose-229"><code>--verbose</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dversion-113"><code>--version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dversion_002dscript_003d_0040var_007bversion_002dscriptfile_007d-231"><code>--version-script=</code><var>version-scriptfile</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-_002d_002dvfp11_002ddenorm_002dfix-551"><code>--vfp11-denorm-fix</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwarn_002dcommon-233"><code>--warn-common</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwarn_002dconstructors-236"><code>--warn-constructors</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwarn_002dmultiple_002dgp-237"><code>--warn-multiple-gp</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwarn_002donce-238"><code>--warn-once</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwarn_002dsection_002dalign-241"><code>--warn-section-align</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwarn_002dshared_002dtextrel-244"><code>--warn-shared-textrel</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwarn_002dunresolved_002dsymbols-245"><code>--warn-unresolved-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwhole_002darchive-247"><code>--whole-archive</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002d_002dwrap-249"><code>--wrap</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dA_0040var_007barch_007d-9"><code>-A</code><var>arch</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002da_0040var_007bkeyword_007d-7"><code>-a</code><var>keyword</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dassert-_0040var_007bkeyword_007d-134"><code>-assert </code><var>keyword</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002db-_0040var_007bformat_007d-12"><code>-b </code><var>format</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dBdynamic-135"><code>-Bdynamic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dBgroup-138"><code>-Bgroup</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dBshareable-211"><code>-Bshareable</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dBstatic-139"><code>-Bstatic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dBsymbolic-143"><code>-Bsymbolic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dBsymbolic_002dfunctions-144"><code>-Bsymbolic-functions</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dc-_0040var_007bMRI_002dcmdfile_007d-16"><code>-c </code><var>MRI-cmdfile</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dcall_005fshared-137"><code>-call_shared</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dd-20"><code>-d</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002ddc-21"><code>-dc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002ddn-140"><code>-dn</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002ddp-22"><code>-dp</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002ddT-_0040var_007bscript_007d-102"><code>-dT </code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002ddy-136"><code>-dy</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dE-28"><code>-E</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002de-_0040var_007bentry_007d-24"><code>-e </code><var>entry</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dEB-32"><code>-EB</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dEL-34"><code>-EL</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002df-35"><code>-f</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dF-37"><code>-F</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dfini-40"><code>-fini</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dg-41"><code>-g</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dG-42"><code>-G</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dh_0040var_007bname_007d-46"><code>-h</code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002di-48"><code>-i</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dI_0040var_007bfile_007d-161"><code>-I</code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dinit-51"><code>-init</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dL_0040var_007bdir_007d-56"><code>-L</code><var>dir</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dl_0040var_007bnamespec_007d-53"><code>-l</code><var>namespec</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dM-61"><code>-M</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dm-_0040var_007bemulation_007d-59"><code>-m </code><var>emulation</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dMap-176"><code>-Map</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dN-67"><code>-N</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dn-63"><code>-n</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dnon_005fshared-141"><code>-non_shared</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dnostdlib-193"><code>-nostdlib</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dO-_0040var_007blevel_007d-76"><code>-O </code><var>level</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002do-_0040var_007boutput_007d-73"><code>-o </code><var>output</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dpie-195"><code>-pie</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dq-78"><code>-q</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dqmagic-198"><code>-qmagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dQy-199"><code>-Qy</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dr-85"><code>-r</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dR-_0040var_007bfile_007d-87"><code>-R </code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002drpath-207"><code>-rpath</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002drpath_002dlink-209"><code>-rpath-link</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002ds-90"><code>-s</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dS-93"><code>-S</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dshared-210"><code>-shared</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dsoname_003d_0040var_007bname_007d-47"><code>-soname=</code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dstatic-142"><code>-static</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dt-96"><code>-t</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dT-_0040var_007bscript_007d-99"><code>-T </code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dTbss-_0040var_007borg_007d-224"><code>-Tbss </code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dTdata-_0040var_007borg_007d-225"><code>-Tdata </code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dTtext-_0040var_007borg_007d-226"><code>-Ttext </code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002du-_0040var_007bsymbol_007d-105"><code>-u </code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dUr-108"><code>-Ur</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dv-111"><code>-v</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dV-112"><code>-V</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dx-115"><code>-x</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dX-118"><code>-X</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dY-_0040var_007bpath_007d-124"><code>-Y </code><var>path</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dy-_0040var_007bsymbol_007d-121"><code>-y </code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dz-defs-180"><code>-z defs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dz-_0040var_007bkeyword_007d-125"><code>-z </code><var>keyword</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-_002dz-muldefs-182"><code>-z muldefs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Location-Counter.html#index-_002e-468"><code>.</code></a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-_002fDISCARD_002f-403">/DISCARD/</a>: <a href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a></li>
|
||||
<li><a href="Output-Section-Phdr.html#index-_003a_0040var_007bphdr_007d-423"><code>:</code><var>phdr</var></a>: <a href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a></li>
|
||||
<li><a href="Output-Section-Fill.html#index-_003d_0040var_007bfillexp_007d-426"><code>=</code><var>fillexp</var></a>: <a href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a></li>
|
||||
<li><a href="Output-Section-Region.html#index-_003e_0040var_007bregion_007d-420"><code>></code><var>region</var></a>: <a href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a></li>
|
||||
<li><a href="Input-Section-Common.html#index-_005bCOMMON_005d-380">[COMMON]</a>: <a href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bABSOLUTE_007d-_0028MRI_0029-649"><code>ABSOLUTE</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Expression-Section.html#index-absolute-and-relocatable-symbols-483">absolute and relocatable symbols</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Expression-Section.html#index-absolute-expressions-481">absolute expressions</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-ABSOLUTE_0028_0040var_007bexp_007d_0029-487"><code>ABSOLUTE(</code><var>exp</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-ADDR_0028_0040var_007bsection_007d_0029-489"><code>ADDR(</code><var>section</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Output-Section-Address.html#index-address_002c-section-364">address, section</a>: <a href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bALIAS_007d-_0028MRI_0029-650"><code>ALIAS</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bALIGN_007d-_0028MRI_0029-651"><code>ALIGN</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-align-expression-496">align expression</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-align-location-counter-494">align location counter</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-ALIGN_0028_0040var_007balign_007d_0029-491"><code>ALIGN(</code><var>align</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-ALIGN_0028_0040var_007bexp_007d_002c_0040var_007balign_007d_0029-492"><code>ALIGN(</code><var>exp</var><code>,</code><var>align</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Forced-Output-Alignment.html#index-ALIGN_0028_0040var_007bsection_005falign_007d_0029-414"><code>ALIGN(</code><var>section_align</var><code>)</code></a>: <a href="Forced-Output-Alignment.html#Forced-Output-Alignment">Forced Output Alignment</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-ALIGNOF_0028_0040var_007bsection_007d_0029-497"><code>ALIGNOF(</code><var>section</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="MEMORY.html#index-allocating-memory-434">allocating memory</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-architecture-355">architecture</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Options.html#index-architectures-8">architectures</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-archive-files_002c-from-cmd-line-52">archive files, from cmd line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="File-Commands.html#index-archive-search-path-in-linker-script-333">archive search path in linker script</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Expressions.html#index-arithmetic-455">arithmetic</a>: <a href="Expressions.html#Expressions">Expressions</a></li>
|
||||
<li><a href="Operators.html#index-arithmetic-operators-476">arithmetic operators</a>: <a href="Operators.html#Operators">Operators</a></li>
|
||||
<li><a href="ARM.html#index-ARM-interworking-support-532">ARM interworking support</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="File-Commands.html#index-AS_005fNEEDED_0028_0040var_007bfiles_007d_0029-328"><code>AS_NEEDED(</code><var>files</var><code>)</code></a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-ASSERT-341"><code>ASSERT</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-assertion-in-linker-script-342">assertion in linker script</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Assignments.html#index-assignment-in-scripts-356">assignment in scripts</a>: <a href="Assignments.html#Assignments">Assignments</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-AT_0028_0040var_007blma_007d_0029-409"><code>AT(</code><var>lma</var><code>)</code></a>: <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-AT_003e_0040var_007blma_005fregion_007d-408"><code>AT></code><var>lma_region</var></a>: <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a></li>
|
||||
<li><a href="WIN32.html#index-automatic-data-imports-620">automatic data imports</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="BFD.html#index-back-end-629">back end</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bBASE_007d-_0028MRI_0029-652"><code>BASE</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="ARM.html#index-BE8-537">BE8</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Canonical-format.html#index-BFD-canonical-format-636">BFD canonical format</a>: <a href="Canonical-format.html#Canonical-format">Canonical format</a></li>
|
||||
<li><a href="BFD.html#index-BFD-requirements-633">BFD requirements</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="Options.html#index-big_002dendian-objects-30">big-endian objects</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-binary-input-format-11">binary input format</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-BLOCK_0028_0040var_007bexp_007d_0029-499"><code>BLOCK(</code><var>exp</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-bug-criteria-640">bug criteria</a>: <a href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a></li>
|
||||
<li><a href="Bug-Reporting.html#index-bug-reports-646">bug reports</a>: <a href="Bug-Reporting.html#Bug-Reporting">Bug Reporting</a></li>
|
||||
<li><a href="Reporting-Bugs.html#index-bugs-in-_0040command_007bld_007d-638">bugs in <span class="command">ld</span></a>: <a href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-BYTE_0028_0040var_007bexpression_007d_0029-386"><code>BYTE(</code><var>expression</var><code>)</code></a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-C_002b_002b-constructors_002c-arranging-in-link-398">C++ constructors, arranging in link</a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bCHIP_007d-_0028MRI_0029-653"><code>CHIP</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Environment.html#index-COLLECT_005fNO_005fDEMANGLE-305"><code>COLLECT_NO_DEMANGLE</code></a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="Options.html#index-combining-symbols_002c-warnings-on-235">combining symbols, warnings on</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Scripts.html#index-command-files-309">command files</a>: <a href="Scripts.html#Scripts">Scripts</a></li>
|
||||
<li><a href="Options.html#index-command-line-3">command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-common-allocation-19">common allocation</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-common-allocation-in-linker-script-348">common allocation in linker script</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Input-Section-Common.html#index-common-symbol-placement-376">common symbol placement</a>: <a href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a></li>
|
||||
<li><a href="Options.html#index-compatibility_002c-MRI-18">compatibility, MRI</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Constants.html#index-constants-in-linker-scripts-457">constants in linker scripts</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Options.html#index-constructors-109">constructors</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-CONSTRUCTORS-397"><code>CONSTRUCTORS</code></a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-constructors_002c-arranging-in-link-399">constructors, arranging in link</a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-crash-of-linker-643">crash of linker</a>: <a href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-CREATE_005fOBJECT_005fSYMBOLS-394"><code>CREATE_OBJECT_SYMBOLS</code></a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="WIN32.html#index-creating-a-DEF-file-618">creating a DEF file</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Options.html#index-cross-reference-table-151">cross reference table</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-cross-references-352">cross references</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Location-Counter.html#index-current-output-location-471">current output location</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-data-383">data</a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-DATA_005fSEGMENT_005fALIGN_0028_0040var_007bmaxpagesize_007d_002c-_0040var_007bcommonpagesize_007d_0029-500"><code>DATA_SEGMENT_ALIGN(</code><var>maxpagesize</var><code>, </code><var>commonpagesize</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-DATA_005fSEGMENT_005fEND_0028_0040var_007bexp_007d_0029-501"><code>DATA_SEGMENT_END(</code><var>exp</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-DATA_005fSEGMENT_005fRELRO_005fEND_0028_0040var_007boffset_007d_002c-_0040var_007bexp_007d_0029-502"><code>DATA_SEGMENT_RELRO_END(</code><var>offset</var><code>, </code><var>exp</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-dbx-222">dbx</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-DEF-files_002c-creating-279">DEF files, creating</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Environment.html#index-default-emulation-303">default emulation</a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="Environment.html#index-default-input-format-301">default input format</a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-DEFINED_0028_0040var_007bsymbol_007d_0029-503"><code>DEFINED(</code><var>symbol</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-deleting-local-symbols-117">deleting local symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Environment.html#index-demangling_002c-default-306">demangling, default</a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="Options.html#index-demangling_002c-from-command-line-157">demangling, from command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="WIN32.html#index-direct-linking-to-a-dll-622">direct linking to a dll</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-discarding-sections-400">discarding sections</a>: <a href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a></li>
|
||||
<li><a href="MEMORY.html#index-discontinuous-memory-435">discontinuous memory</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Options.html#index-DLLs_002c-creating-263">DLLs, creating</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-DLLs_002c-linking-to-286">DLLs, linking to</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Location-Counter.html#index-dot-469">dot</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Location-Counter.html#index-dot-inside-sections-473">dot inside sections</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Location-Counter.html#index-dot-outside-sections-474">dot outside sections</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Options.html#index-dynamic-linker_002c-from-command-line-160">dynamic linker, from command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-dynamic-symbol-table-27">dynamic symbol table</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PHDRS.html#index-ELF-program-headers-445">ELF program headers</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Options.html#index-emulation-58">emulation</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Environment.html#index-emulation_002c-default-304">emulation, default</a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bEND_007d-_0028MRI_0029-654"><code>END</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Options.html#index-endianness-31">endianness</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Entry-Point.html#index-entry-point-318">entry point</a>: <a href="Entry-Point.html#Entry-Point">Entry Point</a></li>
|
||||
<li><a href="Options.html#index-entry-point_002c-from-command-line-23">entry point, from command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-entry-point_002c-thumb-535">entry point, thumb</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Entry-Point.html#index-ENTRY_0028_0040var_007bsymbol_007d_0029-315"><code>ENTRY(</code><var>symbol</var><code>)</code></a>: <a href="Entry-Point.html#Entry-Point">Entry Point</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-error-on-valid-input-644">error on valid input</a>: <a href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a></li>
|
||||
<li><a href="Simple-Example.html#index-example-of-linker-script-313">example of linker script</a>: <a href="Simple-Example.html#Simple-Example">Simple Example</a></li>
|
||||
<li><a href="WIN32.html#index-exporting-DLL-symbols-615">exporting DLL symbols</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Evaluation.html#index-expression-evaluation-order-479">expression evaluation order</a>: <a href="Evaluation.html#Evaluation">Evaluation</a></li>
|
||||
<li><a href="Expression-Section.html#index-expression-sections-480">expression sections</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-expression_002c-absolute-488">expression, absolute</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Expressions.html#index-expressions-454">expressions</a>: <a href="Expressions.html#Expressions">Expressions</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-EXTERN-343"><code>EXTERN</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-fatal-signal-641">fatal signal</a>: <a href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-file-name-wildcard-patterns-371">file name wildcard patterns</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="PHDRS.html#index-FILEHDR-448"><code>FILEHDR</code></a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-filename-symbols-396">filename symbols</a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="Output-Section-Fill.html#index-fill-pattern_002c-entire-section-428">fill pattern, entire section</a>: <a href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-FILL_0028_0040var_007bexpression_007d_0029-391"><code>FILL(</code><var>expression</var><code>)</code></a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Options.html#index-finalization-function-39">finalization function</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="File-Commands.html#index-first-input-file-336">first input file</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Entry-Point.html#index-first-instruction-317">first instruction</a>: <a href="Entry-Point.html#Entry-Point">Entry Point</a></li>
|
||||
<li><a href="ARM.html#index-FIX_005fV4BX-544">FIX_V4BX</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-FIX_005fV4BX_005fINTERWORKING-546">FIX_V4BX_INTERWORKING</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-FORCE_005fCOMMON_005fALLOCATION-345"><code>FORCE_COMMON_ALLOCATION</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Forced-Input-Alignment.html#index-forcing-input-section-alignment-418">forcing input section alignment</a>: <a href="Forced-Input-Alignment.html#Forced-Input-Alignment">Forced Input Alignment</a></li>
|
||||
<li><a href="Forced-Output-Alignment.html#index-forcing-output-section-alignment-415">forcing output section alignment</a>: <a href="Forced-Output-Alignment.html#Forced-Output-Alignment">Forced Output Alignment</a></li>
|
||||
<li><a href="Options.html#index-forcing-the-creation-of-dynamic-sections-82">forcing the creation of dynamic sections</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bFORMAT_007d-_0028MRI_0029-655"><code>FORMAT</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-functions-in-expressions-486">functions in expressions</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Input-Section-Keep.html#index-garbage-collection-382">garbage collection</a>: <a href="Input-Section-Keep.html#Input-Section-Keep">Input Section Keep</a></li>
|
||||
<li><a href="Options.html#index-garbage-collection-168">garbage collection</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-generating-optimized-output-77">generating optimized output</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Overview.html#index-_0040sc_007bgnu_007d-linker-1"><span class="sc">gnu</span> linker</a>: <a href="Overview.html#Overview">Overview</a></li>
|
||||
<li><a href="Environment.html#index-GNUTARGET-300"><code>GNUTARGET</code></a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="File-Commands.html#index-GROUP_0028_0040var_007bfiles_007d_0029-326"><code>GROUP(</code><var>files</var><code>)</code></a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="File-Commands.html#index-grouping-input-files-327">grouping input files</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Options.html#index-groups-of-archives-127">groups of archives</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="H8_002f300.html#index-H8_002f300-support-522">H8/300 support</a>: <a href="H8_002f300.html#H8_002f300">H8/300</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-header-size-517">header size</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-heap-size-267">heap size</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-help-172">help</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Location-Counter.html#index-holes-472">holes</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-holes_002c-filling-392">holes, filling</a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="HPPA-ELF32.html#index-HPPA-multiple-sub_002dspace-stubs-560">HPPA multiple sub-space stubs</a>: <a href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a></li>
|
||||
<li><a href="HPPA-ELF32.html#index-HPPA-stub-grouping-562">HPPA stub grouping</a>: <a href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a></li>
|
||||
<li><a href="i960.html#index-i960-support-525">i960 support</a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="Options.html#index-image-base-269">image base</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Implicit-Linker-Scripts.html#index-implicit-linker-scripts-520">implicit linker scripts</a>: <a href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts">Implicit Linker Scripts</a></li>
|
||||
<li><a href="WIN32.html#index-import-libraries-614">import libraries</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="File-Commands.html#index-INCLUDE-_0040var_007bfilename_007d-320"><code>INCLUDE </code><var>filename</var></a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="File-Commands.html#index-including-a-linker-script-321">including a linker script</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Options.html#index-including-an-entire-archive-248">including an entire archive</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-incremental-link-49">incremental link</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-INHIBIT_005fCOMMON_005fALLOCATION-347"><code>INHIBIT_COMMON_ALLOCATION</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Options.html#index-initialization-function-50">initialization function</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-initialized-data-in-ROM-413">initialized data in ROM</a>: <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a></li>
|
||||
<li><a href="Format-Commands.html#index-input-file-format-in-linker-script-340">input file format in linker script</a>: <a href="Format-Commands.html#Format-Commands">Format Commands</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-input-filename-symbols-395">input filename symbols</a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="File-Commands.html#index-input-files-in-linker-scripts-323">input files in linker scripts</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Options.html#index-input-files_002c-displaying-98">input files, displaying</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-input-format-15">input format</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="File-Commands.html#index-input-object-files-in-linker-scripts-324">input object files in linker scripts</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Forced-Input-Alignment.html#index-input-section-alignment-419">input section alignment</a>: <a href="Forced-Input-Alignment.html#Forced-Input-Alignment">Forced Input Alignment</a></li>
|
||||
<li><a href="Input-Section-Basics.html#index-input-section-basics-368">input section basics</a>: <a href="Input-Section-Basics.html#Input-Section-Basics">Input Section Basics</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-input-section-wildcards-369">input section wildcards</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="Input-Section.html#index-input-sections-366">input sections</a>: <a href="Input-Section.html#Input-Section">Input Section</a></li>
|
||||
<li><a href="File-Commands.html#index-INPUT_0028_0040var_007bfiles_007d_0029-322"><code>INPUT(</code><var>files</var><code>)</code></a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-INSERT-349"><code>INSERT</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-insert-user-script-into-default-script-350">insert user script into default script</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Constants.html#index-integer-notation-456">integer notation</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Constants.html#index-integer-suffixes-462">integer suffixes</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Canonical-format.html#index-internal-object_002dfile-format-637">internal object-file format</a>: <a href="Canonical-format.html#Canonical-format">Canonical format</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-invalid-input-645">invalid input</a>: <a href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a></li>
|
||||
<li><a href="Constants.html#index-K-and-M-integer-suffixes-459">K and M integer suffixes</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Input-Section-Keep.html#index-KEEP-381">KEEP</a>: <a href="Input-Section-Keep.html#Input-Section-Keep">Input Section Keep</a></li>
|
||||
<li><a href="MEMORY.html#index-l-_003d-442"><code>l =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Evaluation.html#index-lazy-evaluation-478">lazy evaluation</a>: <a href="Evaluation.html#Evaluation">Evaluation</a></li>
|
||||
<li><a href="Bug-Reporting.html#index-_0040command_007bld_007d-bugs_002c-reporting-647"><span class="command">ld</span> bugs, reporting</a>: <a href="Bug-Reporting.html#Bug-Reporting">Bug Reporting</a></li>
|
||||
<li><a href="Environment.html#index-LDEMULATION-302"><code>LDEMULATION</code></a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="MEMORY.html#index-len-_003d-441"><code>len =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-LENGTH-_003d-440"><code>LENGTH =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-LENGTH_0028_0040var_007bmemory_007d_0029-505"><code>LENGTH(</code><var>memory</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="File-Commands.html#index-library-search-path-in-linker-script-332">library search path in linker script</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Options.html#index-link-map-60">link map</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-link_002dtime-runtime-library-search-path-208">link-time runtime library search path</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-linker-crash-642">linker crash</a>: <a href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a></li>
|
||||
<li><a href="Basic-Script-Concepts.html#index-linker-script-concepts-310">linker script concepts</a>: <a href="Basic-Script-Concepts.html#Basic-Script-Concepts">Basic Script Concepts</a></li>
|
||||
<li><a href="Simple-Example.html#index-linker-script-example-312">linker script example</a>: <a href="Simple-Example.html#Simple-Example">Simple Example</a></li>
|
||||
<li><a href="File-Commands.html#index-linker-script-file-commands-319">linker script file commands</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Script-Format.html#index-linker-script-format-311">linker script format</a>: <a href="Script-Format.html#Script-Format">Script Format</a></li>
|
||||
<li><a href="File-Commands.html#index-linker-script-input-object-files-325">linker script input object files</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Simple-Commands.html#index-linker-script-simple-commands-314">linker script simple commands</a>: <a href="Simple-Commands.html#Simple-Commands">Simple Commands</a></li>
|
||||
<li><a href="Scripts.html#index-linker-scripts-308">linker scripts</a>: <a href="Scripts.html#Scripts">Scripts</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bLIST_007d-_0028MRI_0029-656"><code>LIST</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Options.html#index-little_002dendian-objects-33">little-endian objects</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bLOAD_007d-_0028MRI_0029-657"><code>LOAD</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-load-address-410">load address</a>: <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-LOADADDR_0028_0040var_007bsection_007d_0029-506"><code>LOADADDR(</code><var>section</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Output-Section-Type.html#index-loading_002c-preventing-407">loading, preventing</a>: <a href="Output-Section-Type.html#Output-Section-Type">Output Section Type</a></li>
|
||||
<li><a href="Options.html#index-local-symbols_002c-deleting-120">local symbols, deleting</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Location-Counter.html#index-location-counter-470">location counter</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-LONG_0028_0040var_007bexpression_007d_0029-388"><code>LONG(</code><var>expression</var><code>)</code></a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Constants.html#index-M-and-K-integer-suffixes-460">M and K integer suffixes</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="M68HC11_002f68HC12.html#index-M68HC11-and-68HC12-support-528">M68HC11 and 68HC12 support</a>: <a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-machine-architecture-354">machine architecture</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Machine-Dependent.html#index-machine-dependencies-521">machine dependencies</a>: <a href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a></li>
|
||||
<li><a href="Input-Section.html#index-mapping-input-sections-to-output-sections-367">mapping input sections to output sections</a>: <a href="Input-Section.html#Input-Section">Input Section</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-MAX-508"><code>MAX</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="MEMORY.html#index-MEMORY-431"><code>MEMORY</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-memory-region-attributes-436">memory region attributes</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-memory-regions-432">memory regions</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Output-Section-Region.html#index-memory-regions-and-sections-422">memory regions and sections</a>: <a href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a></li>
|
||||
<li><a href="Options.html#index-memory-usage-177">memory usage</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-MIN-509"><code>MIN</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="M68K.html#index-Motorola-68K-GOT-generation-564">Motorola 68K GOT generation</a>: <a href="M68K.html#M68K">M68K</a></li>
|
||||
<li><a href="MRI.html#index-MRI-compatibility-648">MRI compatibility</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="MSP430.html#index-MSP430-extra-sections-566">MSP430 extra sections</a>: <a href="MSP430.html#MSP430">MSP430</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bNAME_007d-_0028MRI_0029-658"><code>NAME</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Output-Section-Name.html#index-name_002c-section-362">name, section</a>: <a href="Output-Section-Name.html#Output-Section-Name">Output Section Name</a></li>
|
||||
<li><a href="Symbols.html#index-names-464">names</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-naming-the-output-file-75">naming the output file</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-NEXT_0028_0040var_007bexp_007d_0029-510"><code>NEXT(</code><var>exp</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-NMAGIC-65">NMAGIC</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-NO_005fENUM_005fSIZE_005fWARNING-552">NO_ENUM_SIZE_WARNING</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-NO_005fWCHAR_005fSIZE_005fWARNING-554">NO_WCHAR_SIZE_WARNING</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-NOCROSSREFS_0028_0040var_007bsections_007d_0029-351"><code>NOCROSSREFS(</code><var>sections</var><code>)</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Output-Section-Type.html#index-NOLOAD-405"><code>NOLOAD</code></a>: <a href="Output-Section-Type.html#Output-Section-Type">Output Section Type</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-not-enough-room-for-program-headers-518">not enough room for program headers</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="MEMORY.html#index-o-_003d-438"><code>o =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="BFD.html#index-objdump-_002di-632"><code>objdump -i</code></a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="BFD.html#index-object-file-management-630">object file management</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="Options.html#index-object-files-6">object files</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="BFD.html#index-object-formats-available-631">object formats available</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="Options.html#index-object-size-44">object size</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-OMAGIC-72">OMAGIC</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="BFD-outline.html#index-opening-object-files-635">opening object files</a>: <a href="BFD-outline.html#BFD-outline">BFD outline</a></li>
|
||||
<li><a href="Operators.html#index-operators-for-arithmetic-475">operators for arithmetic</a>: <a href="Operators.html#Operators">Operators</a></li>
|
||||
<li><a href="Options.html#index-options-4">options</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bORDER_007d-_0028MRI_0029-659"><code>ORDER</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="MEMORY.html#index-org-_003d-439"><code>org =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-ORIGIN-_003d-437"><code>ORIGIN =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-ORIGIN_0028_0040var_007bmemory_007d_0029-512"><code>ORIGIN(</code><var>memory</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Orphan-Sections.html#index-orphan-467">orphan</a>: <a href="Orphan-Sections.html#Orphan-Sections">Orphan Sections</a></li>
|
||||
<li><a href="Options.html#index-output-file-after-errors-191">output file after errors</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Format-Commands.html#index-output-file-format-in-linker-script-338">output file format in linker script</a>: <a href="Format-Commands.html#Format-Commands">Format Commands</a></li>
|
||||
<li><a href="File-Commands.html#index-output-file-name-in-linker-script-330">output file name in linker script</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Forced-Output-Alignment.html#index-output-section-alignment-416">output section alignment</a>: <a href="Forced-Output-Alignment.html#Forced-Output-Alignment">Forced Output Alignment</a></li>
|
||||
<li><a href="Output-Section-Attributes.html#index-output-section-attributes-404">output section attributes</a>: <a href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-output-section-data-385">output section data</a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="File-Commands.html#index-OUTPUT_0028_0040var_007bfilename_007d_0029-329"><code>OUTPUT(</code><var>filename</var><code>)</code></a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-OUTPUT_005fARCH_0028_0040var_007bbfdarch_007d_0029-353"><code>OUTPUT_ARCH(</code><var>bfdarch</var><code>)</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Format-Commands.html#index-OUTPUT_005fFORMAT_0028_0040var_007bbfdname_007d_0029-337"><code>OUTPUT_FORMAT(</code><var>bfdname</var><code>)</code></a>: <a href="Format-Commands.html#Format-Commands">Format Commands</a></li>
|
||||
<li><a href="Overlay-Description.html#index-OVERLAY-429"><code>OVERLAY</code></a>: <a href="Overlay-Description.html#Overlay-Description">Overlay Description</a></li>
|
||||
<li><a href="Overlay-Description.html#index-overlays-430">overlays</a>: <a href="Overlay-Description.html#Overlay-Description">Overlay Description</a></li>
|
||||
<li><a href="Options.html#index-partial-link-83">partial link</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PHDRS.html#index-PHDRS-443"><code>PHDRS</code></a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="ARM.html#index-PIC_005fVENEER-556">PIC_VENEER</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-position-independent-executables-197">position independent executables</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-ELF32-options-569">PowerPC ELF32 options</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-GOT-573">PowerPC GOT</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-long-branches-567">PowerPC long branches</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-PLT-570">PowerPC PLT</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-stub-symbols-575">PowerPC stub symbols</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-TLS-optimization-577">PowerPC TLS optimization</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-dot-symbols-584">PowerPC64 dot symbols</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-ELF64-options-579">PowerPC64 ELF64 options</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-multi_002dTOC-595">PowerPC64 multi-TOC</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-OPD-optimization-589">PowerPC64 OPD optimization</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-OPD-spacing-591">PowerPC64 OPD spacing</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-stub-grouping-580">PowerPC64 stub grouping</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-stub-symbols-582">PowerPC64 stub symbols</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-TLS-optimization-587">PowerPC64 TLS optimization</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-TOC-optimization-593">PowerPC64 TOC optimization</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Operators.html#index-precedence-in-expressions-477">precedence in expressions</a>: <a href="Operators.html#Operators">Operators</a></li>
|
||||
<li><a href="Output-Section-Type.html#index-prevent-unnecessary-loading-406">prevent unnecessary loading</a>: <a href="Output-Section-Type.html#Output-Section-Type">Output Section Type</a></li>
|
||||
<li><a href="PHDRS.html#index-program-headers-444">program headers</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Output-Section-Phdr.html#index-program-headers-and-sections-425">program headers and sections</a>: <a href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-program-headers_002c-not-enough-room-519">program headers, not enough room</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="PHDRS.html#index-program-segments-446">program segments</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="PROVIDE.html#index-PROVIDE-359">PROVIDE</a>: <a href="PROVIDE.html#PROVIDE">PROVIDE</a></li>
|
||||
<li><a href="PROVIDE_005fHIDDEN.html#index-PROVIDE_005fHIDDEN-360">PROVIDE_HIDDEN</a>: <a href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">PROVIDE_HIDDEN</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bPUBLIC_007d-_0028MRI_0029-660"><code>PUBLIC</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-QUAD_0028_0040var_007bexpression_007d_0029-389"><code>QUAD(</code><var>expression</var><code>)</code></a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Symbols.html#index-quoted-symbol-names-465">quoted symbol names</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-read_002donly-text-64">read-only text</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-read_002fwrite-from-cmd-line-69">read/write from cmd line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="MEMORY.html#index-regions-of-memory-433">regions of memory</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Expression-Section.html#index-relative-expressions-482">relative expressions</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Options.html#index-relaxing-addressing-modes-202">relaxing addressing modes</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="H8_002f300.html#index-relaxing-on-H8_002f300-523">relaxing on H8/300</a>: <a href="H8_002f300.html#H8_002f300">H8/300</a></li>
|
||||
<li><a href="i960.html#index-relaxing-on-i960-527">relaxing on i960</a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="M68HC11_002f68HC12.html#index-relaxing-on-M68HC11-529">relaxing on M68HC11</a>: <a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a></li>
|
||||
<li><a href="Xtensa.html#index-relaxing-on-Xtensa-626">relaxing on Xtensa</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
<li><a href="Expression-Section.html#index-relocatable-and-absolute-symbols-484">relocatable and absolute symbols</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Options.html#index-relocatable-output-84">relocatable output</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-removing-sections-402">removing sections</a>: <a href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a></li>
|
||||
<li><a href="Reporting-Bugs.html#index-reporting-bugs-in-_0040command_007bld_007d-639">reporting bugs in <span class="command">ld</span></a>: <a href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a></li>
|
||||
<li><a href="BFD.html#index-requirements-for-BFD-634">requirements for BFD</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="Options.html#index-retain-relocations-in-final-executable-80">retain relocations in final executable</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-retaining-specified-symbols-203">retaining specified symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-ROM-initialized-data-412">ROM initialized data</a>: <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-round-up-expression-495">round up expression</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-round-up-location-counter-493">round up location counter</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-runtime-library-name-45">runtime library name</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-runtime-library-search-path-206">runtime library search path</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="WIN32.html#index-runtime-pseudo_002drelocation-621">runtime pseudo-relocation</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Constants.html#index-scaled-integers-458">scaled integers</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Input-Section-Common.html#index-scommon-section-378">scommon section</a>: <a href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a></li>
|
||||
<li><a href="Options.html#index-script-files-101">script files</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Scripts.html#index-scripts-307">scripts</a>: <a href="Scripts.html#Scripts">Scripts</a></li>
|
||||
<li><a href="Options.html#index-search-directory_002c-from-cmd-line-55">search directory, from cmd line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="File-Commands.html#index-search-path-in-linker-script-334">search path in linker script</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="File-Commands.html#index-SEARCH_005fDIR_0028_0040var_007bpath_007d_0029-331"><code>SEARCH_DIR(</code><var>path</var><code>)</code></a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="MRI.html#index-_0040code_007bSECT_007d-_0028MRI_0029-661"><code>SECT</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Output-Section-Address.html#index-section-address-365">section address</a>: <a href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-section-address-in-expression-490">section address in expression</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-section-alignment-498">section alignment</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-section-alignment_002c-warnings-on-243">section alignment, warnings on</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-section-data-384">section data</a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Output-Section-Fill.html#index-section-fill-pattern-427">section fill pattern</a>: <a href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-section-load-address-411">section load address</a>: <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-section-load-address-in-expression-507">section load address in expression</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Output-Section-Name.html#index-section-name-363">section name</a>: <a href="Output-Section-Name.html#Output-Section-Name">Output Section Name</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-section-name-wildcard-patterns-372">section name wildcard patterns</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-section-size-515">section size</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Output-Section-Region.html#index-section_002c-assigning-to-memory-region-421">section, assigning to memory region</a>: <a href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a></li>
|
||||
<li><a href="Output-Section-Phdr.html#index-section_002c-assigning-to-program-header-424">section, assigning to program header</a>: <a href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a></li>
|
||||
<li><a href="SECTIONS.html#index-SECTIONS-361"><code>SECTIONS</code></a>: <a href="SECTIONS.html#SECTIONS">SECTIONS</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-sections_002c-discarding-401">sections, discarding</a>: <a href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a></li>
|
||||
<li><a href="Options.html#index-segment-origins_002c-cmd-line-227">segment origins, cmd line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-SEGMENT_005fSTART_0028_0040var_007bsegment_007d_002c-_0040var_007bdefault_007d_0029-513"><code>SEGMENT_START(</code><var>segment</var><code>, </code><var>default</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="PHDRS.html#index-segments_002c-ELF-447">segments, ELF</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Options.html#index-shared-libraries-212">shared libraries</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-SHORT_0028_0040var_007bexpression_007d_0029-387"><code>SHORT(</code><var>expression</var><code>)</code></a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-SIZEOF_0028_0040var_007bsection_007d_0029-514"><code>SIZEOF(</code><var>section</var><code>)</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-SIZEOF_005fHEADERS-516"><code>SIZEOF_HEADERS</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Input-Section-Common.html#index-small-common-symbols-379">small common symbols</a>: <a href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-SORT-375">SORT</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-SORT_005fBY_005fALIGNMENT-374">SORT_BY_ALIGNMENT</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-SORT_005fBY_005fNAME-373">SORT_BY_NAME</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-610">SPU</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-ELF-options-597">SPU ELF options</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-extra-overlay-stubs-604">SPU extra overlay stubs</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-local-store-size-606">SPU local store size</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-overlay-stub-symbols-602">SPU overlay stub symbols</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-overlays-600">SPU overlays</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-plugins-598">SPU plugins</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-SQUAD_0028_0040var_007bexpression_007d_0029-390"><code>SQUAD(</code><var>expression</var><code>)</code></a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Options.html#index-stack-size-294">stack size</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-standard-Unix-system-5">standard Unix system</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Entry-Point.html#index-start-of-execution-316">start of execution</a>: <a href="Entry-Point.html#Entry-Point">Entry Point</a></li>
|
||||
<li><a href="File-Commands.html#index-STARTUP_0028_0040var_007bfilename_007d_0029-335"><code>STARTUP(</code><var>filename</var><code>)</code></a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Options.html#index-strip-all-symbols-92">strip all symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-strip-debugger-symbols-95">strip debugger symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-stripping-all-but-some-symbols-204">stripping all but some symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-STUB_005fGROUP_005fSIZE-558">STUB_GROUP_SIZE</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Forced-Input-Alignment.html#index-SUBALIGN_0028_0040var_007bsubsection_005falign_007d_0029-417"><code>SUBALIGN(</code><var>subsection_align</var><code>)</code></a>: <a href="Forced-Input-Alignment.html#Forced-Input-Alignment">Forced Input Alignment</a></li>
|
||||
<li><a href="Constants.html#index-suffixes-for-integers-461">suffixes for integers</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-symbol-defaults-504">symbol defaults</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Assignments.html#index-symbol-definition_002c-scripts-357">symbol definition, scripts</a>: <a href="Assignments.html#Assignments">Assignments</a></li>
|
||||
<li><a href="Symbols.html#index-symbol-names-463">symbol names</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-symbol-tracing-123">symbol tracing</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="VERSION.html#index-symbol-versions-451">symbol versions</a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="Options.html#index-symbol_002donly-input-89">symbol-only input</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-symbols_002c-from-command-line-155">symbols, from command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Expression-Section.html#index-symbols_002c-relocatable-and-absolute-485">symbols, relocatable and absolute</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Options.html#index-symbols_002c-retaining-selectively-205">symbols, retaining selectively</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-synthesizing-linker-201">synthesizing linker</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="H8_002f300.html#index-synthesizing-on-H8_002f300-524">synthesizing on H8/300</a>: <a href="H8_002f300.html#H8_002f300">H8/300</a></li>
|
||||
<li><a href="Format-Commands.html#index-TARGET_0028_0040var_007bbfdname_007d_0029-339"><code>TARGET(</code><var>bfdname</var><code>)</code></a>: <a href="Format-Commands.html#Format-Commands">Format Commands</a></li>
|
||||
<li><a href="ARM.html#index-TARGET1-539">TARGET1</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-TARGET2-542">TARGET2</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-thumb-entry-point-534">thumb entry point</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="TI-COFF.html#index-TI-COFF-versions-612">TI COFF versions</a>: <a href="TI-COFF.html#TI-COFF">TI COFF</a></li>
|
||||
<li><a href="Options.html#index-traditional-format-221">traditional format</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="M68HC11_002f68HC12.html#index-trampoline-generation-on-M68HC11-530">trampoline generation on M68HC11</a>: <a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a></li>
|
||||
<li><a href="M68HC11_002f68HC12.html#index-trampoline-generation-on-M68HC12-531">trampoline generation on M68HC12</a>: <a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-unallocated-address_002c-next-511">unallocated address, next</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-undefined-symbol-107">undefined symbol</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-undefined-symbol-in-linker-script-344">undefined symbol in linker script</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Options.html#index-undefined-symbols_002c-warnings-on-240">undefined symbols, warnings on</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Input-Section-Common.html#index-uninitialized-data-placement-377">uninitialized data placement</a>: <a href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-unspecified-memory-393">unspecified memory</a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Options.html#index-usage-173">usage</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-USE_005fBLX-548">USE_BLX</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="WIN32.html#index-using-a-DEF-file-617">using a DEF file</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="WIN32.html#index-using-auto_002dexport-functionality-616">using auto-export functionality</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="WIN32.html#index-Using-decorations-619">Using decorations</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Assignments.html#index-variables_002c-defining-358">variables, defining</a>: <a href="Assignments.html#Assignments">Assignments</a></li>
|
||||
<li><a href="Options.html#index-verbose-230">verbose</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-version-114">version</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="VERSION.html#index-version-script-452">version script</a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="Options.html#index-version-script_002c-symbol-versions-232">version script, symbol versions</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="VERSION.html#index-VERSION-_0040_007bscript-text_0040_007d-450"><code>VERSION {script text}</code></a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="VERSION.html#index-versions-of-symbols-453">versions of symbols</a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="ARM.html#index-VFP11_005fDENORM_005fFIX-550">VFP11_DENORM_FIX</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-warnings_002c-on-combining-symbols-234">warnings, on combining symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-warnings_002c-on-section-alignment-242">warnings, on section alignment</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-warnings_002c-on-undefined-symbols-239">warnings, on undefined symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="WIN32.html#index-weak-externals-623">weak externals</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Overview.html#index-what-is-this_003f-2">what is this?</a>: <a href="Overview.html#Overview">Overview</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-wildcard-file-name-patterns-370">wildcard file name patterns</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="Xtensa.html#index-Xtensa-options-627">Xtensa options</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
<li><a href="Xtensa.html#index-Xtensa-processors-624">Xtensa processors</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
</ul></body></html>
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Location Counter - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Orphan-Sections.html#Orphan-Sections" title="Orphan Sections">
|
||||
<link rel="next" href="Operators.html#Operators" title="Operators">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Location-Counter"></a>Next: <a rel="next" accesskey="n" href="Operators.html#Operators">Operators</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Orphan-Sections.html#Orphan-Sections">Orphan Sections</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.4 The Location Counter</h4>
|
||||
|
||||
<p><a name="index-_002e-468"></a><a name="index-dot-469"></a><a name="index-location-counter-470"></a><a name="index-current-output-location-471"></a>The special linker variable <dfn>dot</dfn> <span class="samp">.</span> always contains the
|
||||
current output location counter. Since the <code>.</code> always refers to a
|
||||
location in an output section, it may only appear in an expression
|
||||
within a <code>SECTIONS</code> command. The <code>.</code> symbol may appear
|
||||
anywhere that an ordinary symbol is allowed in an expression.
|
||||
|
||||
<p><a name="index-holes-472"></a>Assigning a value to <code>.</code> will cause the location counter to be
|
||||
moved. This may be used to create holes in the output section. The
|
||||
location counter may not be moved backwards inside an output section,
|
||||
and may not be moved backwards outside of an output section if so
|
||||
doing creates areas with overlapping LMAs.
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
output :
|
||||
{
|
||||
file1(.text)
|
||||
. = . + 1000;
|
||||
file2(.text)
|
||||
. += 1000;
|
||||
file3(.text)
|
||||
} = 0x12345678;
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent">In the previous example, the <span class="samp">.text</span> section from <span class="file">file1</span> is
|
||||
located at the beginning of the output section <span class="samp">output</span>. It is
|
||||
followed by a 1000 byte gap. Then the <span class="samp">.text</span> section from
|
||||
<span class="file">file2</span> appears, also with a 1000 byte gap following before the
|
||||
<span class="samp">.text</span> section from <span class="file">file3</span>. The notation <span class="samp">= 0x12345678</span>
|
||||
specifies what data to write in the gaps (see <a href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a>).
|
||||
|
||||
<p><a name="index-dot-inside-sections-473"></a>Note: <code>.</code> actually refers to the byte offset from the start of the
|
||||
current containing object. Normally this is the <code>SECTIONS</code>
|
||||
statement, whose start address is 0, hence <code>.</code> can be used as an
|
||||
absolute address. If <code>.</code> is used inside a section description
|
||||
however, it refers to the byte offset from the start of that section,
|
||||
not an absolute address. Thus in a script like this:
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
. = 0x100
|
||||
.text: {
|
||||
*(.text)
|
||||
. = 0x200
|
||||
}
|
||||
. = 0x500
|
||||
.data: {
|
||||
*(.data)
|
||||
. += 0x600
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>The <span class="samp">.text</span> section will be assigned a starting address of 0x100
|
||||
and a size of exactly 0x200 bytes, even if there is not enough data in
|
||||
the <span class="samp">.text</span> input sections to fill this area. (If there is too
|
||||
much data, an error will be produced because this would be an attempt to
|
||||
move <code>.</code> backwards). The <span class="samp">.data</span> section will start at 0x500
|
||||
and it will have an extra 0x600 bytes worth of space after the end of
|
||||
the values from the <span class="samp">.data</span> input sections and before the end of
|
||||
the <span class="samp">.data</span> output section itself.
|
||||
|
||||
<p><a name="index-dot-outside-sections-474"></a>Setting symbols to the value of the location counter outside of an
|
||||
output section statement can result in unexpected values if the linker
|
||||
needs to place orphan sections. For example, given the following:
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
start_of_text = . ;
|
||||
.text: { *(.text) }
|
||||
end_of_text = . ;
|
||||
|
||||
start_of_data = . ;
|
||||
.data: { *(.data) }
|
||||
end_of_data = . ;
|
||||
}
|
||||
</pre>
|
||||
<p>If the linker needs to place some input section, e.g. <code>.rodata</code>,
|
||||
not mentioned in the script, it might choose to place that section
|
||||
between <code>.text</code> and <code>.data</code>. You might think the linker
|
||||
should place <code>.rodata</code> on the blank line in the above script, but
|
||||
blank lines are of no particular significance to the linker. As well,
|
||||
the linker doesn't associate the above symbol names with their
|
||||
sections. Instead, it assumes that all assignments or other
|
||||
statements belong to the previous output section, except for the
|
||||
special case of an assignment to <code>.</code>. I.e., the linker will
|
||||
place the orphan <code>.rodata</code> section as if the script was written
|
||||
as follows:
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
start_of_text = . ;
|
||||
.text: { *(.text) }
|
||||
end_of_text = . ;
|
||||
|
||||
start_of_data = . ;
|
||||
.rodata: { *(.rodata) }
|
||||
.data: { *(.data) }
|
||||
end_of_data = . ;
|
||||
}
|
||||
</pre>
|
||||
<p>This may or may not be the script author's intention for the value of
|
||||
<code>start_of_data</code>. One way to influence the orphan section
|
||||
placement is to assign the location counter to itself, as the linker
|
||||
assumes that an assignment to <code>.</code> is setting the start address of
|
||||
a following output section and thus should be grouped with that
|
||||
section. So you could write:
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
start_of_text = . ;
|
||||
.text: { *(.text) }
|
||||
end_of_text = . ;
|
||||
|
||||
. = . ;
|
||||
start_of_data = . ;
|
||||
.data: { *(.data) }
|
||||
end_of_data = . ;
|
||||
}
|
||||
</pre>
|
||||
<p>Now, the orphan <code>.rodata</code> section will be placed between
|
||||
<code>end_of_text</code> and <code>start_of_data</code>.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>M68HC11/68HC12 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="MSP430.html#MSP430" title="MSP430">
|
||||
<link rel="next" href="PowerPC-ELF32.html#PowerPC-ELF32" title="PowerPC ELF32">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="M68HC11_002f68HC12"></a>Next: <a rel="next" accesskey="n" href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="MSP430.html#MSP430">MSP430</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.3 <span class="command">ld</span> and the Motorola 68HC11 and 68HC12 families</h3>
|
||||
|
||||
<p><a name="index-M68HC11-and-68HC12-support-528"></a>
|
||||
|
||||
<h4 class="subsection">4.3.1 Linker Relaxation</h4>
|
||||
|
||||
<p>For the Motorola 68HC11, <span class="command">ld</span> can perform these global
|
||||
optimizations when you specify the <span class="samp">--relax</span> command-line option.
|
||||
|
||||
|
||||
<a name="index-relaxing-on-M68HC11-529"></a>
|
||||
<dl><dt><em>relaxing address modes</em><dd><span class="command">ld</span> finds all <code>jsr</code> and <code>jmp</code> instructions whose
|
||||
targets are within eight bits, and turns them into eight-bit
|
||||
program-counter relative <code>bsr</code> and <code>bra</code> instructions,
|
||||
respectively.
|
||||
|
||||
<p><span class="command">ld</span> also looks at all 16-bit extended addressing modes and
|
||||
transforms them in a direct addressing mode when the address is in
|
||||
page 0 (between 0 and 0x0ff).
|
||||
|
||||
<br><dt><em>relaxing gcc instruction group</em><dd>When <span class="command">gcc</span> is called with <span class="option">-mrelax</span>, it can emit group
|
||||
of instructions that the linker can optimize to use a 68HC11 direct
|
||||
addressing mode. These instructions consists of <code>bclr</code> or
|
||||
<code>bset</code> instructions.
|
||||
|
||||
</dl>
|
||||
|
||||
<h4 class="subsection">4.3.2 Trampoline Generation</h4>
|
||||
|
||||
<p><a name="index-trampoline-generation-on-M68HC11-530"></a><a name="index-trampoline-generation-on-M68HC12-531"></a>For 68HC11 and 68HC12, <span class="command">ld</span> can generate trampoline code to
|
||||
call a far function using a normal <code>jsr</code> instruction. The linker
|
||||
will also change the relocation to some far function to use the
|
||||
trampoline address instead of the function address. This is typically the
|
||||
case when a pointer to a function is taken. The pointer will in fact
|
||||
point to the function trampoline.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>M68K - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="HPPA-ELF32.html#HPPA-ELF32" title="HPPA ELF32">
|
||||
<link rel="next" href="MMIX.html#MMIX" title="MMIX">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="M68K"></a>Next: <a rel="next" accesskey="n" href="MMIX.html#MMIX">MMIX</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.6 <span class="command">ld</span> and the Motorola 68K family</h3>
|
||||
|
||||
<p><a name="index-Motorola-68K-GOT-generation-564"></a><a name="index-_002d_002dgot_003d_0040var_007btype_007d-565"></a>The <span class="samp">--got=</span><var>type</var> option lets you choose the GOT generation scheme.
|
||||
The choices are <span class="samp">single</span>, <span class="samp">negative</span>, <span class="samp">multigot</span> and
|
||||
<span class="samp">target</span>. When <span class="samp">target</span> is selected the linker chooses
|
||||
the default GOT generation scheme for the current target.
|
||||
<span class="samp">single</span> tells the linker to generate a single GOT with
|
||||
entries only at non-negative offsets.
|
||||
<span class="samp">negative</span> instructs the linker to generate a single GOT with
|
||||
entries at both negative and positive offsets. Not all environments
|
||||
support such GOTs.
|
||||
<span class="samp">multigot</span> allows the linker to generate several GOTs in the
|
||||
output file. All GOT references from a single input object
|
||||
file access the same GOT, but references from different input object
|
||||
files might access different GOTs. Not all environments support such GOTs.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>MEMORY - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="next" href="PHDRS.html#PHDRS" title="PHDRS">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="MEMORY"></a>Next: <a rel="next" accesskey="n" href="PHDRS.html#PHDRS">PHDRS</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="SECTIONS.html#SECTIONS">SECTIONS</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.7 MEMORY Command</h3>
|
||||
|
||||
<p><a name="index-MEMORY-431"></a><a name="index-memory-regions-432"></a><a name="index-regions-of-memory-433"></a><a name="index-allocating-memory-434"></a><a name="index-discontinuous-memory-435"></a>The linker's default configuration permits allocation of all available
|
||||
memory. You can override this by using the <code>MEMORY</code> command.
|
||||
|
||||
<p>The <code>MEMORY</code> command describes the location and size of blocks of
|
||||
memory in the target. You can use it to describe which memory regions
|
||||
may be used by the linker, and which memory regions it must avoid. You
|
||||
can then assign sections to particular memory regions. The linker will
|
||||
set section addresses based on the memory regions, and will warn about
|
||||
regions that become too full. The linker will not shuffle sections
|
||||
around to fit into the available regions.
|
||||
|
||||
<p>A linker script may contain at most one use of the <code>MEMORY</code>
|
||||
command. However, you can define as many blocks of memory within it as
|
||||
you wish. The syntax is:
|
||||
<pre class="smallexample"> MEMORY
|
||||
{
|
||||
<var>name</var> [(<var>attr</var>)] : ORIGIN = <var>origin</var>, LENGTH = <var>len</var>
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
<p>The <var>name</var> is a name used in the linker script to refer to the
|
||||
region. The region name has no meaning outside of the linker script.
|
||||
Region names are stored in a separate name space, and will not conflict
|
||||
with symbol names, file names, or section names. Each memory region
|
||||
must have a distinct name.
|
||||
|
||||
<p><a name="index-memory-region-attributes-436"></a>The <var>attr</var> string is an optional list of attributes that specify
|
||||
whether to use a particular memory region for an input section which is
|
||||
not explicitly mapped in the linker script. As described in
|
||||
<a href="SECTIONS.html#SECTIONS">SECTIONS</a>, if you do not specify an output section for some input
|
||||
section, the linker will create an output section with the same name as
|
||||
the input section. If you define region attributes, the linker will use
|
||||
them to select the memory region for the output section that it creates.
|
||||
|
||||
<p>The <var>attr</var> string must consist only of the following characters:
|
||||
<dl>
|
||||
<dt><span class="samp">R</span><dd>Read-only section
|
||||
<br><dt><span class="samp">W</span><dd>Read/write section
|
||||
<br><dt><span class="samp">X</span><dd>Executable section
|
||||
<br><dt><span class="samp">A</span><dd>Allocatable section
|
||||
<br><dt><span class="samp">I</span><dd>Initialized section
|
||||
<br><dt><span class="samp">L</span><dd>Same as <span class="samp">I</span>
|
||||
<br><dt><span class="samp">!</span><dd>Invert the sense of any of the preceding attributes
|
||||
</dl>
|
||||
|
||||
<p>If a unmapped section matches any of the listed attributes other than
|
||||
<span class="samp">!</span>, it will be placed in the memory region. The <span class="samp">!</span>
|
||||
attribute reverses this test, so that an unmapped section will be placed
|
||||
in the memory region only if it does not match any of the listed
|
||||
attributes.
|
||||
|
||||
<p><a name="index-ORIGIN-_003d-437"></a><a name="index-o-_003d-438"></a><a name="index-org-_003d-439"></a>The <var>origin</var> is an numerical expression for the start address of
|
||||
the memory region. The expression must evaluate to a constant and it
|
||||
cannot involve any symbols. The keyword <code>ORIGIN</code> may be
|
||||
abbreviated to <code>org</code> or <code>o</code> (but not, for example,
|
||||
<code>ORG</code>).
|
||||
|
||||
<p><a name="index-LENGTH-_003d-440"></a><a name="index-len-_003d-441"></a><a name="index-l-_003d-442"></a>The <var>len</var> is an expression for the size in bytes of the memory
|
||||
region. As with the <var>origin</var> expression, the expression must
|
||||
be numerical only and must evaluate to a constant. The keyword
|
||||
<code>LENGTH</code> may be abbreviated to <code>len</code> or <code>l</code>.
|
||||
|
||||
<p>In the following example, we specify that there are two memory regions
|
||||
available for allocation: one starting at <span class="samp">0</span> for 256 kilobytes,
|
||||
and the other starting at <span class="samp">0x40000000</span> for four megabytes. The
|
||||
linker will place into the <span class="samp">rom</span> memory region every section which
|
||||
is not explicitly mapped into a memory region, and is either read-only
|
||||
or executable. The linker will place other sections which are not
|
||||
explicitly mapped into a memory region into the <span class="samp">ram</span> memory
|
||||
region.
|
||||
|
||||
<pre class="smallexample"> MEMORY
|
||||
{
|
||||
rom (rx) : ORIGIN = 0, LENGTH = 256K
|
||||
ram (!rx) : org = 0x40000000, l = 4M
|
||||
}
|
||||
</pre>
|
||||
<p>Once you define a memory region, you can direct the linker to place
|
||||
specific output sections into that memory region by using the
|
||||
<span class="samp">></span><var>region</var> output section attribute. For example, if you have
|
||||
a memory region named <span class="samp">mem</span>, you would use <span class="samp">>mem</span> in the
|
||||
output section definition. See <a href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a>. If no address
|
||||
was specified for the output section, the linker will set the address to
|
||||
the next available address within the memory region. If the combined
|
||||
output sections directed to a memory region are too large for the
|
||||
region, the linker will issue an error message.
|
||||
|
||||
<p>It is possible to access the origin and length of a memory in an
|
||||
expression via the <code>ORIGIN(</code><var>memory</var><code>)</code> and
|
||||
<code>LENGTH(</code><var>memory</var><code>)</code> functions:
|
||||
|
||||
<pre class="smallexample"> _fstack = ORIGIN(ram) + LENGTH(ram) - 4;
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>MMIX - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="M68K.html#M68K" title="M68K">
|
||||
<link rel="next" href="MSP430.html#MSP430" title="MSP430">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="MMIX"></a>Next: <a rel="next" accesskey="n" href="MSP430.html#MSP430">MSP430</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="M68K.html#M68K">M68K</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.7 <code>ld</code> and MMIX</h3>
|
||||
|
||||
<p>For MMIX, there is a choice of generating <code>ELF</code> object files or
|
||||
<code>mmo</code> object files when linking. The simulator <code>mmix</code>
|
||||
understands the <code>mmo</code> format. The binutils <code>objcopy</code> utility
|
||||
can translate between the two formats.
|
||||
|
||||
<p>There is one special section, the <span class="samp">.MMIX.reg_contents</span> section.
|
||||
Contents in this section is assumed to correspond to that of global
|
||||
registers, and symbols referring to it are translated to special symbols,
|
||||
equal to registers. In a final link, the start address of the
|
||||
<span class="samp">.MMIX.reg_contents</span> section corresponds to the first allocated
|
||||
global register multiplied by 8. Register <code>$255</code> is not included in
|
||||
this section; it is always set to the program entry, which is at the
|
||||
symbol <code>Main</code> for <code>mmo</code> files.
|
||||
|
||||
<p>Global symbols with the prefix <code>__.MMIX.start.</code>, for example
|
||||
<code>__.MMIX.start..text</code> and <code>__.MMIX.start..data</code> are special.
|
||||
The default linker script uses these to set the default start address
|
||||
of a section.
|
||||
|
||||
<p>Initial and trailing multiples of zero-valued 32-bit words in a section,
|
||||
are left out from an mmo file.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>MRI - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Reporting-Bugs.html#Reporting-Bugs" title="Reporting Bugs">
|
||||
<link rel="next" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" title="GNU Free Documentation License">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="MRI"></a>Next: <a rel="next" accesskey="n" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="appendix">Appendix A MRI Compatible Script Files</h2>
|
||||
|
||||
<p><a name="index-MRI-compatibility-648"></a>To aid users making the transition to <span class="sc">gnu</span> <span class="command">ld</span> from the MRI
|
||||
linker, <span class="command">ld</span> can use MRI compatible linker scripts as an
|
||||
alternative to the more general-purpose linker scripting language
|
||||
described in <a href="Scripts.html#Scripts">Scripts</a>. MRI compatible linker scripts have a much
|
||||
simpler command set than the scripting language otherwise used with
|
||||
<span class="command">ld</span>. <span class="sc">gnu</span> <span class="command">ld</span> supports the most commonly used MRI
|
||||
linker commands; these commands are described here.
|
||||
|
||||
<p>In general, MRI scripts aren't of much use with the <code>a.out</code> object
|
||||
file format, since it only has three sections and MRI scripts lack some
|
||||
features to make use of them.
|
||||
|
||||
<p>You can specify a file containing an MRI-compatible script using the
|
||||
<span class="samp">-c</span> command-line option.
|
||||
|
||||
<p>Each command in an MRI-compatible script occupies its own line; each
|
||||
command line starts with the keyword that identifies the command (though
|
||||
blank lines are also allowed for punctuation). If a line of an
|
||||
MRI-compatible script begins with an unrecognized keyword, <span class="command">ld</span>
|
||||
issues a warning message, but continues processing the script.
|
||||
|
||||
<p>Lines beginning with <span class="samp">*</span> are comments.
|
||||
|
||||
<p>You can write these commands using all upper-case letters, or all
|
||||
lower case; for example, <span class="samp">chip</span> is the same as <span class="samp">CHIP</span>.
|
||||
The following list shows only the upper-case form of each command.
|
||||
|
||||
|
||||
<a name="index-_0040code_007bABSOLUTE_007d-_0028MRI_0029-649"></a>
|
||||
<dl><dt><code>ABSOLUTE </code><var>secname</var><dt><code>ABSOLUTE </code><var>secname</var><code>, </code><var>secname</var><code>, ... </code><var>secname</var><dd>Normally, <span class="command">ld</span> includes in the output file all sections from all
|
||||
the input files. However, in an MRI-compatible script, you can use the
|
||||
<code>ABSOLUTE</code> command to restrict the sections that will be present in
|
||||
your output program. If the <code>ABSOLUTE</code> command is used at all in a
|
||||
script, then only the sections named explicitly in <code>ABSOLUTE</code>
|
||||
commands will appear in the linker output. You can still use other
|
||||
input sections (whatever you select on the command line, or using
|
||||
<code>LOAD</code>) to resolve addresses in the output file.
|
||||
|
||||
<p><a name="index-_0040code_007bALIAS_007d-_0028MRI_0029-650"></a><br><dt><code>ALIAS </code><var>out-secname</var><code>, </code><var>in-secname</var><dd>Use this command to place the data from input section <var>in-secname</var>
|
||||
in a section called <var>out-secname</var> in the linker output file.
|
||||
|
||||
<p><var>in-secname</var> may be an integer.
|
||||
|
||||
<p><a name="index-_0040code_007bALIGN_007d-_0028MRI_0029-651"></a><br><dt><code>ALIGN </code><var>secname</var><code> = </code><var>expression</var><dd>Align the section called <var>secname</var> to <var>expression</var>. The
|
||||
<var>expression</var> should be a power of two.
|
||||
|
||||
<p><a name="index-_0040code_007bBASE_007d-_0028MRI_0029-652"></a><br><dt><code>BASE </code><var>expression</var><dd>Use the value of <var>expression</var> as the lowest address (other than
|
||||
absolute addresses) in the output file.
|
||||
|
||||
<p><a name="index-_0040code_007bCHIP_007d-_0028MRI_0029-653"></a><br><dt><code>CHIP </code><var>expression</var><dt><code>CHIP </code><var>expression</var><code>, </code><var>expression</var><dd>This command does nothing; it is accepted only for compatibility.
|
||||
|
||||
<p><a name="index-_0040code_007bEND_007d-_0028MRI_0029-654"></a><br><dt><code>END</code><dd>This command does nothing whatever; it's only accepted for compatibility.
|
||||
|
||||
<p><a name="index-_0040code_007bFORMAT_007d-_0028MRI_0029-655"></a><br><dt><code>FORMAT </code><var>output-format</var><dd>Similar to the <code>OUTPUT_FORMAT</code> command in the more general linker
|
||||
language, but restricted to one of these output formats:
|
||||
|
||||
<ol type=1 start=1>
|
||||
<li>S-records, if <var>output-format</var> is <span class="samp">S</span>
|
||||
|
||||
<li>IEEE, if <var>output-format</var> is <span class="samp">IEEE</span>
|
||||
|
||||
<li>COFF (the <span class="samp">coff-m68k</span> variant in BFD), if <var>output-format</var> is
|
||||
<span class="samp">COFF</span>
|
||||
</ol>
|
||||
|
||||
<p><a name="index-_0040code_007bLIST_007d-_0028MRI_0029-656"></a><br><dt><code>LIST </code><var>anything</var><code>...</code><dd>Print (to the standard output file) a link map, as produced by the
|
||||
<span class="command">ld</span> command-line option <span class="samp">-M</span>.
|
||||
|
||||
<p>The keyword <code>LIST</code> may be followed by anything on the
|
||||
same line, with no change in its effect.
|
||||
|
||||
<p><a name="index-_0040code_007bLOAD_007d-_0028MRI_0029-657"></a><br><dt><code>LOAD </code><var>filename</var><dt><code>LOAD </code><var>filename</var><code>, </code><var>filename</var><code>, ... </code><var>filename</var><dd>Include one or more object file <var>filename</var> in the link; this has the
|
||||
same effect as specifying <var>filename</var> directly on the <span class="command">ld</span>
|
||||
command line.
|
||||
|
||||
<p><a name="index-_0040code_007bNAME_007d-_0028MRI_0029-658"></a><br><dt><code>NAME </code><var>output-name</var><dd><var>output-name</var> is the name for the program produced by <span class="command">ld</span>; the
|
||||
MRI-compatible command <code>NAME</code> is equivalent to the command-line
|
||||
option <span class="samp">-o</span> or the general script language command <code>OUTPUT</code>.
|
||||
|
||||
<p><a name="index-_0040code_007bORDER_007d-_0028MRI_0029-659"></a><br><dt><code>ORDER </code><var>secname</var><code>, </code><var>secname</var><code>, ... </code><var>secname</var><dt><code>ORDER </code><var>secname</var> <var>secname</var> <var>secname</var><dd>Normally, <span class="command">ld</span> orders the sections in its output file in the
|
||||
order in which they first appear in the input files. In an MRI-compatible
|
||||
script, you can override this ordering with the <code>ORDER</code> command. The
|
||||
sections you list with <code>ORDER</code> will appear first in your output
|
||||
file, in the order specified.
|
||||
|
||||
<p><a name="index-_0040code_007bPUBLIC_007d-_0028MRI_0029-660"></a><br><dt><code>PUBLIC </code><var>name</var><code>=</code><var>expression</var><dt><code>PUBLIC </code><var>name</var><code>,</code><var>expression</var><dt><code>PUBLIC </code><var>name</var> <var>expression</var><dd>Supply a value (<var>expression</var>) for external symbol
|
||||
<var>name</var> used in the linker input files.
|
||||
|
||||
<p><a name="index-_0040code_007bSECT_007d-_0028MRI_0029-661"></a><br><dt><code>SECT </code><var>secname</var><code>, </code><var>expression</var><dt><code>SECT </code><var>secname</var><code>=</code><var>expression</var><dt><code>SECT </code><var>secname</var> <var>expression</var><dd>You can use any of these three forms of the <code>SECT</code> command to
|
||||
specify the start address (<var>expression</var>) for section <var>secname</var>.
|
||||
If you have more than one <code>SECT</code> statement for the same
|
||||
<var>secname</var>, only the <em>first</em> sets the start address.
|
||||
</dl>
|
||||
|
||||
<!-- *-texinfo-*- -->
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>MSP430 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="MMIX.html#MMIX" title="MMIX">
|
||||
<link rel="next" href="M68HC11_002f68HC12.html#M68HC11_002f68HC12" title="M68HC11/68HC12">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="MSP430"></a>Next: <a rel="next" accesskey="n" href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="MMIX.html#MMIX">MMIX</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.8 <code>ld</code> and MSP430</h3>
|
||||
|
||||
<p>For the MSP430 it is possible to select the MPU architecture. The flag <span class="samp">-m [mpu type]</span>
|
||||
will select an appropriate linker script for selected MPU type. (To get a list of known MPUs
|
||||
just pass <span class="samp">-m help</span> option to the linker).
|
||||
|
||||
<p><a name="index-MSP430-extra-sections-566"></a>The linker will recognize some extra sections which are MSP430 specific:
|
||||
|
||||
<dl>
|
||||
<dt><span class="samp">.vectors</span><dd>Defines a portion of ROM where interrupt vectors located.
|
||||
|
||||
<br><dt><span class="samp">.bootloader</span><dd>Defines the bootloader portion of the ROM (if applicable). Any code
|
||||
in this section will be uploaded to the MPU.
|
||||
|
||||
<br><dt><span class="samp">.infomem</span><dd>Defines an information memory section (if applicable). Any code in
|
||||
this section will be uploaded to the MPU.
|
||||
|
||||
<br><dt><span class="samp">.infomemnobits</span><dd>This is the same as the <span class="samp">.infomem</span> section except that any code
|
||||
in this section will not be uploaded to the MPU.
|
||||
|
||||
<br><dt><span class="samp">.noinit</span><dd>Denotes a portion of RAM located above <span class="samp">.bss</span> section.
|
||||
|
||||
<p>The last two sections are used by gcc.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Machine Dependent - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="next" href="BFD.html#BFD" title="BFD">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Machine-Dependent"></a>Next: <a rel="next" accesskey="n" href="BFD.html#BFD">BFD</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Scripts.html#Scripts">Scripts</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">4 Machine Dependent Features</h2>
|
||||
|
||||
<p><a name="index-machine-dependencies-521"></a><span class="command">ld</span> has additional features on some platforms; the following
|
||||
sections describe them. Machines where <span class="command">ld</span> has no additional
|
||||
functionality are not listed.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="H8_002f300.html#H8_002f300">H8/300</a>: <span class="command">ld</span> and the H8/300
|
||||
|
||||
<li><a accesskey="2" href="i960.html#i960">i960</a>: <span class="command">ld</span> and the Intel 960 family
|
||||
|
||||
<li><a accesskey="3" href="ARM.html#ARM">ARM</a>: <span class="command">ld</span> and the ARM family
|
||||
|
||||
<li><a accesskey="4" href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a>: <span class="command">ld</span> and HPPA 32-bit ELF
|
||||
|
||||
<li><a accesskey="5" href="M68K.html#M68K">M68K</a>: <span class="command">ld</span> and the Motorola 68K family
|
||||
|
||||
<li><a accesskey="6" href="MMIX.html#MMIX">MMIX</a>: <span class="command">ld</span> and MMIX
|
||||
|
||||
<li><a accesskey="7" href="MSP430.html#MSP430">MSP430</a>: <span class="command">ld</span> and MSP430
|
||||
|
||||
<li><a accesskey="8" href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a>: <code>ld</code> and the Motorola 68HC11 and 68HC12 families
|
||||
|
||||
<li><a accesskey="9" href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a>: <span class="command">ld</span> and PowerPC 32-bit ELF Support
|
||||
|
||||
<li><a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a>: <span class="command">ld</span> and PowerPC64 64-bit ELF Support
|
||||
|
||||
<li><a href="SPU-ELF.html#SPU-ELF">SPU ELF</a>: <span class="command">ld</span> and SPU ELF Support
|
||||
|
||||
<li><a href="TI-COFF.html#TI-COFF">TI COFF</a>: <span class="command">ld</span> and TI COFF
|
||||
|
||||
<li><a href="WIN32.html#WIN32">WIN32</a>: <span class="command">ld</span> and WIN32 (cygwin/mingw)
|
||||
|
||||
<li><a href="Xtensa.html#Xtensa">Xtensa</a>: <span class="command">ld</span> and Xtensa Processors
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Miscellaneous Commands - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Simple-Commands.html#Simple-Commands" title="Simple Commands">
|
||||
<link rel="prev" href="Format-Commands.html#Format-Commands" title="Format Commands">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Miscellaneous-Commands"></a>Previous: <a rel="previous" accesskey="p" href="Format-Commands.html#Format-Commands">Format Commands</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.4 Other Linker Script Commands</h4>
|
||||
|
||||
<p>There are a few other linker scripts commands.
|
||||
|
||||
<dl>
|
||||
<dt><code>ASSERT(</code><var>exp</var><code>, </code><var>message</var><code>)</code><dd><a name="index-ASSERT-341"></a><a name="index-assertion-in-linker-script-342"></a>Ensure that <var>exp</var> is non-zero. If it is zero, then exit the linker
|
||||
with an error code, and print <var>message</var>.
|
||||
|
||||
<br><dt><code>EXTERN(</code><var>symbol</var> <var>symbol</var><code> ...)</code><dd><a name="index-EXTERN-343"></a><a name="index-undefined-symbol-in-linker-script-344"></a>Force <var>symbol</var> to be entered in the output file as an undefined
|
||||
symbol. Doing this may, for example, trigger linking of additional
|
||||
modules from standard libraries. You may list several <var>symbol</var>s for
|
||||
each <code>EXTERN</code>, and you may use <code>EXTERN</code> multiple times. This
|
||||
command has the same effect as the <span class="samp">-u</span> command-line option.
|
||||
|
||||
<br><dt><code>FORCE_COMMON_ALLOCATION</code><dd><a name="index-FORCE_005fCOMMON_005fALLOCATION-345"></a><a name="index-common-allocation-in-linker-script-346"></a>This command has the same effect as the <span class="samp">-d</span> command-line option:
|
||||
to make <span class="command">ld</span> assign space to common symbols even if a relocatable
|
||||
output file is specified (<span class="samp">-r</span>).
|
||||
|
||||
<br><dt><code>INHIBIT_COMMON_ALLOCATION</code><dd><a name="index-INHIBIT_005fCOMMON_005fALLOCATION-347"></a><a name="index-common-allocation-in-linker-script-348"></a>This command has the same effect as the <span class="samp">--no-define-common</span>
|
||||
command-line option: to make <code>ld</code> omit the assignment of addresses
|
||||
to common symbols even for a non-relocatable output file.
|
||||
|
||||
<br><dt><code>INSERT [ AFTER | BEFORE ] </code><var>output_section</var><dd><a name="index-INSERT-349"></a><a name="index-insert-user-script-into-default-script-350"></a>This command is typically used in a script specified by <span class="samp">-T</span> to
|
||||
augment the default <code>SECTIONS</code> with, for example, overlays. It
|
||||
inserts all prior linker script statements after (or before)
|
||||
<var>output_section</var>, and also causes <span class="samp">-T</span> to not override the
|
||||
default linker script. The exact insertion point is as for orphan
|
||||
sections. See <a href="Location-Counter.html#Location-Counter">Location Counter</a>. The insertion happens after the
|
||||
linker has mapped input sections to output sections. Prior to the
|
||||
insertion, since <span class="samp">-T</span> scripts are parsed before the default
|
||||
linker script, statements in the <span class="samp">-T</span> script occur before the
|
||||
default linker script statements in the internal linker representation
|
||||
of the script. In particular, input section assignments will be made
|
||||
to <span class="samp">-T</span> output sections before those in the default script. Here
|
||||
is an example of how a <span class="samp">-T</span> script using <code>INSERT</code> might look:
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
OVERLAY :
|
||||
{
|
||||
.ov1 { ov1*(.text) }
|
||||
.ov2 { ov2*(.text) }
|
||||
}
|
||||
}
|
||||
INSERT AFTER .text;
|
||||
</pre>
|
||||
<br><dt><code>NOCROSSREFS(</code><var>section</var> <var>section</var><code> ...)</code><dd><a name="index-NOCROSSREFS_0028_0040var_007bsections_007d_0029-351"></a><a name="index-cross-references-352"></a>This command may be used to tell <span class="command">ld</span> to issue an error about any
|
||||
references among certain output sections.
|
||||
|
||||
<p>In certain types of programs, particularly on embedded systems when
|
||||
using overlays, when one section is loaded into memory, another section
|
||||
will not be. Any direct references between the two sections would be
|
||||
errors. For example, it would be an error if code in one section called
|
||||
a function defined in the other section.
|
||||
|
||||
<p>The <code>NOCROSSREFS</code> command takes a list of output section names. If
|
||||
<span class="command">ld</span> detects any cross references between the sections, it reports
|
||||
an error and returns a non-zero exit status. Note that the
|
||||
<code>NOCROSSREFS</code> command uses output section names, not input section
|
||||
names.
|
||||
|
||||
<br><dt><code>OUTPUT_ARCH(</code><var>bfdarch</var><code>)</code><dd><a name="index-OUTPUT_005fARCH_0028_0040var_007bbfdarch_007d_0029-353"></a><a name="index-machine-architecture-354"></a><a name="index-architecture-355"></a>Specify a particular output machine architecture. The argument is one
|
||||
of the names used by the BFD library (see <a href="BFD.html#BFD">BFD</a>). You can see the
|
||||
architecture of an object file by using the <code>objdump</code> program with
|
||||
the <span class="samp">-f</span> option.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Operators - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Location-Counter.html#Location-Counter" title="Location Counter">
|
||||
<link rel="next" href="Evaluation.html#Evaluation" title="Evaluation">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Operators"></a>Next: <a rel="next" accesskey="n" href="Evaluation.html#Evaluation">Evaluation</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Location-Counter.html#Location-Counter">Location Counter</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.5 Operators</h4>
|
||||
|
||||
<p><a name="index-operators-for-arithmetic-475"></a><a name="index-arithmetic-operators-476"></a><a name="index-precedence-in-expressions-477"></a>The linker recognizes the standard C set of arithmetic operators, with
|
||||
the standard bindings and precedence levels:
|
||||
<!-- TEXI2ROFF-KILL -->
|
||||
<!-- END TEXI2ROFF-KILL -->
|
||||
<pre class="smallexample"> precedence associativity Operators Notes
|
||||
(highest)
|
||||
1 left ! - ~ (1)
|
||||
2 left * / %
|
||||
3 left + -
|
||||
4 left >> <<
|
||||
5 left == != > < <= >=
|
||||
6 left &
|
||||
7 left |
|
||||
8 left &&
|
||||
9 left ||
|
||||
10 right ? :
|
||||
11 right &= += -= *= /= (2)
|
||||
(lowest)
|
||||
</pre>
|
||||
<p>Notes:
|
||||
(1) Prefix operators
|
||||
(2) See <a href="Assignments.html#Assignments">Assignments</a>.
|
||||
<!-- TEXI2ROFF-KILL -->
|
||||
<!-- END TEXI2ROFF-KILL -->
|
||||
|
||||
</body></html>
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,71 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Orphan Sections - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Symbols.html#Symbols" title="Symbols">
|
||||
<link rel="next" href="Location-Counter.html#Location-Counter" title="Location Counter">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Orphan-Sections"></a>Next: <a rel="next" accesskey="n" href="Location-Counter.html#Location-Counter">Location Counter</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Symbols.html#Symbols">Symbols</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.3 Orphan Sections</h4>
|
||||
|
||||
<p><a name="index-orphan-467"></a>Orphan sections are sections present in the input files which
|
||||
are not explicitly placed into the output file by the linker
|
||||
script. The linker will still copy these sections into the
|
||||
output file, but it has to guess as to where they should be
|
||||
placed. The linker uses a simple heuristic to do this. It
|
||||
attempts to place orphan sections after non-orphan sections of the
|
||||
same attribute, such as code vs data, loadable vs non-loadable, etc.
|
||||
If there is not enough room to do this then it places
|
||||
at the end of the file.
|
||||
|
||||
<p>For ELF targets, the attribute of the section includes section type as
|
||||
well as section flag.
|
||||
|
||||
<p>If an orphaned section's name is representable as a C identifier then
|
||||
the linker will automatically see <a href="PROVIDE.html#PROVIDE">PROVIDE</a> two symbols:
|
||||
__start_SECNAME and __end_SECNAME, where SECNAME is the name of the
|
||||
section. These indicate the start address and end address of the
|
||||
orphaned section respectively. Note: most section names are not
|
||||
representable as C identifiers because they contain a <span class="samp">.</span>
|
||||
character.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Address - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Output-Section-Name.html#Output-Section-Name" title="Output Section Name">
|
||||
<link rel="next" href="Input-Section.html#Input-Section" title="Input Section">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Address"></a>Next: <a rel="next" accesskey="n" href="Input-Section.html#Input-Section">Input Section</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Name.html#Output-Section-Name">Output Section Name</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.3 Output Section Address</h4>
|
||||
|
||||
<p><a name="index-address_002c-section-364"></a><a name="index-section-address-365"></a>The <var>address</var> is an expression for the VMA (the virtual memory
|
||||
address) of the output section. If you do not provide <var>address</var>,
|
||||
the linker will set it based on <var>region</var> if present, or otherwise
|
||||
based on the current value of the location counter.
|
||||
|
||||
<p>If you provide <var>address</var>, the address of the output section will be
|
||||
set to precisely that. If you provide neither <var>address</var> nor
|
||||
<var>region</var>, then the address of the output section will be set to the
|
||||
current value of the location counter aligned to the alignment
|
||||
requirements of the output section. The alignment requirement of the
|
||||
output section is the strictest alignment of any input section contained
|
||||
within the output section.
|
||||
|
||||
<p>For example,
|
||||
<pre class="smallexample"> .text . : { *(.text) }
|
||||
</pre>
|
||||
<p class="noindent">and
|
||||
<pre class="smallexample"> .text : { *(.text) }
|
||||
</pre>
|
||||
<p class="noindent">are subtly different. The first will set the address of the
|
||||
<span class="samp">.text</span> output section to the current value of the location
|
||||
counter. The second will set it to the current value of the location
|
||||
counter aligned to the strictest alignment of a <span class="samp">.text</span> input
|
||||
section.
|
||||
|
||||
<p>The <var>address</var> may be an arbitrary expression; <a href="Expressions.html#Expressions">Expressions</a>.
|
||||
For example, if you want to align the section on a 0x10 byte boundary,
|
||||
so that the lowest four bits of the section address are zero, you could
|
||||
do something like this:
|
||||
<pre class="smallexample"> .text ALIGN(0x10) : { *(.text) }
|
||||
</pre>
|
||||
<p class="noindent">This works because <code>ALIGN</code> returns the current location counter
|
||||
aligned upward to the specified value.
|
||||
|
||||
<p>Specifying <var>address</var> for a section will change the value of the
|
||||
location counter.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Attributes - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Output-Section-Discarding.html#Output-Section-Discarding" title="Output Section Discarding">
|
||||
<link rel="next" href="Overlay-Description.html#Overlay-Description" title="Overlay Description">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Attributes"></a>Next: <a rel="next" accesskey="n" href="Overlay-Description.html#Overlay-Description">Overlay Description</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.8 Output Section Attributes</h4>
|
||||
|
||||
<p><a name="index-output-section-attributes-404"></a>We showed above that the full description of an output section looked
|
||||
like this:
|
||||
<pre class="smallexample"> <var>section</var> [<var>address</var>] [(<var>type</var>)] :
|
||||
[AT(<var>lma</var>)] [ALIGN(<var>section_align</var>)] [SUBALIGN(<var>subsection_align</var>)]
|
||||
{
|
||||
<var>output-section-command</var>
|
||||
<var>output-section-command</var>
|
||||
...
|
||||
} [><var>region</var>] [AT><var>lma_region</var>] [:<var>phdr</var> :<var>phdr</var> ...] [=<var>fillexp</var>]
|
||||
</pre>
|
||||
<p>We've already described <var>section</var>, <var>address</var>, and
|
||||
<var>output-section-command</var>. In this section we will describe the
|
||||
remaining section attributes.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Output-Section-Type.html#Output-Section-Type">Output Section Type</a>: Output section type
|
||||
<li><a accesskey="2" href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a>: Output section LMA
|
||||
<li><a accesskey="3" href="Forced-Output-Alignment.html#Forced-Output-Alignment">Forced Output Alignment</a>: Forced Output Alignment
|
||||
<li><a accesskey="4" href="Forced-Input-Alignment.html#Forced-Input-Alignment">Forced Input Alignment</a>: Forced Input Alignment
|
||||
<li><a accesskey="5" href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a>: Output section region
|
||||
<li><a accesskey="6" href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a>: Output section phdr
|
||||
<li><a accesskey="7" href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a>: Output section fill
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Data - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Input-Section.html#Input-Section" title="Input Section">
|
||||
<link rel="next" href="Output-Section-Keywords.html#Output-Section-Keywords" title="Output Section Keywords">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Data"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Input-Section.html#Input-Section">Input Section</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.5 Output Section Data</h4>
|
||||
|
||||
<p><a name="index-data-383"></a><a name="index-section-data-384"></a><a name="index-output-section-data-385"></a><a name="index-BYTE_0028_0040var_007bexpression_007d_0029-386"></a><a name="index-SHORT_0028_0040var_007bexpression_007d_0029-387"></a><a name="index-LONG_0028_0040var_007bexpression_007d_0029-388"></a><a name="index-QUAD_0028_0040var_007bexpression_007d_0029-389"></a><a name="index-SQUAD_0028_0040var_007bexpression_007d_0029-390"></a>You can include explicit bytes of data in an output section by using
|
||||
<code>BYTE</code>, <code>SHORT</code>, <code>LONG</code>, <code>QUAD</code>, or <code>SQUAD</code> as
|
||||
an output section command. Each keyword is followed by an expression in
|
||||
parentheses providing the value to store (see <a href="Expressions.html#Expressions">Expressions</a>). The
|
||||
value of the expression is stored at the current value of the location
|
||||
counter.
|
||||
|
||||
<p>The <code>BYTE</code>, <code>SHORT</code>, <code>LONG</code>, and <code>QUAD</code> commands
|
||||
store one, two, four, and eight bytes (respectively). After storing the
|
||||
bytes, the location counter is incremented by the number of bytes
|
||||
stored.
|
||||
|
||||
<p>For example, this will store the byte 1 followed by the four byte value
|
||||
of the symbol <span class="samp">addr</span>:
|
||||
<pre class="smallexample"> BYTE(1)
|
||||
LONG(addr)
|
||||
</pre>
|
||||
<p>When using a 64 bit host or target, <code>QUAD</code> and <code>SQUAD</code> are the
|
||||
same; they both store an 8 byte, or 64 bit, value. When both host and
|
||||
target are 32 bits, an expression is computed as 32 bits. In this case
|
||||
<code>QUAD</code> stores a 32 bit value zero extended to 64 bits, and
|
||||
<code>SQUAD</code> stores a 32 bit value sign extended to 64 bits.
|
||||
|
||||
<p>If the object file format of the output file has an explicit endianness,
|
||||
which is the normal case, the value will be stored in that endianness.
|
||||
When the object file format does not have an explicit endianness, as is
|
||||
true of, for example, S-records, the value will be stored in the
|
||||
endianness of the first input object file.
|
||||
|
||||
<p>Note—these commands only work inside a section description and not
|
||||
between them, so the following will produce an error from the linker:
|
||||
<pre class="smallexample"> SECTIONS { .text : { *(.text) } LONG(1) .data : { *(.data) } }</pre>
|
||||
<p>whereas this will work:
|
||||
<pre class="smallexample"> SECTIONS { .text : { *(.text) ; LONG(1) } .data : { *(.data) } }</pre>
|
||||
<p><a name="index-FILL_0028_0040var_007bexpression_007d_0029-391"></a><a name="index-holes_002c-filling-392"></a><a name="index-unspecified-memory-393"></a>You may use the <code>FILL</code> command to set the fill pattern for the
|
||||
current section. It is followed by an expression in parentheses. Any
|
||||
otherwise unspecified regions of memory within the section (for example,
|
||||
gaps left due to the required alignment of input sections) are filled
|
||||
with the value of the expression, repeated as
|
||||
necessary. A <code>FILL</code> statement covers memory locations after the
|
||||
point at which it occurs in the section definition; by including more
|
||||
than one <code>FILL</code> statement, you can have different fill patterns in
|
||||
different parts of an output section.
|
||||
|
||||
<p>This example shows how to fill unspecified regions of memory with the
|
||||
value <span class="samp">0x90</span>:
|
||||
<pre class="smallexample"> FILL(0x90909090)
|
||||
</pre>
|
||||
<p>The <code>FILL</code> command is similar to the <span class="samp">=</span><var>fillexp</var> output
|
||||
section attribute, but it only affects the
|
||||
part of the section following the <code>FILL</code> command, rather than the
|
||||
entire section. If both are used, the <code>FILL</code> command takes
|
||||
precedence. See <a href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a>, for details on the fill
|
||||
expression.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Description - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="next" href="Output-Section-Name.html#Output-Section-Name" title="Output Section Name">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Description"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Name.html#Output-Section-Name">Output Section Name</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.1 Output Section Description</h4>
|
||||
|
||||
<p>The full description of an output section looks like this:
|
||||
<pre class="smallexample"> <var>section</var> [<var>address</var>] [(<var>type</var>)] :
|
||||
[AT(<var>lma</var>)] [ALIGN(<var>section_align</var>)] [SUBALIGN(<var>subsection_align</var>)]
|
||||
{
|
||||
<var>output-section-command</var>
|
||||
<var>output-section-command</var>
|
||||
...
|
||||
} [><var>region</var>] [AT><var>lma_region</var>] [:<var>phdr</var> :<var>phdr</var> ...] [=<var>fillexp</var>]
|
||||
</pre>
|
||||
<p>Most output sections do not use most of the optional section attributes.
|
||||
|
||||
<p>The whitespace around <var>section</var> is required, so that the section
|
||||
name is unambiguous. The colon and the curly braces are also required.
|
||||
The line breaks and other white space are optional.
|
||||
|
||||
<p>Each <var>output-section-command</var> may be one of the following:
|
||||
|
||||
<ul>
|
||||
<li>a symbol assignment (see <a href="Assignments.html#Assignments">Assignments</a>)
|
||||
<li>an input section description (see <a href="Input-Section.html#Input-Section">Input Section</a>)
|
||||
<li>data values to include directly (see <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a>)
|
||||
<li>a special output section keyword (see <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a>)
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Discarding - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Output-Section-Keywords.html#Output-Section-Keywords" title="Output Section Keywords">
|
||||
<link rel="next" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Discarding"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.7 Output Section Discarding</h4>
|
||||
|
||||
<p><a name="index-discarding-sections-400"></a><a name="index-sections_002c-discarding-401"></a><a name="index-removing-sections-402"></a>The linker will not create output sections with no contents. This is
|
||||
for convenience when referring to input sections that may or may not
|
||||
be present in any of the input files. For example:
|
||||
<pre class="smallexample"> .foo : { *(.foo) }
|
||||
</pre>
|
||||
<p class="noindent">will only create a <span class="samp">.foo</span> section in the output file if there is a
|
||||
<span class="samp">.foo</span> section in at least one input file, and if the input
|
||||
sections are not all empty. Other link script directives that allocate
|
||||
space in an output section will also create the output section.
|
||||
|
||||
<p>The linker will ignore address assignments (see <a href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a>)
|
||||
on discarded output sections, except when the linker script defines
|
||||
symbols in the output section. In that case the linker will obey
|
||||
the address assignments, possibly advancing dot even though the
|
||||
section is discarded.
|
||||
|
||||
<p><a name="index-_002fDISCARD_002f-403"></a>The special output section name <span class="samp">/DISCARD/</span> may be used to discard
|
||||
input sections. Any input sections which are assigned to an output
|
||||
section named <span class="samp">/DISCARD/</span> are not included in the output file.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Fill - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link rel="prev" href="Output-Section-Phdr.html#Output-Section-Phdr" title="Output Section Phdr">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Fill"></a>Previous: <a rel="previous" accesskey="p" href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.7 Output Section Fill</h5>
|
||||
|
||||
<p><a name="index-_003d_0040var_007bfillexp_007d-426"></a><a name="index-section-fill-pattern-427"></a><a name="index-fill-pattern_002c-entire-section-428"></a>You can set the fill pattern for an entire section by using
|
||||
<span class="samp">=</span><var>fillexp</var>. <var>fillexp</var> is an expression
|
||||
(see <a href="Expressions.html#Expressions">Expressions</a>). Any otherwise unspecified regions of memory
|
||||
within the output section (for example, gaps left due to the required
|
||||
alignment of input sections) will be filled with the value, repeated as
|
||||
necessary. If the fill expression is a simple hex number, ie. a string
|
||||
of hex digit starting with <span class="samp">0x</span> and without a trailing <span class="samp">k</span> or <span class="samp">M</span>, then
|
||||
an arbitrarily long sequence of hex digits can be used to specify the
|
||||
fill pattern; Leading zeros become part of the pattern too. For all
|
||||
other cases, including extra parentheses or a unary <code>+</code>, the fill
|
||||
pattern is the four least significant bytes of the value of the
|
||||
expression. In all cases, the number is big-endian.
|
||||
|
||||
<p>You can also change the fill value with a <code>FILL</code> command in the
|
||||
output section commands; (see <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a>).
|
||||
|
||||
<p>Here is a simple example:
|
||||
<pre class="smallexample"> SECTIONS { .text : { *(.text) } =0x90909090 }
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Keywords - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Output-Section-Data.html#Output-Section-Data" title="Output Section Data">
|
||||
<link rel="next" href="Output-Section-Discarding.html#Output-Section-Discarding" title="Output Section Discarding">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Keywords"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.6 Output Section Keywords</h4>
|
||||
|
||||
<p>There are a couple of keywords which can appear as output section
|
||||
commands.
|
||||
|
||||
|
||||
<a name="index-CREATE_005fOBJECT_005fSYMBOLS-394"></a>
|
||||
<a name="index-input-filename-symbols-395"></a>
|
||||
<a name="index-filename-symbols-396"></a>
|
||||
<dl><dt><code>CREATE_OBJECT_SYMBOLS</code><dd>The command tells the linker to create a symbol for each input file.
|
||||
The name of each symbol will be the name of the corresponding input
|
||||
file. The section of each symbol will be the output section in which
|
||||
the <code>CREATE_OBJECT_SYMBOLS</code> command appears.
|
||||
|
||||
<p>This is conventional for the a.out object file format. It is not
|
||||
normally used for any other object file format.
|
||||
|
||||
<p><a name="index-CONSTRUCTORS-397"></a><a name="index-C_002b_002b-constructors_002c-arranging-in-link-398"></a><a name="index-constructors_002c-arranging-in-link-399"></a><br><dt><code>CONSTRUCTORS</code><dd>When linking using the a.out object file format, the linker uses an
|
||||
unusual set construct to support C++ global constructors and
|
||||
destructors. When linking object file formats which do not support
|
||||
arbitrary sections, such as ECOFF and XCOFF, the linker will
|
||||
automatically recognize C++ global constructors and destructors by name.
|
||||
For these object file formats, the <code>CONSTRUCTORS</code> command tells the
|
||||
linker to place constructor information in the output section where the
|
||||
<code>CONSTRUCTORS</code> command appears. The <code>CONSTRUCTORS</code> command is
|
||||
ignored for other object file formats.
|
||||
|
||||
<p>The symbol <code>__CTOR_LIST__</code><!-- /@w --> marks the start of the global
|
||||
constructors, and the symbol <code>__CTOR_END__</code><!-- /@w --> marks the end.
|
||||
Similarly, <code>__DTOR_LIST__</code><!-- /@w --> and <code>__DTOR_END__</code><!-- /@w --> mark
|
||||
the start and end of the global destructors. The
|
||||
first word in the list is the number of entries, followed by the address
|
||||
of each constructor or destructor, followed by a zero word. The
|
||||
compiler must arrange to actually run the code. For these object file
|
||||
formats <span class="sc">gnu</span> C++ normally calls constructors from a subroutine
|
||||
<code>__main</code>; a call to <code>__main</code> is automatically inserted into
|
||||
the startup code for <code>main</code>. <span class="sc">gnu</span> C++ normally runs
|
||||
destructors either by using <code>atexit</code>, or directly from the function
|
||||
<code>exit</code>.
|
||||
|
||||
<p>For object file formats such as <code>COFF</code> or <code>ELF</code> which support
|
||||
arbitrary section names, <span class="sc">gnu</span> C++ will normally arrange to put the
|
||||
addresses of global constructors and destructors into the <code>.ctors</code>
|
||||
and <code>.dtors</code> sections. Placing the following sequence into your
|
||||
linker script will build the sort of table which the <span class="sc">gnu</span> C++
|
||||
runtime code expects to see.
|
||||
|
||||
<pre class="smallexample"> __CTOR_LIST__ = .;
|
||||
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
|
||||
*(.ctors)
|
||||
LONG(0)
|
||||
__CTOR_END__ = .;
|
||||
__DTOR_LIST__ = .;
|
||||
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
|
||||
*(.dtors)
|
||||
LONG(0)
|
||||
__DTOR_END__ = .;
|
||||
</pre>
|
||||
<p>If you are using the <span class="sc">gnu</span> C++ support for initialization priority,
|
||||
which provides some control over the order in which global constructors
|
||||
are run, you must sort the constructors at link time to ensure that they
|
||||
are executed in the correct order. When using the <code>CONSTRUCTORS</code>
|
||||
command, use <span class="samp">SORT_BY_NAME(CONSTRUCTORS)</span> instead. When using the
|
||||
<code>.ctors</code> and <code>.dtors</code> sections, use <span class="samp">*(SORT_BY_NAME(.ctors))</span> and
|
||||
<span class="samp">*(SORT_BY_NAME(.dtors))</span> instead of just <span class="samp">*(.ctors)</span> and
|
||||
<span class="samp">*(.dtors)</span>.
|
||||
|
||||
<p>Normally the compiler and linker will handle these issues automatically,
|
||||
and you will not need to concern yourself with them. However, you may
|
||||
need to consider this if you are using C++ and writing your own linker
|
||||
scripts.
|
||||
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section LMA - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link rel="prev" href="Output-Section-Type.html#Output-Section-Type" title="Output Section Type">
|
||||
<link rel="next" href="Forced-Output-Alignment.html#Forced-Output-Alignment" title="Forced Output Alignment">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-LMA"></a>Next: <a rel="next" accesskey="n" href="Forced-Output-Alignment.html#Forced-Output-Alignment">Forced Output Alignment</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Type.html#Output-Section-Type">Output Section Type</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.2 Output Section LMA</h5>
|
||||
|
||||
<p><a name="index-AT_003e_0040var_007blma_005fregion_007d-408"></a><a name="index-AT_0028_0040var_007blma_007d_0029-409"></a><a name="index-load-address-410"></a><a name="index-section-load-address-411"></a>Every section has a virtual address (VMA) and a load address (LMA); see
|
||||
<a href="Basic-Script-Concepts.html#Basic-Script-Concepts">Basic Script Concepts</a>. The address expression which may appear in
|
||||
an output section description sets the VMA (see <a href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a>).
|
||||
|
||||
<p>The expression <var>lma</var> that follows the <code>AT</code> keyword specifies
|
||||
the load address of the section.
|
||||
|
||||
<p>Alternatively, with <span class="samp">AT></span><var>lma_region</var> expression, you may
|
||||
specify a memory region for the section's load address. See <a href="MEMORY.html#MEMORY">MEMORY</a>.
|
||||
Note that if the section has not had a VMA assigned to it then the
|
||||
linker will use the <var>lma_region</var> as the VMA region as well.
|
||||
|
||||
<p>If neither <code>AT</code> nor <code>AT></code> is specified for an allocatable
|
||||
section, the linker will set the LMA such that the difference between
|
||||
VMA and LMA for the section is the same as the preceding output
|
||||
section in the same region. If there is no preceding output section
|
||||
or the section is not allocatable, the linker will set the LMA equal
|
||||
to the VMA.
|
||||
See <a href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a>.
|
||||
|
||||
<p><a name="index-ROM-initialized-data-412"></a><a name="index-initialized-data-in-ROM-413"></a>This feature is designed to make it easy to build a ROM image. For
|
||||
example, the following linker script creates three output sections: one
|
||||
called <span class="samp">.text</span>, which starts at <code>0x1000</code>, one called
|
||||
<span class="samp">.mdata</span>, which is loaded at the end of the <span class="samp">.text</span> section
|
||||
even though its VMA is <code>0x2000</code>, and one called <span class="samp">.bss</span> to hold
|
||||
uninitialized data at address <code>0x3000</code>. The symbol <code>_data</code> is
|
||||
defined with the value <code>0x2000</code>, which shows that the location
|
||||
counter holds the VMA value, not the LMA value.
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
.text 0x1000 : { *(.text) _etext = . ; }
|
||||
.mdata 0x2000 :
|
||||
AT ( ADDR (.text) + SIZEOF (.text) )
|
||||
{ _data = . ; *(.data); _edata = . ; }
|
||||
.bss 0x3000 :
|
||||
{ _bstart = . ; *(.bss) *(COMMON) ; _bend = . ;}
|
||||
}
|
||||
</pre>
|
||||
<p>The run-time initialization code for use with a program generated with
|
||||
this linker script would include something like the following, to copy
|
||||
the initialized data from the ROM image to its runtime address. Notice
|
||||
how this code takes advantage of the symbols defined by the linker
|
||||
script.
|
||||
|
||||
<pre class="smallexample"> extern char _etext, _data, _edata, _bstart, _bend;
|
||||
char *src = &_etext;
|
||||
char *dst = &_data;
|
||||
|
||||
/* ROM has data at end of text; copy it. */
|
||||
while (dst < &_edata) {
|
||||
*dst++ = *src++;
|
||||
}
|
||||
|
||||
/* Zero bss */
|
||||
for (dst = &_bstart; dst< &_bend; dst++)
|
||||
*dst = 0;
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Name - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Output-Section-Description.html#Output-Section-Description" title="Output Section Description">
|
||||
<link rel="next" href="Output-Section-Address.html#Output-Section-Address" title="Output Section Address">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Name"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Description.html#Output-Section-Description">Output Section Description</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.2 Output Section Name</h4>
|
||||
|
||||
<p><a name="index-name_002c-section-362"></a><a name="index-section-name-363"></a>The name of the output section is <var>section</var>. <var>section</var> must
|
||||
meet the constraints of your output format. In formats which only
|
||||
support a limited number of sections, such as <code>a.out</code>, the name
|
||||
must be one of the names supported by the format (<code>a.out</code>, for
|
||||
example, allows only <span class="samp">.text</span>, <span class="samp">.data</span> or <span class="samp">.bss</span>). If the
|
||||
output format supports any number of sections, but with numbers and not
|
||||
names (as is the case for Oasys), the name should be supplied as a
|
||||
quoted numeric string. A section name may consist of any sequence of
|
||||
characters, but a name which contains any unusual characters such as
|
||||
commas must be quoted.
|
||||
|
||||
<p>The output section name <span class="samp">/DISCARD/</span> is special; <a href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a>.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Phdr - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link rel="prev" href="Output-Section-Region.html#Output-Section-Region" title="Output Section Region">
|
||||
<link rel="next" href="Output-Section-Fill.html#Output-Section-Fill" title="Output Section Fill">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Phdr"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.6 Output Section Phdr</h5>
|
||||
|
||||
<p><a name="index-_003a_0040var_007bphdr_007d-423"></a><a name="index-section_002c-assigning-to-program-header-424"></a><a name="index-program-headers-and-sections-425"></a>You can assign a section to a previously defined program segment by
|
||||
using <span class="samp">:</span><var>phdr</var>. See <a href="PHDRS.html#PHDRS">PHDRS</a>. If a section is assigned to
|
||||
one or more segments, then all subsequent allocated sections will be
|
||||
assigned to those segments as well, unless they use an explicitly
|
||||
<code>:</code><var>phdr</var> modifier. You can use <code>:NONE</code> to tell the
|
||||
linker to not put the section in any segment at all.
|
||||
|
||||
<p>Here is a simple example:
|
||||
<pre class="smallexample"> PHDRS { text PT_LOAD ; }
|
||||
SECTIONS { .text : { *(.text) } :text }
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Region - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link rel="prev" href="Forced-Input-Alignment.html#Forced-Input-Alignment" title="Forced Input Alignment">
|
||||
<link rel="next" href="Output-Section-Phdr.html#Output-Section-Phdr" title="Output Section Phdr">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Region"></a>Next: <a rel="next" accesskey="n" href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Forced-Input-Alignment.html#Forced-Input-Alignment">Forced Input Alignment</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.5 Output Section Region</h5>
|
||||
|
||||
<p><a name="index-_003e_0040var_007bregion_007d-420"></a><a name="index-section_002c-assigning-to-memory-region-421"></a><a name="index-memory-regions-and-sections-422"></a>You can assign a section to a previously defined region of memory by
|
||||
using <span class="samp">></span><var>region</var>. See <a href="MEMORY.html#MEMORY">MEMORY</a>.
|
||||
|
||||
<p>Here is a simple example:
|
||||
<pre class="smallexample"> MEMORY { rom : ORIGIN = 0x1000, LENGTH = 0x1000 }
|
||||
SECTIONS { ROM : { *(.text) } >rom }
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Type - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link rel="next" href="Output-Section-LMA.html#Output-Section-LMA" title="Output Section LMA">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Type"></a>Next: <a rel="next" accesskey="n" href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.1 Output Section Type</h5>
|
||||
|
||||
<p>Each output section may have a type. The type is a keyword in
|
||||
parentheses. The following types are defined:
|
||||
|
||||
<dl>
|
||||
<dt><code>NOLOAD</code><dd>The section should be marked as not loadable, so that it will not be
|
||||
loaded into memory when the program is run.
|
||||
<br><dt><code>DSECT</code><dt><code>COPY</code><dt><code>INFO</code><dt><code>OVERLAY</code><dd>These type names are supported for backward compatibility, and are
|
||||
rarely used. They all have the same effect: the section should be
|
||||
marked as not allocatable, so that no memory is allocated for the
|
||||
section when the program is run.
|
||||
</dl>
|
||||
|
||||
<p><a name="index-NOLOAD-405"></a><a name="index-prevent-unnecessary-loading-406"></a><a name="index-loading_002c-preventing-407"></a>The linker normally sets the attributes of an output section based on
|
||||
the input sections which map into it. You can override this by using
|
||||
the section type. For example, in the script sample below, the
|
||||
<span class="samp">ROM</span> section is addressed at memory location <span class="samp">0</span> and does not
|
||||
need to be loaded when the program is run. The contents of the
|
||||
<span class="samp">ROM</span> section will appear in the linker output file as usual.
|
||||
<pre class="smallexample"> SECTIONS {
|
||||
ROM 0 (NOLOAD) : { ... }
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Overlay Description - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="SECTIONS.html#SECTIONS" title="SECTIONS">
|
||||
<link rel="prev" href="Output-Section-Attributes.html#Output-Section-Attributes" title="Output Section Attributes">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Overlay-Description"></a>Previous: <a rel="previous" accesskey="p" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>,
|
||||
Up: <a rel="up" accesskey="u" href="SECTIONS.html#SECTIONS">SECTIONS</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.9 Overlay Description</h4>
|
||||
|
||||
<p><a name="index-OVERLAY-429"></a><a name="index-overlays-430"></a>An overlay description provides an easy way to describe sections which
|
||||
are to be loaded as part of a single memory image but are to be run at
|
||||
the same memory address. At run time, some sort of overlay manager will
|
||||
copy the overlaid sections in and out of the runtime memory address as
|
||||
required, perhaps by simply manipulating addressing bits. This approach
|
||||
can be useful, for example, when a certain region of memory is faster
|
||||
than another.
|
||||
|
||||
<p>Overlays are described using the <code>OVERLAY</code> command. The
|
||||
<code>OVERLAY</code> command is used within a <code>SECTIONS</code> command, like an
|
||||
output section description. The full syntax of the <code>OVERLAY</code>
|
||||
command is as follows:
|
||||
<pre class="smallexample"> OVERLAY [<var>start</var>] : [NOCROSSREFS] [AT ( <var>ldaddr</var> )]
|
||||
{
|
||||
<var>secname1</var>
|
||||
{
|
||||
<var>output-section-command</var>
|
||||
<var>output-section-command</var>
|
||||
...
|
||||
} [:<var>phdr</var>...] [=<var>fill</var>]
|
||||
<var>secname2</var>
|
||||
{
|
||||
<var>output-section-command</var>
|
||||
<var>output-section-command</var>
|
||||
...
|
||||
} [:<var>phdr</var>...] [=<var>fill</var>]
|
||||
...
|
||||
} [><var>region</var>] [:<var>phdr</var>...] [=<var>fill</var>]
|
||||
</pre>
|
||||
<p>Everything is optional except <code>OVERLAY</code> (a keyword), and each
|
||||
section must have a name (<var>secname1</var> and <var>secname2</var> above). The
|
||||
section definitions within the <code>OVERLAY</code> construct are identical to
|
||||
those within the general <code>SECTIONS</code> contruct (see <a href="SECTIONS.html#SECTIONS">SECTIONS</a>),
|
||||
except that no addresses and no memory regions may be defined for
|
||||
sections within an <code>OVERLAY</code>.
|
||||
|
||||
<p>The sections are all defined with the same starting address. The load
|
||||
addresses of the sections are arranged such that they are consecutive in
|
||||
memory starting at the load address used for the <code>OVERLAY</code> as a
|
||||
whole (as with normal section definitions, the load address is optional,
|
||||
and defaults to the start address; the start address is also optional,
|
||||
and defaults to the current value of the location counter).
|
||||
|
||||
<p>If the <code>NOCROSSREFS</code> keyword is used, and there any references
|
||||
among the sections, the linker will report an error. Since the sections
|
||||
all run at the same address, it normally does not make sense for one
|
||||
section to refer directly to another. See <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">NOCROSSREFS</a>.
|
||||
|
||||
<p>For each section within the <code>OVERLAY</code>, the linker automatically
|
||||
provides two symbols. The symbol <code>__load_start_</code><var>secname</var> is
|
||||
defined as the starting load address of the section. The symbol
|
||||
<code>__load_stop_</code><var>secname</var> is defined as the final load address of
|
||||
the section. Any characters within <var>secname</var> which are not legal
|
||||
within C identifiers are removed. C (or assembler) code may use these
|
||||
symbols to move the overlaid sections around as necessary.
|
||||
|
||||
<p>At the end of the overlay, the value of the location counter is set to
|
||||
the start address of the overlay plus the size of the largest section.
|
||||
|
||||
<p>Here is an example. Remember that this would appear inside a
|
||||
<code>SECTIONS</code> construct.
|
||||
<pre class="smallexample"> OVERLAY 0x1000 : AT (0x4000)
|
||||
{
|
||||
.text0 { o1/*.o(.text) }
|
||||
.text1 { o2/*.o(.text) }
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent">This will define both <span class="samp">.text0</span> and <span class="samp">.text1</span> to start at
|
||||
address 0x1000. <span class="samp">.text0</span> will be loaded at address 0x4000, and
|
||||
<span class="samp">.text1</span> will be loaded immediately after <span class="samp">.text0</span>. The
|
||||
following symbols will be defined if referenced: <code>__load_start_text0</code>,
|
||||
<code>__load_stop_text0</code>, <code>__load_start_text1</code>,
|
||||
<code>__load_stop_text1</code>.
|
||||
|
||||
<p>C code to copy overlay <code>.text1</code> into the overlay area might look
|
||||
like the following.
|
||||
|
||||
<pre class="smallexample"> extern char __load_start_text1, __load_stop_text1;
|
||||
memcpy ((char *) 0x1000, &__load_start_text1,
|
||||
&__load_stop_text1 - &__load_start_text1);
|
||||
</pre>
|
||||
<p>Note that the <code>OVERLAY</code> command is just syntactic sugar, since
|
||||
everything it does can be done using the more basic commands. The above
|
||||
example could have been written identically as follows.
|
||||
|
||||
<pre class="smallexample"> .text0 0x1000 : AT (0x4000) { o1/*.o(.text) }
|
||||
PROVIDE (__load_start_text0 = LOADADDR (.text0));
|
||||
PROVIDE (__load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0));
|
||||
.text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) { o2/*.o(.text) }
|
||||
PROVIDE (__load_start_text1 = LOADADDR (.text1));
|
||||
PROVIDE (__load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1));
|
||||
. = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Overview - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="index.html#Top" title="Top">
|
||||
<link rel="next" href="Invocation.html#Invocation" title="Invocation">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Overview"></a>Next: <a rel="next" accesskey="n" href="Invocation.html#Invocation">Invocation</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">1 Overview</h2>
|
||||
|
||||
<p><a name="index-_0040sc_007bgnu_007d-linker-1"></a><a name="index-what-is-this_003f-2"></a>
|
||||
|
||||
<!-- man begin DESCRIPTION -->
|
||||
<p><span class="command">ld</span> combines a number of object and archive files, relocates
|
||||
their data and ties up symbol references. Usually the last step in
|
||||
compiling a program is to run <span class="command">ld</span>.
|
||||
|
||||
<p><span class="command">ld</span> accepts Linker Command Language files written in
|
||||
a superset of AT&T's Link Editor Command Language syntax,
|
||||
to provide explicit and total control over the linking process.
|
||||
|
||||
<p>This version of <span class="command">ld</span> uses the general purpose BFD libraries
|
||||
to operate on object files. This allows <span class="command">ld</span> to read, combine, and
|
||||
write object files in many different formats—for example, COFF or
|
||||
<code>a.out</code>. Different formats may be linked together to produce any
|
||||
available kind of object file. See <a href="BFD.html#BFD">BFD</a>, for more information.
|
||||
|
||||
<p>Aside from its flexibility, the <span class="sc">gnu</span> linker is more helpful than other
|
||||
linkers in providing diagnostic information. Many linkers abandon
|
||||
execution immediately upon encountering an error; whenever possible,
|
||||
<span class="command">ld</span> continues executing, allowing you to identify other errors
|
||||
(or, in some cases, to get an output file in spite of the error).
|
||||
|
||||
<!-- man end -->
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>PHDRS - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="MEMORY.html#MEMORY" title="MEMORY">
|
||||
<link rel="next" href="VERSION.html#VERSION" title="VERSION">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="PHDRS"></a>Next: <a rel="next" accesskey="n" href="VERSION.html#VERSION">VERSION</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="MEMORY.html#MEMORY">MEMORY</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.8 PHDRS Command</h3>
|
||||
|
||||
<p><a name="index-PHDRS-443"></a><a name="index-program-headers-444"></a><a name="index-ELF-program-headers-445"></a><a name="index-program-segments-446"></a><a name="index-segments_002c-ELF-447"></a>The ELF object file format uses <dfn>program headers</dfn>, also knows as
|
||||
<dfn>segments</dfn>. The program headers describe how the program should be
|
||||
loaded into memory. You can print them out by using the <code>objdump</code>
|
||||
program with the <span class="samp">-p</span> option.
|
||||
|
||||
<p>When you run an ELF program on a native ELF system, the system loader
|
||||
reads the program headers in order to figure out how to load the
|
||||
program. This will only work if the program headers are set correctly.
|
||||
This manual does not describe the details of how the system loader
|
||||
interprets program headers; for more information, see the ELF ABI.
|
||||
|
||||
<p>The linker will create reasonable program headers by default. However,
|
||||
in some cases, you may need to specify the program headers more
|
||||
precisely. You may use the <code>PHDRS</code> command for this purpose. When
|
||||
the linker sees the <code>PHDRS</code> command in the linker script, it will
|
||||
not create any program headers other than the ones specified.
|
||||
|
||||
<p>The linker only pays attention to the <code>PHDRS</code> command when
|
||||
generating an ELF output file. In other cases, the linker will simply
|
||||
ignore <code>PHDRS</code>.
|
||||
|
||||
<p>This is the syntax of the <code>PHDRS</code> command. The words <code>PHDRS</code>,
|
||||
<code>FILEHDR</code>, <code>AT</code>, and <code>FLAGS</code> are keywords.
|
||||
|
||||
<pre class="smallexample"> PHDRS
|
||||
{
|
||||
<var>name</var> <var>type</var> [ FILEHDR ] [ PHDRS ] [ AT ( <var>address</var> ) ]
|
||||
[ FLAGS ( <var>flags</var> ) ] ;
|
||||
}
|
||||
</pre>
|
||||
<p>The <var>name</var> is used only for reference in the <code>SECTIONS</code> command
|
||||
of the linker script. It is not put into the output file. Program
|
||||
header names are stored in a separate name space, and will not conflict
|
||||
with symbol names, file names, or section names. Each program header
|
||||
must have a distinct name.
|
||||
|
||||
<p>Certain program header types describe segments of memory which the
|
||||
system loader will load from the file. In the linker script, you
|
||||
specify the contents of these segments by placing allocatable output
|
||||
sections in the segments. You use the <span class="samp">:</span><var>phdr</var> output section
|
||||
attribute to place a section in a particular segment. See <a href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a>.
|
||||
|
||||
<p>It is normal to put certain sections in more than one segment. This
|
||||
merely implies that one segment of memory contains another. You may
|
||||
repeat <span class="samp">:</span><var>phdr</var>, using it once for each segment which should
|
||||
contain the section.
|
||||
|
||||
<p>If you place a section in one or more segments using <span class="samp">:</span><var>phdr</var>,
|
||||
then the linker will place all subsequent allocatable sections which do
|
||||
not specify <span class="samp">:</span><var>phdr</var> in the same segments. This is for
|
||||
convenience, since generally a whole set of contiguous sections will be
|
||||
placed in a single segment. You can use <code>:NONE</code> to override the
|
||||
default segment and tell the linker to not put the section in any
|
||||
segment at all.
|
||||
|
||||
<p><a name="index-FILEHDR-448"></a><a name="index-PHDRS-449"></a>You may use the <code>FILEHDR</code> and <code>PHDRS</code> keywords appear after
|
||||
the program header type to further describe the contents of the segment.
|
||||
The <code>FILEHDR</code> keyword means that the segment should include the ELF
|
||||
file header. The <code>PHDRS</code> keyword means that the segment should
|
||||
include the ELF program headers themselves.
|
||||
|
||||
<p>The <var>type</var> may be one of the following. The numbers indicate the
|
||||
value of the keyword.
|
||||
|
||||
<dl>
|
||||
<dt><code>PT_NULL</code> (0)<dd>Indicates an unused program header.
|
||||
|
||||
<br><dt><code>PT_LOAD</code> (1)<dd>Indicates that this program header describes a segment to be loaded from
|
||||
the file.
|
||||
|
||||
<br><dt><code>PT_DYNAMIC</code> (2)<dd>Indicates a segment where dynamic linking information can be found.
|
||||
|
||||
<br><dt><code>PT_INTERP</code> (3)<dd>Indicates a segment where the name of the program interpreter may be
|
||||
found.
|
||||
|
||||
<br><dt><code>PT_NOTE</code> (4)<dd>Indicates a segment holding note information.
|
||||
|
||||
<br><dt><code>PT_SHLIB</code> (5)<dd>A reserved program header type, defined but not specified by the ELF
|
||||
ABI.
|
||||
|
||||
<br><dt><code>PT_PHDR</code> (6)<dd>Indicates a segment where the program headers may be found.
|
||||
|
||||
<br><dt><var>expression</var><dd>An expression giving the numeric type of the program header. This may
|
||||
be used for types not defined above.
|
||||
</dl>
|
||||
|
||||
<p>You can specify that a segment should be loaded at a particular address
|
||||
in memory by using an <code>AT</code> expression. This is identical to the
|
||||
<code>AT</code> command used as an output section attribute (see <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a>). The <code>AT</code> command for a program header overrides the
|
||||
output section attribute.
|
||||
|
||||
<p>The linker will normally set the segment flags based on the sections
|
||||
which comprise the segment. You may use the <code>FLAGS</code> keyword to
|
||||
explicitly specify the segment flags. The value of <var>flags</var> must be
|
||||
an integer. It is used to set the <code>p_flags</code> field of the program
|
||||
header.
|
||||
|
||||
<p>Here is an example of <code>PHDRS</code>. This shows a typical set of program
|
||||
headers used on a native ELF system.
|
||||
|
||||
<pre class="example"> PHDRS
|
||||
{
|
||||
headers PT_PHDR PHDRS ;
|
||||
interp PT_INTERP ;
|
||||
text PT_LOAD FILEHDR PHDRS ;
|
||||
data PT_LOAD ;
|
||||
dynamic PT_DYNAMIC ;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) } :text :interp
|
||||
.text : { *(.text) } :text
|
||||
.rodata : { *(.rodata) } /* defaults to :text */
|
||||
...
|
||||
. = . + 0x1000; /* move to a new page in memory */
|
||||
.data : { *(.data) } :data
|
||||
.dynamic : { *(.dynamic) } :data :dynamic
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>PROVIDE - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link rel="prev" href="Simple-Assignments.html#Simple-Assignments" title="Simple Assignments">
|
||||
<link rel="next" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN" title="PROVIDE_HIDDEN">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="PROVIDE"></a>Next: <a rel="next" accesskey="n" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">PROVIDE_HIDDEN</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Simple-Assignments.html#Simple-Assignments">Simple Assignments</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Assignments.html#Assignments">Assignments</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.2 PROVIDE</h4>
|
||||
|
||||
<p><a name="index-PROVIDE-359"></a>In some cases, it is desirable for a linker script to define a symbol
|
||||
only if it is referenced and is not defined by any object included in
|
||||
the link. For example, traditional linkers defined the symbol
|
||||
<span class="samp">etext</span>. However, ANSI C requires that the user be able to use
|
||||
<span class="samp">etext</span> as a function name without encountering an error. The
|
||||
<code>PROVIDE</code> keyword may be used to define a symbol, such as
|
||||
<span class="samp">etext</span>, only if it is referenced but not defined. The syntax is
|
||||
<code>PROVIDE(</code><var>symbol</var><code> = </code><var>expression</var><code>)</code>.
|
||||
|
||||
<p>Here is an example of using <code>PROVIDE</code> to define <span class="samp">etext</span>:
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
_etext = .;
|
||||
PROVIDE(etext = .);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>In this example, if the program defines <span class="samp">_etext</span> (with a leading
|
||||
underscore), the linker will give a multiple definition error. If, on
|
||||
the other hand, the program defines <span class="samp">etext</span> (with no leading
|
||||
underscore), the linker will silently use the definition in the program.
|
||||
If the program references <span class="samp">etext</span> but does not define it, the
|
||||
linker will use the definition in the linker script.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>PROVIDE_HIDDEN - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link rel="prev" href="PROVIDE.html#PROVIDE" title="PROVIDE">
|
||||
<link rel="next" href="Source-Code-Reference.html#Source-Code-Reference" title="Source Code Reference">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="PROVIDE_005fHIDDEN"></a>Next: <a rel="next" accesskey="n" href="Source-Code-Reference.html#Source-Code-Reference">Source Code Reference</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="PROVIDE.html#PROVIDE">PROVIDE</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Assignments.html#Assignments">Assignments</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.3 PROVIDE_HIDDEN</h4>
|
||||
|
||||
<p><a name="index-PROVIDE_005fHIDDEN-360"></a>Similar to <code>PROVIDE</code>. For ELF targeted ports, the symbol will be
|
||||
hidden and won't be exported.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>PowerPC ELF32 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="M68HC11_002f68HC12.html#M68HC11_002f68HC12" title="M68HC11/68HC12">
|
||||
<link rel="next" href="PowerPC64-ELF64.html#PowerPC64-ELF64" title="PowerPC64 ELF64">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="PowerPC-ELF32"></a>Next: <a rel="next" accesskey="n" href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.9 <span class="command">ld</span> and PowerPC 32-bit ELF Support</h3>
|
||||
|
||||
<p><a name="index-PowerPC-long-branches-567"></a><a name="index-_002d_002drelax-on-PowerPC-568"></a>Branches on PowerPC processors are limited to a signed 26-bit
|
||||
displacement, which may result in <span class="command">ld</span> giving
|
||||
<span class="samp">relocation truncated to fit</span> errors with very large programs.
|
||||
<span class="samp">--relax</span> enables the generation of trampolines that can access
|
||||
the entire 32-bit address space. These trampolines are inserted at
|
||||
section boundaries, so may not themselves be reachable if an input
|
||||
section exceeds 33M in size.
|
||||
|
||||
<p><a name="index-PowerPC-ELF32-options-569"></a>
|
||||
|
||||
<a name="index-PowerPC-PLT-570"></a>
|
||||
<a name="index-_002d_002dbss_002dplt-571"></a>
|
||||
<dl><dt><span class="option">--bss-plt</span><dd>Current PowerPC GCC accepts a <span class="samp">-msecure-plt</span> option that
|
||||
generates code capable of using a newer PLT and GOT layout that has
|
||||
the security advantage of no executable section ever needing to be
|
||||
writable and no writable section ever being executable. PowerPC
|
||||
<span class="command">ld</span> will generate this layout, including stubs to access the
|
||||
PLT, if all input files (including startup and static libraries) were
|
||||
compiled with <span class="samp">-msecure-plt</span>. <span class="samp">--bss-plt</span> forces the old
|
||||
BSS PLT (and GOT layout) which can give slightly better performance.
|
||||
|
||||
<p><a name="index-_002d_002dsecure_002dplt-572"></a><br><dt><span class="option">--secure-plt</span><dd><span class="command">ld</span> will use the new PLT and GOT layout if it is linking new
|
||||
<span class="samp">-fpic</span> or <span class="samp">-fPIC</span> code, but does not do so automatically
|
||||
when linking non-PIC code. This option requests the new PLT and GOT
|
||||
layout. A warning will be given if some object file requires the old
|
||||
style BSS PLT.
|
||||
|
||||
<p><a name="index-PowerPC-GOT-573"></a><a name="index-_002d_002dsdata_002dgot-574"></a><br><dt><span class="option">--sdata-got</span><dd>The new secure PLT and GOT are placed differently relative to other
|
||||
sections compared to older BSS PLT and GOT placement. The location of
|
||||
<code>.plt</code> must change because the new secure PLT is an initialized
|
||||
section while the old PLT is uninitialized. The reason for the
|
||||
<code>.got</code> change is more subtle: The new placement allows
|
||||
<code>.got</code> to be read-only in applications linked with
|
||||
<span class="samp">-z relro -z now</span>. However, this placement means that
|
||||
<code>.sdata</code> cannot always be used in shared libraries, because the
|
||||
PowerPC ABI accesses <code>.sdata</code> in shared libraries from the GOT
|
||||
pointer. <span class="samp">--sdata-got</span> forces the old GOT placement. PowerPC
|
||||
GCC doesn't use <code>.sdata</code> in shared libraries, so this option is
|
||||
really only useful for other compilers that may do so.
|
||||
|
||||
<p><a name="index-PowerPC-stub-symbols-575"></a><a name="index-_002d_002demit_002dstub_002dsyms-576"></a><br><dt><span class="option">--emit-stub-syms</span><dd>This option causes <span class="command">ld</span> to label linker stubs with a local
|
||||
symbol that encodes the stub type and destination.
|
||||
|
||||
<p><a name="index-PowerPC-TLS-optimization-577"></a><a name="index-_002d_002dno_002dtls_002doptimize-578"></a><br><dt><span class="option">--no-tls-optimize</span><dd>PowerPC <span class="command">ld</span> normally performs some optimization of code
|
||||
sequences used to access Thread-Local Storage. Use this option to
|
||||
disable the optimization.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>PowerPC64 ELF64 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="PowerPC-ELF32.html#PowerPC-ELF32" title="PowerPC ELF32">
|
||||
<link rel="next" href="SPU-ELF.html#SPU-ELF" title="SPU ELF">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="PowerPC64-ELF64"></a>Next: <a rel="next" accesskey="n" href="SPU-ELF.html#SPU-ELF">SPU ELF</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.10 <span class="command">ld</span> and PowerPC64 64-bit ELF Support</h3>
|
||||
|
||||
<p><a name="index-PowerPC64-ELF64-options-579"></a>
|
||||
|
||||
<a name="index-PowerPC64-stub-grouping-580"></a>
|
||||
<a name="index-_002d_002dstub_002dgroup_002dsize-581"></a>
|
||||
<dl><dt><span class="option">--stub-group-size</span><dd>Long branch stubs, PLT call stubs and TOC adjusting stubs are placed
|
||||
by <span class="command">ld</span> in stub sections located between groups of input sections.
|
||||
<span class="samp">--stub-group-size</span> specifies the maximum size of a group of input
|
||||
sections handled by one stub section. Since branch offsets are signed,
|
||||
a stub section may serve two groups of input sections, one group before
|
||||
the stub section, and one group after it. However, when using
|
||||
conditional branches that require stubs, it may be better (for branch
|
||||
prediction) that stub sections only serve one group of input sections.
|
||||
A negative value for <span class="samp">N</span> chooses this scheme, ensuring that
|
||||
branches to stubs always use a negative offset. Two special values of
|
||||
<span class="samp">N</span> are recognized, <span class="samp">1</span> and <span class="samp">-1</span>. These both instruct
|
||||
<span class="command">ld</span> to automatically size input section groups for the branch types
|
||||
detected, with the same behaviour regarding stub placement as other
|
||||
positive or negative values of <span class="samp">N</span> respectively.
|
||||
|
||||
<p>Note that <span class="samp">--stub-group-size</span> does not split input sections. A
|
||||
single input section larger than the group size specified will of course
|
||||
create a larger group (of one section). If input sections are too
|
||||
large, it may not be possible for a branch to reach its stub.
|
||||
|
||||
<p><a name="index-PowerPC64-stub-symbols-582"></a><a name="index-_002d_002demit_002dstub_002dsyms-583"></a><br><dt><span class="option">--emit-stub-syms</span><dd>This option causes <span class="command">ld</span> to label linker stubs with a local
|
||||
symbol that encodes the stub type and destination.
|
||||
|
||||
<p><a name="index-PowerPC64-dot-symbols-584"></a><a name="index-_002d_002ddotsyms-585"></a><a name="index-_002d_002dno_002ddotsyms-586"></a><br><dt><span class="option">--dotsyms, --no-dotsyms</span><dd>These two options control how <span class="command">ld</span> interprets version patterns
|
||||
in a version script. Older PowerPC64 compilers emitted both a
|
||||
function descriptor symbol with the same name as the function, and a
|
||||
code entry symbol with the name prefixed by a dot (<span class="samp">.</span>). To
|
||||
properly version a function <span class="samp">foo</span>, the version script thus needs
|
||||
to control both <span class="samp">foo</span> and <span class="samp">.foo</span>. The option
|
||||
<span class="samp">--dotsyms</span>, on by default, automatically adds the required
|
||||
dot-prefixed patterns. Use <span class="samp">--no-dotsyms</span> to disable this
|
||||
feature.
|
||||
|
||||
<p><a name="index-PowerPC64-TLS-optimization-587"></a><a name="index-_002d_002dno_002dtls_002doptimize-588"></a><br><dt><span class="option">--no-tls-optimize</span><dd>PowerPC64 <span class="command">ld</span> normally performs some optimization of code
|
||||
sequences used to access Thread-Local Storage. Use this option to
|
||||
disable the optimization.
|
||||
|
||||
<p><a name="index-PowerPC64-OPD-optimization-589"></a><a name="index-_002d_002dno_002dopd_002doptimize-590"></a><br><dt><span class="option">--no-opd-optimize</span><dd>PowerPC64 <span class="command">ld</span> normally removes <code>.opd</code> section entries
|
||||
corresponding to deleted link-once functions, or functions removed by
|
||||
the action of <span class="samp">--gc-sections</span> or linker script <code>/DISCARD/</code>.
|
||||
Use this option to disable <code>.opd</code> optimization.
|
||||
|
||||
<p><a name="index-PowerPC64-OPD-spacing-591"></a><a name="index-_002d_002dnon_002doverlapping_002dopd-592"></a><br><dt><span class="option">--non-overlapping-opd</span><dd>Some PowerPC64 compilers have an option to generate compressed
|
||||
<code>.opd</code> entries spaced 16 bytes apart, overlapping the third word,
|
||||
the static chain pointer (unused in C) with the first word of the next
|
||||
entry. This option expands such entries to the full 24 bytes.
|
||||
|
||||
<p><a name="index-PowerPC64-TOC-optimization-593"></a><a name="index-_002d_002dno_002dtoc_002doptimize-594"></a><br><dt><span class="option">--no-toc-optimize</span><dd>PowerPC64 <span class="command">ld</span> normally removes unused <code>.toc</code> section
|
||||
entries. Such entries are detected by examining relocations that
|
||||
reference the TOC in code sections. A reloc in a deleted code section
|
||||
marks a TOC word as unneeded, while a reloc in a kept code section
|
||||
marks a TOC word as needed. Since the TOC may reference itself, TOC
|
||||
relocs are also examined. TOC words marked as both needed and
|
||||
unneeded will of course be kept. TOC words without any referencing
|
||||
reloc are assumed to be part of a multi-word entry, and are kept or
|
||||
discarded as per the nearest marked preceding word. This works
|
||||
reliably for compiler generated code, but may be incorrect if assembly
|
||||
code is used to insert TOC entries. Use this option to disable the
|
||||
optimization.
|
||||
|
||||
<p><a name="index-PowerPC64-multi_002dTOC-595"></a><a name="index-_002d_002dno_002dmulti_002dtoc-596"></a><br><dt><span class="option">--no-multi-toc</span><dd>By default, PowerPC64 GCC generates code for a TOC model where TOC
|
||||
entries are accessed with a 16-bit offset from r2. This limits the
|
||||
total TOC size to 64K. PowerPC64 <span class="command">ld</span> extends this limit by
|
||||
grouping code sections such that each group uses less than 64K for its
|
||||
TOC entries, then inserts r2 adjusting stubs between inter-group
|
||||
calls. <span class="command">ld</span> does not split apart input sections, so cannot
|
||||
help if a single input file has a <code>.toc</code> section that exceeds
|
||||
64K, most likely from linking multiple files with <span class="command">ld -r</span>.
|
||||
Use this option to turn off this feature.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Reporting Bugs - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="BFD.html#BFD" title="BFD">
|
||||
<link rel="next" href="MRI.html#MRI" title="MRI">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Reporting-Bugs"></a>Next: <a rel="next" accesskey="n" href="MRI.html#MRI">MRI</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="BFD.html#BFD">BFD</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">6 Reporting Bugs</h2>
|
||||
|
||||
<p><a name="index-bugs-in-_0040command_007bld_007d-638"></a><a name="index-reporting-bugs-in-_0040command_007bld_007d-639"></a>
|
||||
Your bug reports play an essential role in making <span class="command">ld</span> reliable.
|
||||
|
||||
<p>Reporting a bug may help you by bringing a solution to your problem, or
|
||||
it may not. But in any case the principal function of a bug report is
|
||||
to help the entire community by making the next version of <span class="command">ld</span>
|
||||
work better. Bug reports are your contribution to the maintenance of
|
||||
<span class="command">ld</span>.
|
||||
|
||||
<p>In order for a bug report to serve its purpose, you must include the
|
||||
information that enables us to fix the bug.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a>: Have you found a bug?
|
||||
<li><a accesskey="2" href="Bug-Reporting.html#Bug-Reporting">Bug Reporting</a>: How to report bugs
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>SECTIONS - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link rel="next" href="MEMORY.html#MEMORY" title="MEMORY">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="SECTIONS"></a>Next: <a rel="next" accesskey="n" href="MEMORY.html#MEMORY">MEMORY</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Assignments.html#Assignments">Assignments</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.6 SECTIONS Command</h3>
|
||||
|
||||
<p><a name="index-SECTIONS-361"></a>The <code>SECTIONS</code> command tells the linker how to map input sections
|
||||
into output sections, and how to place the output sections in memory.
|
||||
|
||||
<p>The format of the <code>SECTIONS</code> command is:
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
<var>sections-command</var>
|
||||
<var>sections-command</var>
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
<p>Each <var>sections-command</var> may of be one of the following:
|
||||
|
||||
<ul>
|
||||
<li>an <code>ENTRY</code> command (see <a href="Entry-Point.html#Entry-Point">Entry command</a>)
|
||||
<li>a symbol assignment (see <a href="Assignments.html#Assignments">Assignments</a>)
|
||||
<li>an output section description
|
||||
<li>an overlay description
|
||||
</ul>
|
||||
|
||||
<p>The <code>ENTRY</code> command and symbol assignments are permitted inside the
|
||||
<code>SECTIONS</code> command for convenience in using the location counter in
|
||||
those commands. This can also make the linker script easier to
|
||||
understand because you can use those commands at meaningful points in
|
||||
the layout of the output file.
|
||||
|
||||
<p>Output section descriptions and overlay descriptions are described
|
||||
below.
|
||||
|
||||
<p>If you do not use a <code>SECTIONS</code> command in your linker script, the
|
||||
linker will place each input section into an identically named output
|
||||
section in the order that the sections are first encountered in the
|
||||
input files. If all input sections are present in the first file, for
|
||||
example, the order of sections in the output file will match the order
|
||||
in the first input file. The first section will be at address zero.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Output-Section-Description.html#Output-Section-Description">Output Section Description</a>: Output section description
|
||||
<li><a accesskey="2" href="Output-Section-Name.html#Output-Section-Name">Output Section Name</a>: Output section name
|
||||
<li><a accesskey="3" href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a>: Output section address
|
||||
<li><a accesskey="4" href="Input-Section.html#Input-Section">Input Section</a>: Input section description
|
||||
<li><a accesskey="5" href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a>: Output section data
|
||||
<li><a accesskey="6" href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a>: Output section keywords
|
||||
<li><a accesskey="7" href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a>: Output section discarding
|
||||
<li><a accesskey="8" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>: Output section attributes
|
||||
<li><a accesskey="9" href="Overlay-Description.html#Overlay-Description">Overlay Description</a>: Overlay description
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>SPU ELF - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="PowerPC64-ELF64.html#PowerPC64-ELF64" title="PowerPC64 ELF64">
|
||||
<link rel="next" href="TI-COFF.html#TI-COFF" title="TI COFF">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="SPU-ELF"></a>Next: <a rel="next" accesskey="n" href="TI-COFF.html#TI-COFF">TI COFF</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.11 <span class="command">ld</span> and SPU ELF Support</h3>
|
||||
|
||||
<p><a name="index-SPU-ELF-options-597"></a>
|
||||
|
||||
<a name="index-SPU-plugins-598"></a>
|
||||
<a name="index-_002d_002dplugin-599"></a>
|
||||
<dl><dt><span class="option">--plugin</span><dd>This option marks an executable as a PIC plugin module.
|
||||
|
||||
<p><a name="index-SPU-overlays-600"></a><a name="index-_002d_002dno_002doverlays-601"></a><br><dt><span class="option">--no-overlays</span><dd>Normally, <span class="command">ld</span> recognizes calls to functions within overlay
|
||||
regions, and redirects such calls to an overlay manager via a stub.
|
||||
<span class="command">ld</span> also provides a built-in overlay manager. This option
|
||||
turns off all this special overlay handling.
|
||||
|
||||
<p><a name="index-SPU-overlay-stub-symbols-602"></a><a name="index-_002d_002demit_002dstub_002dsyms-603"></a><br><dt><span class="option">--emit-stub-syms</span><dd>This option causes <span class="command">ld</span> to label overlay stubs with a local
|
||||
symbol that encodes the stub type and destination.
|
||||
|
||||
<p><a name="index-SPU-extra-overlay-stubs-604"></a><a name="index-_002d_002dextra_002doverlay_002dstubs-605"></a><br><dt><span class="option">--extra-overlay-stubs</span><dd>This option causes <span class="command">ld</span> to add overlay call stubs on all
|
||||
function calls out of overlay regions. Normally stubs are not added
|
||||
on calls to non-overlay regions.
|
||||
|
||||
<p><a name="index-SPU-local-store-size-606"></a><a name="index-_002d_002dlocal_002dstore_003dlo_003ahi-607"></a><br><dt><span class="option">--local-store=lo:hi</span><dd><span class="command">ld</span> usually checks that a final executable for SPU fits in
|
||||
the address range 0 to 256k. This option may be used to change the
|
||||
range. Disable the check entirely with <span class="option">--local-store=0:0</span>.
|
||||
|
||||
<p><a name="index-SPU-608"></a><a name="index-_002d_002dstack_002danalysis-609"></a><br><dt><span class="option">--stack-analysis</span><dd>SPU local store space is limited. Over-allocation of stack space
|
||||
unnecessarily limits space available for code and data, while
|
||||
under-allocation results in runtime failures. If given this option,
|
||||
<span class="command">ld</span> will provide an estimate of maximum stack usage.
|
||||
<span class="command">ld</span> does this by examining symbols in code sections to
|
||||
determine the extents of functions, and looking at function prologues
|
||||
for stack adjusting instructions. A call-graph is created by looking
|
||||
for relocations on branch instructions. The graph is then searched
|
||||
for the maximum stack usage path. Note that this analysis does not
|
||||
find calls made via function pointers, and does not handle recursion
|
||||
and other cycles in the call graph. Stack usage may be
|
||||
under-estimated if your code makes such calls. Also, stack usage for
|
||||
dynamic allocation, e.g. alloca, will not be detected. If a link map
|
||||
is requested, detailed information about each function's stack usage
|
||||
and calls will be given.
|
||||
|
||||
<p><a name="index-SPU-610"></a><a name="index-_002d_002demit_002dstack_002dsyms-611"></a><br><dt><span class="option">--emit-stack-syms</span><dd>This option, if given along with <span class="option">--stack-analysis</span> will result
|
||||
in <span class="command">ld</span> emitting stack sizing symbols for each function.
|
||||
These take the form <code>__stack_<function_name></code> for global
|
||||
functions, and <code>__stack_<number>_<function_name></code> for static
|
||||
functions. <code><number></code> is the section id in hex. The value of
|
||||
such symbols is the stack requirement for the corresponding function.
|
||||
The symbol size will be zero, type <code>STT_NOTYPE</code>, binding
|
||||
<code>STB_LOCAL</code>, and section <code>SHN_ABS</code>.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Script Format - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="Basic-Script-Concepts.html#Basic-Script-Concepts" title="Basic Script Concepts">
|
||||
<link rel="next" href="Simple-Example.html#Simple-Example" title="Simple Example">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Script-Format"></a>Next: <a rel="next" accesskey="n" href="Simple-Example.html#Simple-Example">Simple Example</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Basic-Script-Concepts.html#Basic-Script-Concepts">Basic Script Concepts</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.2 Linker Script Format</h3>
|
||||
|
||||
<p><a name="index-linker-script-format-311"></a>Linker scripts are text files.
|
||||
|
||||
<p>You write a linker script as a series of commands. Each command is
|
||||
either a keyword, possibly followed by arguments, or an assignment to a
|
||||
symbol. You may separate commands using semicolons. Whitespace is
|
||||
generally ignored.
|
||||
|
||||
<p>Strings such as file or format names can normally be entered directly.
|
||||
If the file name contains a character such as a comma which would
|
||||
otherwise serve to separate file names, you may put the file name in
|
||||
double quotes. There is no way to use a double quote character in a
|
||||
file name.
|
||||
|
||||
<p>You may include comments in linker scripts just as in C, delimited by
|
||||
<span class="samp">/*</span> and <span class="samp">*/</span>. As in C, comments are syntactically equivalent
|
||||
to whitespace.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Scripts - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="prev" href="Invocation.html#Invocation" title="Invocation">
|
||||
<link rel="next" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Scripts"></a>Next: <a rel="next" accesskey="n" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Invocation.html#Invocation">Invocation</a>,
|
||||
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">3 Linker Scripts</h2>
|
||||
|
||||
<p><a name="index-scripts-307"></a><a name="index-linker-scripts-308"></a><a name="index-command-files-309"></a>Every link is controlled by a <dfn>linker script</dfn>. This script is
|
||||
written in the linker command language.
|
||||
|
||||
<p>The main purpose of the linker script is to describe how the sections in
|
||||
the input files should be mapped into the output file, and to control
|
||||
the memory layout of the output file. Most linker scripts do nothing
|
||||
more than this. However, when necessary, the linker script can also
|
||||
direct the linker to perform many other operations, using the commands
|
||||
described below.
|
||||
|
||||
<p>The linker always uses a linker script. If you do not supply one
|
||||
yourself, the linker will use a default script that is compiled into the
|
||||
linker executable. You can use the <span class="samp">--verbose</span> command line option
|
||||
to display the default linker script. Certain command line options,
|
||||
such as <span class="samp">-r</span> or <span class="samp">-N</span>, will affect the default linker script.
|
||||
|
||||
<p>You may supply your own linker script by using the <span class="samp">-T</span> command
|
||||
line option. When you do this, your linker script will replace the
|
||||
default linker script.
|
||||
|
||||
<p>You may also use linker scripts implicitly by naming them as input files
|
||||
to the linker, as though they were files to be linked. See <a href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts">Implicit Linker Scripts</a>.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Basic-Script-Concepts.html#Basic-Script-Concepts">Basic Script Concepts</a>: Basic Linker Script Concepts
|
||||
<li><a accesskey="2" href="Script-Format.html#Script-Format">Script Format</a>: Linker Script Format
|
||||
<li><a accesskey="3" href="Simple-Example.html#Simple-Example">Simple Example</a>: Simple Linker Script Example
|
||||
<li><a accesskey="4" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>: Simple Linker Script Commands
|
||||
<li><a accesskey="5" href="Assignments.html#Assignments">Assignments</a>: Assigning Values to Symbols
|
||||
<li><a accesskey="6" href="SECTIONS.html#SECTIONS">SECTIONS</a>: SECTIONS Command
|
||||
<li><a accesskey="7" href="MEMORY.html#MEMORY">MEMORY</a>: MEMORY Command
|
||||
<li><a accesskey="8" href="PHDRS.html#PHDRS">PHDRS</a>: PHDRS Command
|
||||
<li><a accesskey="9" href="VERSION.html#VERSION">VERSION</a>: VERSION Command
|
||||
<li><a href="Expressions.html#Expressions">Expressions</a>: Expressions in Linker Scripts
|
||||
<li><a href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts">Implicit Linker Scripts</a>: Implicit Linker Scripts
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Simple Assignments - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link rel="next" href="PROVIDE.html#PROVIDE" title="PROVIDE">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Simple-Assignments"></a>Next: <a rel="next" accesskey="n" href="PROVIDE.html#PROVIDE">PROVIDE</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Assignments.html#Assignments">Assignments</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.1 Simple Assignments</h4>
|
||||
|
||||
<p>You may assign to a symbol using any of the C assignment operators:
|
||||
|
||||
<dl>
|
||||
<dt><var>symbol</var><code> = </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> += </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> -= </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> *= </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> /= </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> <<= </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> >>= </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> &= </code><var>expression</var><code> ;</code><dt><var>symbol</var><code> |= </code><var>expression</var><code> ;</code><dd></dl>
|
||||
|
||||
<p>The first case will define <var>symbol</var> to the value of
|
||||
<var>expression</var>. In the other cases, <var>symbol</var> must already be
|
||||
defined, and the value will be adjusted accordingly.
|
||||
|
||||
<p>The special symbol name <span class="samp">.</span> indicates the location counter. You
|
||||
may only use this within a <code>SECTIONS</code> command. See <a href="Location-Counter.html#Location-Counter">Location Counter</a>.
|
||||
|
||||
<p>The semicolon after <var>expression</var> is required.
|
||||
|
||||
<p>Expressions are defined below; see <a href="Expressions.html#Expressions">Expressions</a>.
|
||||
|
||||
<p>You may write symbol assignments as commands in their own right, or as
|
||||
statements within a <code>SECTIONS</code> command, or as part of an output
|
||||
section description in a <code>SECTIONS</code> command.
|
||||
|
||||
<p>The section of the symbol will be set from the section of the
|
||||
expression; for more information, see <a href="Expression-Section.html#Expression-Section">Expression Section</a>.
|
||||
|
||||
<p>Here is an example showing the three different places that symbol
|
||||
assignments may be used:
|
||||
|
||||
<pre class="smallexample"> floating_point = 0;
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
_etext = .;
|
||||
}
|
||||
_bdata = (. + 3) & ~ 3;
|
||||
.data : { *(.data) }
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent">In this example, the symbol <span class="samp">floating_point</span> will be defined as
|
||||
zero. The symbol <span class="samp">_etext</span> will be defined as the address following
|
||||
the last <span class="samp">.text</span> input section. The symbol <span class="samp">_bdata</span> will be
|
||||
defined as the address following the <span class="samp">.text</span> output section aligned
|
||||
upward to a 4 byte boundary.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Simple Commands - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="Simple-Example.html#Simple-Example" title="Simple Example">
|
||||
<link rel="next" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Simple-Commands"></a>Next: <a rel="next" accesskey="n" href="Assignments.html#Assignments">Assignments</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Simple-Example.html#Simple-Example">Simple Example</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.4 Simple Linker Script Commands</h3>
|
||||
|
||||
<p><a name="index-linker-script-simple-commands-314"></a>In this section we describe the simple linker script commands.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Entry-Point.html#Entry-Point">Entry Point</a>: Setting the entry point
|
||||
<li><a accesskey="2" href="File-Commands.html#File-Commands">File Commands</a>: Commands dealing with files
|
||||
|
||||
<li><a accesskey="3" href="Format-Commands.html#Format-Commands">Format Commands</a>: Commands dealing with object file formats
|
||||
|
||||
<li><a accesskey="4" href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a>: Other linker script commands
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Simple Example - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="Script-Format.html#Script-Format" title="Script Format">
|
||||
<link rel="next" href="Simple-Commands.html#Simple-Commands" title="Simple Commands">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Simple-Example"></a>Next: <a rel="next" accesskey="n" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Script-Format.html#Script-Format">Script Format</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.3 Simple Linker Script Example</h3>
|
||||
|
||||
<p><a name="index-linker-script-example-312"></a><a name="index-example-of-linker-script-313"></a>Many linker scripts are fairly simple.
|
||||
|
||||
<p>The simplest possible linker script has just one command:
|
||||
<span class="samp">SECTIONS</span>. You use the <span class="samp">SECTIONS</span> command to describe the
|
||||
memory layout of the output file.
|
||||
|
||||
<p>The <span class="samp">SECTIONS</span> command is a powerful command. Here we will
|
||||
describe a simple use of it. Let's assume your program consists only of
|
||||
code, initialized data, and uninitialized data. These will be in the
|
||||
<span class="samp">.text</span>, <span class="samp">.data</span>, and <span class="samp">.bss</span> sections, respectively.
|
||||
Let's assume further that these are the only sections which appear in
|
||||
your input files.
|
||||
|
||||
<p>For this example, let's say that the code should be loaded at address
|
||||
0x10000, and that the data should start at address 0x8000000. Here is a
|
||||
linker script which will do that:
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
. = 0x10000;
|
||||
.text : { *(.text) }
|
||||
. = 0x8000000;
|
||||
.data : { *(.data) }
|
||||
.bss : { *(.bss) }
|
||||
}
|
||||
</pre>
|
||||
<p>You write the <span class="samp">SECTIONS</span> command as the keyword <span class="samp">SECTIONS</span>,
|
||||
followed by a series of symbol assignments and output section
|
||||
descriptions enclosed in curly braces.
|
||||
|
||||
<p>The first line inside the <span class="samp">SECTIONS</span> command of the above example
|
||||
sets the value of the special symbol <span class="samp">.</span>, which is the location
|
||||
counter. If you do not specify the address of an output section in some
|
||||
other way (other ways are described later), the address is set from the
|
||||
current value of the location counter. The location counter is then
|
||||
incremented by the size of the output section. At the start of the
|
||||
<span class="samp">SECTIONS</span> command, the location counter has the value <span class="samp">0</span>.
|
||||
|
||||
<p>The second line defines an output section, <span class="samp">.text</span>. The colon is
|
||||
required syntax which may be ignored for now. Within the curly braces
|
||||
after the output section name, you list the names of the input sections
|
||||
which should be placed into this output section. The <span class="samp">*</span> is a
|
||||
wildcard which matches any file name. The expression <span class="samp">*(.text)</span>
|
||||
means all <span class="samp">.text</span> input sections in all input files.
|
||||
|
||||
<p>Since the location counter is <span class="samp">0x10000</span> when the output section
|
||||
<span class="samp">.text</span> is defined, the linker will set the address of the
|
||||
<span class="samp">.text</span> section in the output file to be <span class="samp">0x10000</span>.
|
||||
|
||||
<p>The remaining lines define the <span class="samp">.data</span> and <span class="samp">.bss</span> sections in
|
||||
the output file. The linker will place the <span class="samp">.data</span> output section
|
||||
at address <span class="samp">0x8000000</span>. After the linker places the <span class="samp">.data</span>
|
||||
output section, the value of the location counter will be
|
||||
<span class="samp">0x8000000</span> plus the size of the <span class="samp">.data</span> output section. The
|
||||
effect is that the linker will place the <span class="samp">.bss</span> output section
|
||||
immediately after the <span class="samp">.data</span> output section in memory.
|
||||
|
||||
<p>The linker will ensure that each output section has the required
|
||||
alignment, by increasing the location counter if necessary. In this
|
||||
example, the specified addresses for the <span class="samp">.text</span> and <span class="samp">.data</span>
|
||||
sections will probably satisfy any alignment constraints, but the linker
|
||||
may have to create a small gap between the <span class="samp">.data</span> and <span class="samp">.bss</span>
|
||||
sections.
|
||||
|
||||
<p>That's it! That's a simple and complete linker script.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Source Code Reference - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link rel="prev" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN" title="PROVIDE_HIDDEN">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Source-Code-Reference"></a>Previous: <a rel="previous" accesskey="p" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">PROVIDE_HIDDEN</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Assignments.html#Assignments">Assignments</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.4 Source Code Reference</h4>
|
||||
|
||||
<p>Accessing a linker script defined variable from source code is not
|
||||
intuitive. In particular a linker script symbol is not equivalent to
|
||||
a variable declaration in a high level language, it is instead a
|
||||
symbol that does not have a value.
|
||||
|
||||
<p>Before going further, it is important to note that compilers often
|
||||
transform names in the source code into different names when they are
|
||||
stored in the symbol table. For example, Fortran compilers commonly
|
||||
prepend or append an underscore, and C++ performs extensive <span class="samp">name
|
||||
mangling</span>. Therefore there might be a discrepancy between the name
|
||||
of a variable as it is used in source code and the name of the same
|
||||
variable as it is defined in a linker script. For example in C a
|
||||
linker script variable might be referred to as:
|
||||
|
||||
<pre class="smallexample"> extern int foo;
|
||||
</pre>
|
||||
<p>But in the linker script it might be defined as:
|
||||
|
||||
<pre class="smallexample"> _foo = 1000;
|
||||
</pre>
|
||||
<p>In the remaining examples however it is assumed that no name
|
||||
transformation has taken place.
|
||||
|
||||
<p>When a symbol is declared in a high level language such as C, two
|
||||
things happen. The first is that the compiler reserves enough space
|
||||
in the program's memory to hold the <em>value</em> of the symbol. The
|
||||
second is that the compiler creates an entry in the program's symbol
|
||||
table which holds the symbol's <em>address</em>. ie the symbol table
|
||||
contains the address of the block of memory holding the symbol's
|
||||
value. So for example the following C declaration, at file scope:
|
||||
|
||||
<pre class="smallexample"> int foo = 1000;
|
||||
</pre>
|
||||
<p>creates a entry called <span class="samp">foo</span> in the symbol table. This entry
|
||||
holds the address of an <span class="samp">int</span> sized block of memory where the
|
||||
number 1000 is initially stored.
|
||||
|
||||
<p>When a program references a symbol the compiler generates code that
|
||||
first accesses the symbol table to find the address of the symbol's
|
||||
memory block and then code to read the value from that memory block.
|
||||
So:
|
||||
|
||||
<pre class="smallexample"> foo = 1;
|
||||
</pre>
|
||||
<p>looks up the symbol <span class="samp">foo</span> in the symbol table, gets the address
|
||||
associated with this symbol and then writes the value 1 into that
|
||||
address. Whereas:
|
||||
|
||||
<pre class="smallexample"> int * a = & foo;
|
||||
</pre>
|
||||
<p>looks up the symbol <span class="samp">foo</span> in the symbol table, gets it address
|
||||
and then copies this address into the block of memory associated with
|
||||
the variable <span class="samp">a</span>.
|
||||
|
||||
<p>Linker scripts symbol declarations, by contrast, create an entry in
|
||||
the symbol table but do not assign any memory to them. Thus they are
|
||||
an address without a value. So for example the linker script definition:
|
||||
|
||||
<pre class="smallexample"> foo = 1000;
|
||||
</pre>
|
||||
<p>creates an entry in the symbol table called <span class="samp">foo</span> which holds
|
||||
the address of memory location 1000, but nothing special is stored at
|
||||
address 1000. This means that you cannot access the <em>value</em> of a
|
||||
linker script defined symbol - it has no value - all you can do is
|
||||
access the <em>address</em> of a linker script defined symbol.
|
||||
|
||||
<p>Hence when you are using a linker script defined symbol in source code
|
||||
you should always take the address of the symbol, and never attempt to
|
||||
use its value. For example suppose you want to copy the contents of a
|
||||
section of memory called .ROM into a section called .FLASH and the
|
||||
linker script contains these declarations:
|
||||
|
||||
<pre class="smallexample"> start_of_ROM = .ROM;
|
||||
end_of_ROM = .ROM + sizeof (.ROM) - 1;
|
||||
start_of_FLASH = .FLASH;
|
||||
</pre>
|
||||
<p>Then the C source code to perform the copy would be:
|
||||
|
||||
<pre class="smallexample"> extern char start_of_ROM, end_of_ROM, start_of_FLASH;
|
||||
|
||||
memcpy (& start_of_FLASH, & start_of_ROM, & end_of_ROM - & start_of_ROM);
|
||||
</pre>
|
||||
<p>Note the use of the <span class="samp">&</span> operators. These are correct.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Symbols - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Constants.html#Constants" title="Constants">
|
||||
<link rel="next" href="Orphan-Sections.html#Orphan-Sections" title="Orphan Sections">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Symbols"></a>Next: <a rel="next" accesskey="n" href="Orphan-Sections.html#Orphan-Sections">Orphan Sections</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="Constants.html#Constants">Constants</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.2 Symbol Names</h4>
|
||||
|
||||
<p><a name="index-symbol-names-463"></a><a name="index-names-464"></a><a name="index-quoted-symbol-names-465"></a><a name="index-_0022-466"></a>Unless quoted, symbol names start with a letter, underscore, or period
|
||||
and may include letters, digits, underscores, periods, and hyphens.
|
||||
Unquoted symbol names must not conflict with any keywords. You can
|
||||
specify a symbol which contains odd characters or has the same name as a
|
||||
keyword by surrounding the symbol name in double quotes:
|
||||
<pre class="smallexample"> "SECTION" = 9;
|
||||
"with a space" = "also with a space" + 10;
|
||||
</pre>
|
||||
<p>Since symbols can contain many non-alphabetic characters, it is safest
|
||||
to delimit symbols with spaces. For example, <span class="samp">A-B</span> is one symbol,
|
||||
whereas <span class="samp">A - B</span> is an expression involving subtraction.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>TI COFF - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="SPU-ELF.html#SPU-ELF" title="SPU ELF">
|
||||
<link rel="next" href="WIN32.html#WIN32" title="WIN32">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="TI-COFF"></a>Next: <a rel="next" accesskey="n" href="WIN32.html#WIN32">WIN32</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="SPU-ELF.html#SPU-ELF">SPU ELF</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.12 <span class="command">ld</span>'s Support for Various TI COFF Versions</h3>
|
||||
|
||||
<p><a name="index-TI-COFF-versions-612"></a><a name="index-_002d_002dformat_003d_0040var_007bversion_007d-613"></a>The <span class="samp">--format</span> switch allows selection of one of the various
|
||||
TI COFF versions. The latest of this writing is 2; versions 0 and 1 are
|
||||
also supported. The TI COFF versions also vary in header byte-order
|
||||
format; <span class="command">ld</span> will read any version or byte order, but the output
|
||||
header format depends on the default specified by the specific target.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>VERSION - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Scripts.html#Scripts" title="Scripts">
|
||||
<link rel="prev" href="PHDRS.html#PHDRS" title="PHDRS">
|
||||
<link rel="next" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="VERSION"></a>Next: <a rel="next" accesskey="n" href="Expressions.html#Expressions">Expressions</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="PHDRS.html#PHDRS">PHDRS</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Scripts.html#Scripts">Scripts</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.9 VERSION Command</h3>
|
||||
|
||||
<p><a name="index-VERSION-_0040_007bscript-text_0040_007d-450"></a><a name="index-symbol-versions-451"></a><a name="index-version-script-452"></a><a name="index-versions-of-symbols-453"></a>The linker supports symbol versions when using ELF. Symbol versions are
|
||||
only useful when using shared libraries. The dynamic linker can use
|
||||
symbol versions to select a specific version of a function when it runs
|
||||
a program that may have been linked against an earlier version of the
|
||||
shared library.
|
||||
|
||||
<p>You can include a version script directly in the main linker script, or
|
||||
you can supply the version script as an implicit linker script. You can
|
||||
also use the <span class="samp">--version-script</span> linker option.
|
||||
|
||||
<p>The syntax of the <code>VERSION</code> command is simply
|
||||
<pre class="smallexample"> VERSION { version-script-commands }
|
||||
</pre>
|
||||
<p>The format of the version script commands is identical to that used by
|
||||
Sun's linker in Solaris 2.5. The version script defines a tree of
|
||||
version nodes. You specify the node names and interdependencies in the
|
||||
version script. You can specify which symbols are bound to which
|
||||
version nodes, and you can reduce a specified set of symbols to local
|
||||
scope so that they are not globally visible outside of the shared
|
||||
library.
|
||||
|
||||
<p>The easiest way to demonstrate the version script language is with a few
|
||||
examples.
|
||||
|
||||
<pre class="smallexample"> VERS_1.1 {
|
||||
global:
|
||||
foo1;
|
||||
local:
|
||||
old*;
|
||||
original*;
|
||||
new*;
|
||||
};
|
||||
|
||||
VERS_1.2 {
|
||||
foo2;
|
||||
} VERS_1.1;
|
||||
|
||||
VERS_2.0 {
|
||||
bar1; bar2;
|
||||
extern "C++" {
|
||||
ns::*;
|
||||
"int f(int, double)";
|
||||
}
|
||||
} VERS_1.2;
|
||||
</pre>
|
||||
<p>This example version script defines three version nodes. The first
|
||||
version node defined is <span class="samp">VERS_1.1</span>; it has no other dependencies.
|
||||
The script binds the symbol <span class="samp">foo1</span> to <span class="samp">VERS_1.1</span>. It reduces
|
||||
a number of symbols to local scope so that they are not visible outside
|
||||
of the shared library; this is done using wildcard patterns, so that any
|
||||
symbol whose name begins with <span class="samp">old</span>, <span class="samp">original</span>, or <span class="samp">new</span>
|
||||
is matched. The wildcard patterns available are the same as those used
|
||||
in the shell when matching filenames (also known as “globbing”).
|
||||
However, if you specify the symbol name inside double quotes, then the
|
||||
name is treated as literal, rather than as a glob pattern.
|
||||
|
||||
<p>Next, the version script defines node <span class="samp">VERS_1.2</span>. This node
|
||||
depends upon <span class="samp">VERS_1.1</span>. The script binds the symbol <span class="samp">foo2</span>
|
||||
to the version node <span class="samp">VERS_1.2</span>.
|
||||
|
||||
<p>Finally, the version script defines node <span class="samp">VERS_2.0</span>. This node
|
||||
depends upon <span class="samp">VERS_1.2</span>. The scripts binds the symbols <span class="samp">bar1</span>
|
||||
and <span class="samp">bar2</span> are bound to the version node <span class="samp">VERS_2.0</span>.
|
||||
|
||||
<p>When the linker finds a symbol defined in a library which is not
|
||||
specifically bound to a version node, it will effectively bind it to an
|
||||
unspecified base version of the library. You can bind all otherwise
|
||||
unspecified symbols to a given version node by using <span class="samp">global: *;</span>
|
||||
somewhere in the version script.
|
||||
|
||||
<p>The names of the version nodes have no specific meaning other than what
|
||||
they might suggest to the person reading them. The <span class="samp">2.0</span> version
|
||||
could just as well have appeared in between <span class="samp">1.1</span> and <span class="samp">1.2</span>.
|
||||
However, this would be a confusing way to write a version script.
|
||||
|
||||
<p>Node name can be omitted, provided it is the only version node
|
||||
in the version script. Such version script doesn't assign any versions to
|
||||
symbols, only selects which symbols will be globally visible out and which
|
||||
won't.
|
||||
|
||||
<pre class="smallexample"> { global: foo; bar; local: *; };
|
||||
</pre>
|
||||
<p>When you link an application against a shared library that has versioned
|
||||
symbols, the application itself knows which version of each symbol it
|
||||
requires, and it also knows which version nodes it needs from each
|
||||
shared library it is linked against. Thus at runtime, the dynamic
|
||||
loader can make a quick check to make sure that the libraries you have
|
||||
linked against do in fact supply all of the version nodes that the
|
||||
application will need to resolve all of the dynamic symbols. In this
|
||||
way it is possible for the dynamic linker to know with certainty that
|
||||
all external symbols that it needs will be resolvable without having to
|
||||
search for each symbol reference.
|
||||
|
||||
<p>The symbol versioning is in effect a much more sophisticated way of
|
||||
doing minor version checking that SunOS does. The fundamental problem
|
||||
that is being addressed here is that typically references to external
|
||||
functions are bound on an as-needed basis, and are not all bound when
|
||||
the application starts up. If a shared library is out of date, a
|
||||
required interface may be missing; when the application tries to use
|
||||
that interface, it may suddenly and unexpectedly fail. With symbol
|
||||
versioning, the user will get a warning when they start their program if
|
||||
the libraries being used with the application are too old.
|
||||
|
||||
<p>There are several GNU extensions to Sun's versioning approach. The
|
||||
first of these is the ability to bind a symbol to a version node in the
|
||||
source file where the symbol is defined instead of in the versioning
|
||||
script. This was done mainly to reduce the burden on the library
|
||||
maintainer. You can do this by putting something like:
|
||||
<pre class="smallexample"> __asm__(".symver original_foo,foo@VERS_1.1");
|
||||
</pre>
|
||||
<p class="noindent">in the C source file. This renames the function <span class="samp">original_foo</span> to
|
||||
be an alias for <span class="samp">foo</span> bound to the version node <span class="samp">VERS_1.1</span>.
|
||||
The <span class="samp">local:</span> directive can be used to prevent the symbol
|
||||
<span class="samp">original_foo</span> from being exported. A <span class="samp">.symver</span> directive
|
||||
takes precedence over a version script.
|
||||
|
||||
<p>The second GNU extension is to allow multiple versions of the same
|
||||
function to appear in a given shared library. In this way you can make
|
||||
an incompatible change to an interface without increasing the major
|
||||
version number of the shared library, while still allowing applications
|
||||
linked against the old interface to continue to function.
|
||||
|
||||
<p>To do this, you must use multiple <span class="samp">.symver</span> directives in the
|
||||
source file. Here is an example:
|
||||
|
||||
<pre class="smallexample"> __asm__(".symver original_foo,foo@");
|
||||
__asm__(".symver old_foo,foo@VERS_1.1");
|
||||
__asm__(".symver old_foo1,foo@VERS_1.2");
|
||||
__asm__(".symver new_foo,foo@@VERS_2.0");
|
||||
</pre>
|
||||
<p>In this example, <span class="samp">foo@</span> represents the symbol <span class="samp">foo</span> bound to the
|
||||
unspecified base version of the symbol. The source file that contains this
|
||||
example would define 4 C functions: <span class="samp">original_foo</span>, <span class="samp">old_foo</span>,
|
||||
<span class="samp">old_foo1</span>, and <span class="samp">new_foo</span>.
|
||||
|
||||
<p>When you have multiple definitions of a given symbol, there needs to be
|
||||
some way to specify a default version to which external references to
|
||||
this symbol will be bound. You can do this with the
|
||||
<span class="samp">foo@@VERS_2.0</span> type of <span class="samp">.symver</span> directive. You can only
|
||||
declare one version of a symbol as the default in this manner; otherwise
|
||||
you would effectively have multiple definitions of the same symbol.
|
||||
|
||||
<p>If you wish to bind a reference to a specific version of the symbol
|
||||
within the shared library, you can use the aliases of convenience
|
||||
(i.e., <span class="samp">old_foo</span>), or you can use the <span class="samp">.symver</span> directive to
|
||||
specifically bind to an external version of the function in question.
|
||||
|
||||
<p>You can also specify the language in the version script:
|
||||
|
||||
<pre class="smallexample"> VERSION extern "lang" { version-script-commands }
|
||||
</pre>
|
||||
<p>The supported <span class="samp">lang</span>s are <span class="samp">C</span>, <span class="samp">C++</span>, and <span class="samp">Java</span>.
|
||||
The linker will iterate over the list of symbols at the link time and
|
||||
demangle them according to <span class="samp">lang</span> before matching them to the
|
||||
patterns specified in <span class="samp">version-script-commands</span>.
|
||||
|
||||
<p>Demangled names may contains spaces and other special characters. As
|
||||
described above, you can use a glob pattern to match demangled names,
|
||||
or you can use a double-quoted string to match the string exactly. In
|
||||
the latter case, be aware that minor differences (such as differing
|
||||
whitespace) between the version script and the demangler output will
|
||||
cause a mismatch. As the exact string generated by the demangler
|
||||
might change in the future, even if the mangled name does not, you
|
||||
should check that all of your version directives are behaving as you
|
||||
expect when you upgrade.
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,431 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>WIN32 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="TI-COFF.html#TI-COFF" title="TI COFF">
|
||||
<link rel="next" href="Xtensa.html#Xtensa" title="Xtensa">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="WIN32"></a>Next: <a rel="next" accesskey="n" href="Xtensa.html#Xtensa">Xtensa</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="TI-COFF.html#TI-COFF">TI COFF</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.13 <span class="command">ld</span> and WIN32 (cygwin/mingw)</h3>
|
||||
|
||||
<p>This section describes some of the win32 specific <span class="command">ld</span> issues.
|
||||
See <a href="Options.html#Options">Command Line Options</a> for detailed description of the
|
||||
command line options mentioned here.
|
||||
|
||||
|
||||
<a name="index-import-libraries-614"></a>
|
||||
<dl><dt><em>import libraries</em><dd>The standard Windows linker creates and uses so-called import
|
||||
libraries, which contains information for linking to dll's. They are
|
||||
regular static archives and are handled as any other static
|
||||
archive. The cygwin and mingw ports of <span class="command">ld</span> have specific
|
||||
support for creating such libraries provided with the
|
||||
<span class="samp">--out-implib</span> command line option.
|
||||
|
||||
<br><dt><em>exporting DLL symbols</em><dd><a name="index-exporting-DLL-symbols-615"></a>The cygwin/mingw <span class="command">ld</span> has several ways to export symbols for dll's.
|
||||
|
||||
<dl>
|
||||
<dt><em>using auto-export functionality</em><dd><a name="index-using-auto_002dexport-functionality-616"></a>By default <span class="command">ld</span> exports symbols with the auto-export functionality,
|
||||
which is controlled by the following command line options:
|
||||
|
||||
<ul>
|
||||
<li>–export-all-symbols [This is the default]
|
||||
<li>–exclude-symbols
|
||||
<li>–exclude-libs
|
||||
</ul>
|
||||
|
||||
<p>If, however, <span class="samp">--export-all-symbols</span> is not given explicitly on the
|
||||
command line, then the default auto-export behavior will be <em>disabled</em>
|
||||
if either of the following are true:
|
||||
|
||||
<ul>
|
||||
<li>A DEF file is used.
|
||||
<li>Any symbol in any object file was marked with the __declspec(dllexport) attribute.
|
||||
</ul>
|
||||
|
||||
<br><dt><em>using a DEF file</em><dd><a name="index-using-a-DEF-file-617"></a>Another way of exporting symbols is using a DEF file. A DEF file is
|
||||
an ASCII file containing definitions of symbols which should be
|
||||
exported when a dll is created. Usually it is named <span class="samp"><dll
|
||||
name>.def</span> and is added as any other object file to the linker's
|
||||
command line. The file's name must end in <span class="samp">.def</span> or <span class="samp">.DEF</span>.
|
||||
|
||||
<pre class="example"> gcc -o <output> <objectfiles> <dll name>.def
|
||||
</pre>
|
||||
<p>Using a DEF file turns off the normal auto-export behavior, unless the
|
||||
<span class="samp">--export-all-symbols</span> option is also used.
|
||||
|
||||
<p>Here is an example of a DEF file for a shared library called <span class="samp">xyz.dll</span>:
|
||||
|
||||
<pre class="example"> LIBRARY "xyz.dll" BASE=0x20000000
|
||||
|
||||
EXPORTS
|
||||
foo
|
||||
bar
|
||||
_bar = bar
|
||||
another_foo = abc.dll.afoo
|
||||
var1 DATA
|
||||
</pre>
|
||||
<p>This example defines a DLL with a non-default base address and five
|
||||
symbols in the export table. The third exported symbol <code>_bar</code> is an
|
||||
alias for the second. The fourth symbol, <code>another_foo</code> is resolved
|
||||
by "forwarding" to another module and treating it as an alias for
|
||||
<code>afoo</code> exported from the DLL <span class="samp">abc.dll</span>. The final symbol
|
||||
<code>var1</code> is declared to be a data object.
|
||||
|
||||
<p>The optional <code>LIBRARY <name></code> command indicates the <em>internal</em>
|
||||
name of the output DLL. If <span class="samp"><name></span> does not include a suffix,
|
||||
the default library suffix, <span class="samp">.DLL</span> is appended.
|
||||
|
||||
<p>When the .DEF file is used to build an application, rather than a
|
||||
library, the <code>NAME <name></code> command should be used instead of
|
||||
<code>LIBRARY</code>. If <span class="samp"><name></span> does not include a suffix, the default
|
||||
executable suffix, <span class="samp">.EXE</span> is appended.
|
||||
|
||||
<p>With either <code>LIBRARY <name></code> or <code>NAME <name></code> the optional
|
||||
specification <code>BASE = <number></code> may be used to specify a
|
||||
non-default base address for the image.
|
||||
|
||||
<p>If neither <code>LIBRARY <name></code> nor <code>NAME <name></code> is specified,
|
||||
or they specify an empty string, the internal name is the same as the
|
||||
filename specified on the command line.
|
||||
|
||||
<p>The complete specification of an export symbol is:
|
||||
|
||||
<pre class="example"> EXPORTS
|
||||
( ( ( <name1> [ = <name2> ] )
|
||||
| ( <name1> = <module-name> . <external-name>))
|
||||
[ @ <integer> ] [NONAME] [DATA] [CONSTANT] [PRIVATE] ) *
|
||||
</pre>
|
||||
<p>Declares <span class="samp"><name1></span> as an exported symbol from the DLL, or declares
|
||||
<span class="samp"><name1></span> as an exported alias for <span class="samp"><name2></span>; or declares
|
||||
<span class="samp"><name1></span> as a "forward" alias for the symbol
|
||||
<span class="samp"><external-name></span> in the DLL <span class="samp"><module-name></span>.
|
||||
Optionally, the symbol may be exported by the specified ordinal
|
||||
<span class="samp"><integer></span> alias.
|
||||
|
||||
<p>The optional keywords that follow the declaration indicate:
|
||||
|
||||
<p><code>NONAME</code>: Do not put the symbol name in the DLL's export table. It
|
||||
will still be exported by its ordinal alias (either the value specified
|
||||
by the .def specification or, otherwise, the value assigned by the
|
||||
linker). The symbol name, however, does remain visible in the import
|
||||
library (if any), unless <code>PRIVATE</code> is also specified.
|
||||
|
||||
<p><code>DATA</code>: The symbol is a variable or object, rather than a function.
|
||||
The import lib will export only an indirect reference to <code>foo</code> as
|
||||
the symbol <code>_imp__foo</code> (ie, <code>foo</code> must be resolved as
|
||||
<code>*_imp__foo</code>).
|
||||
|
||||
<p><code>CONSTANT</code>: Like <code>DATA</code>, but put the undecorated <code>foo</code> as
|
||||
well as <code>_imp__foo</code> into the import library. Both refer to the
|
||||
read-only import address table's pointer to the variable, not to the
|
||||
variable itself. This can be dangerous. If the user code fails to add
|
||||
the <code>dllimport</code> attribute and also fails to explicitly add the
|
||||
extra indirection that the use of the attribute enforces, the
|
||||
application will behave unexpectedly.
|
||||
|
||||
<p><code>PRIVATE</code>: Put the symbol in the DLL's export table, but do not put
|
||||
it into the static import library used to resolve imports at link time. The
|
||||
symbol can still be imported using the <code>LoadLibrary/GetProcAddress</code>
|
||||
API at runtime or by by using the GNU ld extension of linking directly to
|
||||
the DLL without an import library.
|
||||
|
||||
<p>See ld/deffilep.y in the binutils sources for the full specification of
|
||||
other DEF file statements
|
||||
|
||||
<p><a name="index-creating-a-DEF-file-618"></a>While linking a shared dll, <span class="command">ld</span> is able to create a DEF file
|
||||
with the <span class="samp">--output-def <file></span> command line option.
|
||||
|
||||
<br><dt><em>Using decorations</em><dd><a name="index-Using-decorations-619"></a>Another way of marking symbols for export is to modify the source code
|
||||
itself, so that when building the DLL each symbol to be exported is
|
||||
declared as:
|
||||
|
||||
<pre class="example"> __declspec(dllexport) int a_variable
|
||||
__declspec(dllexport) void a_function(int with_args)
|
||||
</pre>
|
||||
<p>All such symbols will be exported from the DLL. If, however,
|
||||
any of the object files in the DLL contain symbols decorated in
|
||||
this way, then the normal auto-export behavior is disabled, unless
|
||||
the <span class="samp">--export-all-symbols</span> option is also used.
|
||||
|
||||
<p>Note that object files that wish to access these symbols must <em>not</em>
|
||||
decorate them with dllexport. Instead, they should use dllimport,
|
||||
instead:
|
||||
|
||||
<pre class="example"> __declspec(dllimport) int a_variable
|
||||
__declspec(dllimport) void a_function(int with_args)
|
||||
</pre>
|
||||
<p>This complicates the structure of library header files, because
|
||||
when included by the library itself the header must declare the
|
||||
variables and functions as dllexport, but when included by client
|
||||
code the header must declare them as dllimport. There are a number
|
||||
of idioms that are typically used to do this; often client code can
|
||||
omit the __declspec() declaration completely. See
|
||||
<span class="samp">--enable-auto-import</span> and <span class="samp">automatic data imports</span> for more
|
||||
information.
|
||||
</dl>
|
||||
|
||||
<p><a name="index-automatic-data-imports-620"></a><br><dt><em>automatic data imports</em><dd>The standard Windows dll format supports data imports from dlls only
|
||||
by adding special decorations (dllimport/dllexport), which let the
|
||||
compiler produce specific assembler instructions to deal with this
|
||||
issue. This increases the effort necessary to port existing Un*x
|
||||
code to these platforms, especially for large
|
||||
c++ libraries and applications. The auto-import feature, which was
|
||||
initially provided by Paul Sokolovsky, allows one to omit the
|
||||
decorations to achieve a behavior that conforms to that on POSIX/Un*x
|
||||
platforms. This feature is enabled with the <span class="samp">--enable-auto-import</span>
|
||||
command-line option, although it is enabled by default on cygwin/mingw.
|
||||
The <span class="samp">--enable-auto-import</span> option itself now serves mainly to
|
||||
suppress any warnings that are ordinarily emitted when linked objects
|
||||
trigger the feature's use.
|
||||
|
||||
<p>auto-import of variables does not always work flawlessly without
|
||||
additional assistance. Sometimes, you will see this message
|
||||
|
||||
<p>"variable '<var>' can't be auto-imported. Please read the
|
||||
documentation for ld's <code>--enable-auto-import</code> for details."
|
||||
|
||||
<p>The <span class="samp">--enable-auto-import</span> documentation explains why this error
|
||||
occurs, and several methods that can be used to overcome this difficulty.
|
||||
One of these methods is the <em>runtime pseudo-relocs</em> feature, described
|
||||
below.
|
||||
|
||||
<p><a name="index-runtime-pseudo_002drelocation-621"></a>For complex variables imported from DLLs (such as structs or classes),
|
||||
object files typically contain a base address for the variable and an
|
||||
offset (<em>addend</em>) within the variable–to specify a particular
|
||||
field or public member, for instance. Unfortunately, the runtime loader used
|
||||
in win32 environments is incapable of fixing these references at runtime
|
||||
without the additional information supplied by dllimport/dllexport decorations.
|
||||
The standard auto-import feature described above is unable to resolve these
|
||||
references.
|
||||
|
||||
<p>The <span class="samp">--enable-runtime-pseudo-relocs</span> switch allows these references to
|
||||
be resolved without error, while leaving the task of adjusting the references
|
||||
themselves (with their non-zero addends) to specialized code provided by the
|
||||
runtime environment. Recent versions of the cygwin and mingw environments and
|
||||
compilers provide this runtime support; older versions do not. However, the
|
||||
support is only necessary on the developer's platform; the compiled result will
|
||||
run without error on an older system.
|
||||
|
||||
<p><span class="samp">--enable-runtime-pseudo-relocs</span> is not the default; it must be explicitly
|
||||
enabled as needed.
|
||||
|
||||
<p><a name="index-direct-linking-to-a-dll-622"></a><br><dt><em>direct linking to a dll</em><dd>The cygwin/mingw ports of <span class="command">ld</span> support the direct linking,
|
||||
including data symbols, to a dll without the usage of any import
|
||||
libraries. This is much faster and uses much less memory than does the
|
||||
traditional import library method, especially when linking large
|
||||
libraries or applications. When <span class="command">ld</span> creates an import lib, each
|
||||
function or variable exported from the dll is stored in its own bfd, even
|
||||
though a single bfd could contain many exports. The overhead involved in
|
||||
storing, loading, and processing so many bfd's is quite large, and explains the
|
||||
tremendous time, memory, and storage needed to link against particularly
|
||||
large or complex libraries when using import libs.
|
||||
|
||||
<p>Linking directly to a dll uses no extra command-line switches other than
|
||||
<span class="samp">-L</span> and <span class="samp">-l</span>, because <span class="command">ld</span> already searches for a number
|
||||
of names to match each library. All that is needed from the developer's
|
||||
perspective is an understanding of this search, in order to force ld to
|
||||
select the dll instead of an import library.
|
||||
|
||||
<p>For instance, when ld is called with the argument <span class="samp">-lxxx</span> it will attempt
|
||||
to find, in the first directory of its search path,
|
||||
|
||||
<pre class="example"> libxxx.dll.a
|
||||
xxx.dll.a
|
||||
libxxx.a
|
||||
xxx.lib
|
||||
cygxxx.dll (*)
|
||||
libxxx.dll
|
||||
xxx.dll
|
||||
</pre>
|
||||
<p>before moving on to the next directory in the search path.
|
||||
|
||||
<p>(*) Actually, this is not <span class="samp">cygxxx.dll</span> but in fact is <span class="samp"><prefix>xxx.dll</span>,
|
||||
where <span class="samp"><prefix></span> is set by the <span class="command">ld</span> option
|
||||
<span class="samp">--dll-search-prefix=<prefix></span>. In the case of cygwin, the standard gcc spec
|
||||
file includes <span class="samp">--dll-search-prefix=cyg</span>, so in effect we actually search for
|
||||
<span class="samp">cygxxx.dll</span>.
|
||||
|
||||
<p>Other win32-based unix environments, such as mingw or pw32, may use other
|
||||
<span class="samp"><prefix></span>es, although at present only cygwin makes use of this feature. It
|
||||
was originally intended to help avoid name conflicts among dll's built for the
|
||||
various win32/un*x environments, so that (for example) two versions of a zlib dll
|
||||
could coexist on the same machine.
|
||||
|
||||
<p>The generic cygwin/mingw path layout uses a <span class="samp">bin</span> directory for
|
||||
applications and dll's and a <span class="samp">lib</span> directory for the import
|
||||
libraries (using cygwin nomenclature):
|
||||
|
||||
<pre class="example"> bin/
|
||||
cygxxx.dll
|
||||
lib/
|
||||
libxxx.dll.a (in case of dll's)
|
||||
libxxx.a (in case of static archive)
|
||||
</pre>
|
||||
<p>Linking directly to a dll without using the import library can be
|
||||
done two ways:
|
||||
|
||||
<p>1. Use the dll directly by adding the <span class="samp">bin</span> path to the link line
|
||||
<pre class="example"> gcc -Wl,-verbose -o a.exe -L../bin/ -lxxx
|
||||
</pre>
|
||||
<p>However, as the dll's often have version numbers appended to their names
|
||||
(<span class="samp">cygncurses-5.dll</span>) this will often fail, unless one specifies
|
||||
<span class="samp">-L../bin -lncurses-5</span> to include the version. Import libs are generally
|
||||
not versioned, and do not have this difficulty.
|
||||
|
||||
<p>2. Create a symbolic link from the dll to a file in the <span class="samp">lib</span>
|
||||
directory according to the above mentioned search pattern. This
|
||||
should be used to avoid unwanted changes in the tools needed for
|
||||
making the app/dll.
|
||||
|
||||
<pre class="example"> ln -s bin/cygxxx.dll lib/[cyg|lib|]xxx.dll[.a]
|
||||
</pre>
|
||||
<p>Then you can link without any make environment changes.
|
||||
|
||||
<pre class="example"> gcc -Wl,-verbose -o a.exe -L../lib/ -lxxx
|
||||
</pre>
|
||||
<p>This technique also avoids the version number problems, because the following is
|
||||
perfectly legal
|
||||
|
||||
<pre class="example"> bin/
|
||||
cygxxx-5.dll
|
||||
lib/
|
||||
libxxx.dll.a -> ../bin/cygxxx-5.dll
|
||||
</pre>
|
||||
<p>Linking directly to a dll without using an import lib will work
|
||||
even when auto-import features are exercised, and even when
|
||||
<span class="samp">--enable-runtime-pseudo-relocs</span> is used.
|
||||
|
||||
<p>Given the improvements in speed and memory usage, one might justifiably
|
||||
wonder why import libraries are used at all. There are three reasons:
|
||||
|
||||
<p>1. Until recently, the link-directly-to-dll functionality did <em>not</em>
|
||||
work with auto-imported data.
|
||||
|
||||
<p>2. Sometimes it is necessary to include pure static objects within the
|
||||
import library (which otherwise contains only bfd's for indirection
|
||||
symbols that point to the exports of a dll). Again, the import lib
|
||||
for the cygwin kernel makes use of this ability, and it is not
|
||||
possible to do this without an import lib.
|
||||
|
||||
<p>3. Symbol aliases can only be resolved using an import lib. This is
|
||||
critical when linking against OS-supplied dll's (eg, the win32 API)
|
||||
in which symbols are usually exported as undecorated aliases of their
|
||||
stdcall-decorated assembly names.
|
||||
|
||||
<p>So, import libs are not going away. But the ability to replace
|
||||
true import libs with a simple symbolic link to (or a copy of)
|
||||
a dll, in many cases, is a useful addition to the suite of tools
|
||||
binutils makes available to the win32 developer. Given the
|
||||
massive improvements in memory requirements during linking, storage
|
||||
requirements, and linking speed, we expect that many developers
|
||||
will soon begin to use this feature whenever possible.
|
||||
|
||||
<br><dt><em>symbol aliasing</em><dd>
|
||||
<dl>
|
||||
<dt><em>adding additional names</em><dd>Sometimes, it is useful to export symbols with additional names.
|
||||
A symbol <span class="samp">foo</span> will be exported as <span class="samp">foo</span>, but it can also be
|
||||
exported as <span class="samp">_foo</span> by using special directives in the DEF file
|
||||
when creating the dll. This will affect also the optional created
|
||||
import library. Consider the following DEF file:
|
||||
|
||||
<pre class="example"> LIBRARY "xyz.dll" BASE=0x61000000
|
||||
|
||||
EXPORTS
|
||||
foo
|
||||
_foo = foo
|
||||
</pre>
|
||||
<p>The line <span class="samp">_foo = foo</span> maps the symbol <span class="samp">foo</span> to <span class="samp">_foo</span>.
|
||||
|
||||
<p>Another method for creating a symbol alias is to create it in the
|
||||
source code using the "weak" attribute:
|
||||
|
||||
<pre class="example"> void foo () { /* Do something. */; }
|
||||
void _foo () __attribute__ ((weak, alias ("foo")));
|
||||
</pre>
|
||||
<p>See the gcc manual for more information about attributes and weak
|
||||
symbols.
|
||||
|
||||
<br><dt><em>renaming symbols</em><dd>Sometimes it is useful to rename exports. For instance, the cygwin
|
||||
kernel does this regularly. A symbol <span class="samp">_foo</span> can be exported as
|
||||
<span class="samp">foo</span> but not as <span class="samp">_foo</span> by using special directives in the
|
||||
DEF file. (This will also affect the import library, if it is
|
||||
created). In the following example:
|
||||
|
||||
<pre class="example"> LIBRARY "xyz.dll" BASE=0x61000000
|
||||
|
||||
EXPORTS
|
||||
_foo = foo
|
||||
</pre>
|
||||
<p>The line <span class="samp">_foo = foo</span> maps the exported symbol <span class="samp">foo</span> to
|
||||
<span class="samp">_foo</span>.
|
||||
</dl>
|
||||
|
||||
<p>Note: using a DEF file disables the default auto-export behavior,
|
||||
unless the <span class="samp">--export-all-symbols</span> command line option is used.
|
||||
If, however, you are trying to rename symbols, then you should list
|
||||
<em>all</em> desired exports in the DEF file, including the symbols
|
||||
that are not being renamed, and do <em>not</em> use the
|
||||
<span class="samp">--export-all-symbols</span> option. If you list only the
|
||||
renamed symbols in the DEF file, and use <span class="samp">--export-all-symbols</span>
|
||||
to handle the other symbols, then the both the new names <em>and</em>
|
||||
the original names for the renamed symbols will be exported.
|
||||
In effect, you'd be aliasing those symbols, not renaming them,
|
||||
which is probably not what you wanted.
|
||||
|
||||
<p><a name="index-weak-externals-623"></a><br><dt><em>weak externals</em><dd>The Windows object format, PE, specifies a form of weak symbols called
|
||||
weak externals. When a weak symbol is linked and the symbol is not
|
||||
defined, the weak symbol becomes an alias for some other symbol. There
|
||||
are three variants of weak externals:
|
||||
<ul>
|
||||
<li>Definition is searched for in objects and libraries, historically
|
||||
called lazy externals.
|
||||
<li>Definition is searched for only in other objects, not in libraries.
|
||||
This form is not presently implemented.
|
||||
<li>No search; the symbol is an alias. This form is not presently
|
||||
implemented.
|
||||
</ul>
|
||||
As a GNU extension, weak symbols that do not specify an alternate symbol
|
||||
are supported. If the symbol is undefined when linking, the symbol
|
||||
uses a default value.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Xtensa - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="WIN32.html#WIN32" title="WIN32">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Xtensa"></a>Previous: <a rel="previous" accesskey="p" href="WIN32.html#WIN32">WIN32</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.14 <code>ld</code> and Xtensa Processors</h3>
|
||||
|
||||
<p><a name="index-Xtensa-processors-624"></a>The default <span class="command">ld</span> behavior for Xtensa processors is to interpret
|
||||
<code>SECTIONS</code> commands so that lists of explicitly named sections in a
|
||||
specification with a wildcard file will be interleaved when necessary to
|
||||
keep literal pools within the range of PC-relative load offsets. For
|
||||
example, with the command:
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
.text : {
|
||||
*(.literal .text)
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent"><span class="command">ld</span> may interleave some of the <code>.literal</code>
|
||||
and <code>.text</code> sections from different object files to ensure that the
|
||||
literal pools are within the range of PC-relative load offsets. A valid
|
||||
interleaving might place the <code>.literal</code> sections from an initial
|
||||
group of files followed by the <code>.text</code> sections of that group of
|
||||
files. Then, the <code>.literal</code> sections from the rest of the files
|
||||
and the <code>.text</code> sections from the rest of the files would follow.
|
||||
|
||||
<p><a name="index-_0040option_007b_002d_002drelax_007d-on-Xtensa-625"></a><a name="index-relaxing-on-Xtensa-626"></a>Relaxation is enabled by default for the Xtensa version of <span class="command">ld</span> and
|
||||
provides two important link-time optimizations. The first optimization
|
||||
is to combine identical literal values to reduce code size. A redundant
|
||||
literal will be removed and all the <code>L32R</code> instructions that use it
|
||||
will be changed to reference an identical literal, as long as the
|
||||
location of the replacement literal is within the offset range of all
|
||||
the <code>L32R</code> instructions. The second optimization is to remove
|
||||
unnecessary overhead from assembler-generated “longcall” sequences of
|
||||
<code>L32R</code>/<code>CALLX</code><var>n</var> when the target functions are within
|
||||
range of direct <code>CALL</code><var>n</var> instructions.
|
||||
|
||||
<p>For each of these cases where an indirect call sequence can be optimized
|
||||
to a direct call, the linker will change the <code>CALLX</code><var>n</var>
|
||||
instruction to a <code>CALL</code><var>n</var> instruction, remove the <code>L32R</code>
|
||||
instruction, and remove the literal referenced by the <code>L32R</code>
|
||||
instruction if it is not used for anything else. Removing the
|
||||
<code>L32R</code> instruction always reduces code size but can potentially
|
||||
hurt performance by changing the alignment of subsequent branch targets.
|
||||
By default, the linker will always preserve alignments, either by
|
||||
switching some instructions between 24-bit encodings and the equivalent
|
||||
density instructions or by inserting a no-op in place of the <code>L32R</code>
|
||||
instruction that was removed. If code size is more important than
|
||||
performance, the <span class="option">--size-opt</span> option can be used to prevent the
|
||||
linker from widening density instructions or inserting no-ops, except in
|
||||
a few cases where no-ops are required for correctness.
|
||||
|
||||
<p>The following Xtensa-specific command-line options can be used to
|
||||
control the linker:
|
||||
|
||||
<p><a name="index-Xtensa-options-627"></a>
|
||||
|
||||
<a name="index-_002d_002dno_002drelax-628"></a>
|
||||
<dl><dt><span class="option">--no-relax</span><dd>Since the Xtensa version of <code>ld</code> enables the <span class="option">--relax</span> option
|
||||
by default, the <span class="option">--no-relax</span> option is provided to disable
|
||||
relaxation.
|
||||
|
||||
<br><dt><span class="option">--size-opt</span><dd>When optimizing indirect calls to direct calls, optimize for code size
|
||||
more than performance. With this option, the linker will not insert
|
||||
no-ops or widen density instructions to preserve branch target
|
||||
alignment. There may still be some cases where no-ops are required to
|
||||
preserve the correctness of the code.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>i960 - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.7">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Machine-Dependent.html#Machine-Dependent" title="Machine Dependent">
|
||||
<link rel="prev" href="H8_002f300.html#H8_002f300" title="H8/300">
|
||||
<link rel="next" href="ARM.html#ARM" title="ARM">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled ``GNU Free Documentation License''.-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="i960"></a>Next: <a rel="next" accesskey="n" href="ARM.html#ARM">ARM</a>,
|
||||
Previous: <a rel="previous" accesskey="p" href="H8_002f300.html#H8_002f300">H8/300</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.2 <span class="command">ld</span> and the Intel 960 Family</h3>
|
||||
|
||||
<p><a name="index-i960-support-525"></a>
|
||||
You can use the <span class="samp">-A</span><var>architecture</var> command line option to
|
||||
specify one of the two-letter names identifying members of the 960
|
||||
family; the option specifies the desired output target, and warns of any
|
||||
incompatible instructions in the input files. It also modifies the
|
||||
linker's search strategy for archive libraries, to support the use of
|
||||
libraries specific to each particular architecture, by including in the
|
||||
search loop names suffixed with the string identifying the architecture.
|
||||
|
||||
<p>For example, if your <span class="command">ld</span> command line included <span class="samp">-ACA</span><!-- /@w --> as
|
||||
well as <span class="samp">-ltry</span><!-- /@w -->, the linker would look (in its built-in search
|
||||
paths, and in any paths you specify with <span class="samp">-L</span>) for a library with
|
||||
the names
|
||||
|
||||
<pre class="smallexample"> try
|
||||
libtry.a
|
||||
tryca
|
||||
libtryca.a
|
||||
</pre>
|
||||
<p class="noindent">The first two possibilities would be considered in any event; the last
|
||||
two are due to the use of <span class="samp">-ACA</span><!-- /@w -->.
|
||||
|
||||
<p>You can meaningfully use <span class="samp">-A</span> more than once on a command line, since
|
||||
the 960 architecture family allows combination of target architectures; each
|
||||
use will add another pair of name variants to search for when <span class="samp">-l</span><!-- /@w -->
|
||||
specifies a library.
|
||||
|
||||
<p><a name="index-_0040option_007b_002d_002drelax_007d-on-i960-526"></a><a name="index-relaxing-on-i960-527"></a><span class="command">ld</span> supports the <span class="samp">--relax</span> option for the i960 family. If
|
||||
you specify <span class="samp">--relax</span>, <span class="command">ld</span> finds all <code>balx</code> and
|
||||
<code>calx</code> instructions whose targets are within 24 bits, and turns
|
||||
them into 24-bit program-counter relative <code>bal</code> and <code>cal</code>
|
||||
instructions, respectively. <span class="command">ld</span> also turns <code>cal</code>
|
||||
instructions into <code>bal</code> instructions when it determines that the
|
||||
target subroutine is a leaf routine (that is, the target subroutine does
|
||||
not itself call any subroutines).
|
||||
|
||||
</body></html>
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
<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.7">
|
||||
<link title="Top" rel="start" href="#Top">
|
||||
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||||
<!--
|
||||
This file documents the GNU linker LD
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, with no Front-Cover Texts, and with no
|
||||
Back-Cover Texts. A copy of the license is included in the
|
||||
section entitled "GNU Free Documentation License".-->
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css"><!--
|
||||
pre.display { font-family:inherit }
|
||||
pre.format { font-family:inherit }
|
||||
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||||
pre.smallformat { font-family:inherit; font-size:smaller }
|
||||
pre.smallexample { font-size:smaller }
|
||||
pre.smalllisp { font-size:smaller }
|
||||
span.sc { font-variant:small-caps }
|
||||
span.roman { font-family: serif; font-weight: normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<ul>
|
||||
<li><a name="toc_Top" href="index.html#Top">LD</a>
|
||||
<li><a name="toc_Overview" href="Overview.html#Overview">1 Overview</a>
|
||||
<li><a name="toc_Invocation" href="Invocation.html#Invocation">2 Invocation</a>
|
||||
<ul>
|
||||
<li><a href="Options.html#Options">2.1 Command Line Options</a>
|
||||
<ul>
|
||||
<li><a href="Options.html#Options">2.1.1 Options Specific to i386 PE Targets</a>
|
||||
<li><a href="Options.html#Options">2.1.2 Options specific to Motorola 68HC11 and 68HC12 targets</a>
|
||||
<li><a href="Options.html#Options">2.1.3 Options specific to Motorola 68K target</a>
|
||||
</li></ul>
|
||||
<li><a href="Environment.html#Environment">2.2 Environment Variables</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Scripts" href="Scripts.html#Scripts">3 Linker Scripts</a>
|
||||
<ul>
|
||||
<li><a href="Basic-Script-Concepts.html#Basic-Script-Concepts">3.1 Basic Linker Script Concepts</a>
|
||||
<li><a href="Script-Format.html#Script-Format">3.2 Linker Script Format</a>
|
||||
<li><a href="Simple-Example.html#Simple-Example">3.3 Simple Linker Script Example</a>
|
||||
<li><a href="Simple-Commands.html#Simple-Commands">3.4 Simple Linker Script Commands</a>
|
||||
<ul>
|
||||
<li><a href="Entry-Point.html#Entry-Point">3.4.1 Setting the Entry Point</a>
|
||||
<li><a href="File-Commands.html#File-Commands">3.4.2 Commands Dealing with Files</a>
|
||||
<li><a href="Format-Commands.html#Format-Commands">3.4.3 Commands Dealing with Object File Formats</a>
|
||||
<li><a href="Miscellaneous-Commands.html#Miscellaneous-Commands">3.4.4 Other Linker Script Commands</a>
|
||||
</li></ul>
|
||||
<li><a href="Assignments.html#Assignments">3.5 Assigning Values to Symbols</a>
|
||||
<ul>
|
||||
<li><a href="Simple-Assignments.html#Simple-Assignments">3.5.1 Simple Assignments</a>
|
||||
<li><a href="PROVIDE.html#PROVIDE">3.5.2 PROVIDE</a>
|
||||
<li><a href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">3.5.3 PROVIDE_HIDDEN</a>
|
||||
<li><a href="Source-Code-Reference.html#Source-Code-Reference">3.5.4 Source Code Reference</a>
|
||||
</li></ul>
|
||||
<li><a href="SECTIONS.html#SECTIONS">3.6 SECTIONS Command</a>
|
||||
<ul>
|
||||
<li><a href="Output-Section-Description.html#Output-Section-Description">3.6.1 Output Section Description</a>
|
||||
<li><a href="Output-Section-Name.html#Output-Section-Name">3.6.2 Output Section Name</a>
|
||||
<li><a href="Output-Section-Address.html#Output-Section-Address">3.6.3 Output Section Address</a>
|
||||
<li><a href="Input-Section.html#Input-Section">3.6.4 Input Section Description</a>
|
||||
<ul>
|
||||
<li><a href="Input-Section-Basics.html#Input-Section-Basics">3.6.4.1 Input Section Basics</a>
|
||||
<li><a href="Input-Section-Wildcards.html#Input-Section-Wildcards">3.6.4.2 Input Section Wildcard Patterns</a>
|
||||
<li><a href="Input-Section-Common.html#Input-Section-Common">3.6.4.3 Input Section for Common Symbols</a>
|
||||
<li><a href="Input-Section-Keep.html#Input-Section-Keep">3.6.4.4 Input Section and Garbage Collection</a>
|
||||
<li><a href="Input-Section-Example.html#Input-Section-Example">3.6.4.5 Input Section Example</a>
|
||||
</li></ul>
|
||||
<li><a href="Output-Section-Data.html#Output-Section-Data">3.6.5 Output Section Data</a>
|
||||
<li><a href="Output-Section-Keywords.html#Output-Section-Keywords">3.6.6 Output Section Keywords</a>
|
||||
<li><a href="Output-Section-Discarding.html#Output-Section-Discarding">3.6.7 Output Section Discarding</a>
|
||||
<li><a href="Output-Section-Attributes.html#Output-Section-Attributes">3.6.8 Output Section Attributes</a>
|
||||
<ul>
|
||||
<li><a href="Output-Section-Type.html#Output-Section-Type">3.6.8.1 Output Section Type</a>
|
||||
<li><a href="Output-Section-LMA.html#Output-Section-LMA">3.6.8.2 Output Section LMA</a>
|
||||
<li><a href="Forced-Output-Alignment.html#Forced-Output-Alignment">3.6.8.3 Forced Output Alignment</a>
|
||||
<li><a href="Forced-Input-Alignment.html#Forced-Input-Alignment">3.6.8.4 Forced Input Alignment</a>
|
||||
<li><a href="Output-Section-Region.html#Output-Section-Region">3.6.8.5 Output Section Region</a>
|
||||
<li><a href="Output-Section-Phdr.html#Output-Section-Phdr">3.6.8.6 Output Section Phdr</a>
|
||||
<li><a href="Output-Section-Fill.html#Output-Section-Fill">3.6.8.7 Output Section Fill</a>
|
||||
</li></ul>
|
||||
<li><a href="Overlay-Description.html#Overlay-Description">3.6.9 Overlay Description</a>
|
||||
</li></ul>
|
||||
<li><a href="MEMORY.html#MEMORY">3.7 MEMORY Command</a>
|
||||
<li><a href="PHDRS.html#PHDRS">3.8 PHDRS Command</a>
|
||||
<li><a href="VERSION.html#VERSION">3.9 VERSION Command</a>
|
||||
<li><a href="Expressions.html#Expressions">3.10 Expressions in Linker Scripts</a>
|
||||
<ul>
|
||||
<li><a href="Constants.html#Constants">3.10.1 Constants</a>
|
||||
<li><a href="Symbols.html#Symbols">3.10.2 Symbol Names</a>
|
||||
<li><a href="Orphan-Sections.html#Orphan-Sections">3.10.3 Orphan Sections</a>
|
||||
<li><a href="Location-Counter.html#Location-Counter">3.10.4 The Location Counter</a>
|
||||
<li><a href="Operators.html#Operators">3.10.5 Operators</a>
|
||||
<li><a href="Evaluation.html#Evaluation">3.10.6 Evaluation</a>
|
||||
<li><a href="Expression-Section.html#Expression-Section">3.10.7 The Section of an Expression</a>
|
||||
<li><a href="Builtin-Functions.html#Builtin-Functions">3.10.8 Builtin Functions</a>
|
||||
</li></ul>
|
||||
<li><a href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts">3.11 Implicit Linker Scripts</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_Machine-Dependent" href="Machine-Dependent.html#Machine-Dependent">4 Machine Dependent Features</a>
|
||||
<ul>
|
||||
<li><a href="H8_002f300.html#H8_002f300">4.1 <span class="command">ld</span> and the H8/300</a>
|
||||
<li><a href="i960.html#i960">4.2 <span class="command">ld</span> and the Intel 960 Family</a>
|
||||
<li><a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">4.3 <span class="command">ld</span> and the Motorola 68HC11 and 68HC12 families</a>
|
||||
<ul>
|
||||
<li><a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">4.3.1 Linker Relaxation</a>
|
||||
<li><a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">4.3.2 Trampoline Generation</a>
|
||||
</li></ul>
|
||||
<li><a href="ARM.html#ARM">4.4 <span class="command">ld</span> and the ARM family</a>
|
||||
<li><a href="HPPA-ELF32.html#HPPA-ELF32">4.5 <span class="command">ld</span> and HPPA 32-bit ELF Support</a>
|
||||
<li><a href="M68K.html#M68K">4.6 <span class="command">ld</span> and the Motorola 68K family</a>
|
||||
<li><a href="MMIX.html#MMIX">4.7 <code>ld</code> and MMIX</a>
|
||||
<li><a href="MSP430.html#MSP430">4.8 <code>ld</code> and MSP430</a>
|
||||
<li><a href="PowerPC-ELF32.html#PowerPC-ELF32">4.9 <span class="command">ld</span> and PowerPC 32-bit ELF Support</a>
|
||||
<li><a href="PowerPC64-ELF64.html#PowerPC64-ELF64">4.10 <span class="command">ld</span> and PowerPC64 64-bit ELF Support</a>
|
||||
<li><a href="SPU-ELF.html#SPU-ELF">4.11 <span class="command">ld</span> and SPU ELF Support</a>
|
||||
<li><a href="TI-COFF.html#TI-COFF">4.12 <span class="command">ld</span>'s Support for Various TI COFF Versions</a>
|
||||
<li><a href="WIN32.html#WIN32">4.13 <span class="command">ld</span> and WIN32 (cygwin/mingw)</a>
|
||||
<li><a href="Xtensa.html#Xtensa">4.14 <code>ld</code> and Xtensa Processors</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_BFD" href="BFD.html#BFD">5 BFD</a>
|
||||
<ul>
|
||||
<li><a href="BFD-outline.html#BFD-outline">5.1 How It Works: An Outline of BFD</a>
|
||||
<ul>
|
||||
<li><a href="BFD-information-loss.html#BFD-information-loss">5.1.1 Information Loss</a>
|
||||
<li><a href="Canonical-format.html#Canonical-format">5.1.2 The BFD canonical object-file format</a>
|
||||
</li></ul>
|
||||
</li></ul>
|
||||
<li><a name="toc_Reporting-Bugs" href="Reporting-Bugs.html#Reporting-Bugs">6 Reporting Bugs</a>
|
||||
<ul>
|
||||
<li><a href="Bug-Criteria.html#Bug-Criteria">6.1 Have You Found a Bug?</a>
|
||||
<li><a href="Bug-Reporting.html#Bug-Reporting">6.2 How to Report Bugs</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_MRI" href="MRI.html#MRI">Appendix A MRI Compatible Script Files</a>
|
||||
<li><a name="toc_GNU-Free-Documentation-License" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">Appendix B GNU Free Documentation License</a>
|
||||
<ul>
|
||||
<li><a href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">ADDENDUM: How to use this License for your documents</a>
|
||||
</li></ul>
|
||||
<li><a name="toc_LD-Index" href="LD-Index.html#LD-Index">LD Index</a>
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- FIXME: Talk about importance of *order* of args, cmds to linker! -->
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Top"></a>Next: <a rel="next" accesskey="n" href="Overview.html#Overview">Overview</a>,
|
||||
Up: <a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
|
||||
<hr><br>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">LD</h2>
|
||||
|
||||
<p>This file documents the <span class="sc">gnu</span> linker ld
|
||||
(GNU Binutils)
|
||||
version 2.19.
|
||||
|
||||
<p>This document is distributed under the terms of the GNU Free
|
||||
Documentation License. A copy of the license is included in the
|
||||
section entitled “GNU Free Documentation License”.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="Overview.html#Overview">Overview</a>: Overview
|
||||
<li><a accesskey="2" href="Invocation.html#Invocation">Invocation</a>: Invocation
|
||||
<li><a accesskey="3" href="Scripts.html#Scripts">Scripts</a>: Linker Scripts
|
||||
|
||||
<li><a accesskey="4" href="Machine-Dependent.html#Machine-Dependent">Machine Dependent</a>: Machine Dependent Features
|
||||
|
||||
<li><a accesskey="5" href="BFD.html#BFD">BFD</a>: BFD
|
||||
<!-- Following blank line required for remaining bug in makeinfo conds/menus -->
|
||||
|
||||
<li><a accesskey="6" href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a>: Reporting Bugs
|
||||
<li><a accesskey="7" href="MRI.html#MRI">MRI</a>: MRI Compatible Script Files
|
||||
<li><a accesskey="8" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>: GNU Free Documentation License
|
||||
<li><a accesskey="9" href="LD-Index.html#LD-Index">LD Index</a>: LD Index
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
Reference in a new issue