mirror of
https://github.com/rtlduino/RTL8710AF_GCC.git
synced 2026-07-14 07:15:42 +00:00
motify compile link error
motify compile link error
This commit is contained in:
parent
923914edae
commit
03e74a8e50
5418 changed files with 1367914 additions and 206149 deletions
|
|
@ -0,0 +1,208 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.4 <samp><span class="command">ld</span></samp> and the ARM family</h3>
|
||||
|
||||
<p><a name="index-ARM-interworking-support-584"></a><a name="index-g_t_002d_002dsupport_002dold_002dcode-585"></a>For the ARM, <samp><span class="command">ld</span></samp> 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 ‘<samp><span class="samp">-mthumb-interwork</span></samp>’ 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 ‘<samp><span class="samp">--support-old-code</span></samp>’ 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-586"></a><a name="index-entry-point_002c-thumb-587"></a><a name="index-g_t_002d_002dthumb_002dentry_003d_0040var_007bentry_007d-588"></a>The ‘<samp><span class="samp">--thumb-entry</span></samp>’ switch is a duplicate of the generic
|
||||
‘<samp><span class="samp">--entry</span></samp>’ 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-PE-import-table-prefixing-589"></a><a name="index-g_t_002d_002duse_002dnul_002dprefixed_002dimport_002dtables-590"></a>The ‘<samp><span class="samp">--use-nul-prefixed-import-tables</span></samp>’ switch is specifying, that
|
||||
the import tables idata4 and idata5 have to be generated with a zero
|
||||
elememt prefix for import libraries. This is the old style to generate
|
||||
import tables. By default this option is turned off.
|
||||
|
||||
<p><a name="index-BE8-591"></a><a name="index-g_t_002d_002dbe8-592"></a>The ‘<samp><span class="samp">--be8</span></samp>’ switch instructs <samp><span class="command">ld</span></samp> 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-593"></a><a name="index-g_t_002d_002dtarget1_002drel-594"></a><a name="index-g_t_002d_002dtarget1_002dabs-595"></a>The ‘<samp><span class="samp">R_ARM_TARGET1</span></samp>’ relocation is typically used for entries in the
|
||||
‘<samp><span class="samp">.init_array</span></samp>’ section. It is interpreted as either ‘<samp><span class="samp">R_ARM_REL32</span></samp>’
|
||||
or ‘<samp><span class="samp">R_ARM_ABS32</span></samp>’, depending on the target. The ‘<samp><span class="samp">--target1-rel</span></samp>’
|
||||
and ‘<samp><span class="samp">--target1-abs</span></samp>’ switches override the default.
|
||||
|
||||
<p><a name="index-TARGET2-596"></a><a name="index-g_t_002d_002dtarget2_003d_0040var_007btype_007d-597"></a>The ‘<samp><span class="samp">--target2=type</span></samp>’ switch overrides the default definition of the
|
||||
‘<samp><span class="samp">R_ARM_TARGET2</span></samp>’ relocation. Valid values for ‘<samp><span class="samp">type</span></samp>’, their
|
||||
meanings, and target defaults are as follows:
|
||||
<dl>
|
||||
<dt>‘<samp><span class="samp">rel</span></samp>’<dd>‘<samp><span class="samp">R_ARM_REL32</span></samp>’ (arm*-*-elf, arm*-*-eabi)
|
||||
<br><dt>‘<samp><span class="samp">abs</span></samp>’<dd>‘<samp><span class="samp">R_ARM_ABS32</span></samp>’ (arm*-*-symbianelf)
|
||||
<br><dt>‘<samp><span class="samp">got-rel</span></samp>’<dd>‘<samp><span class="samp">R_ARM_GOT_PREL</span></samp>’ (arm*-*-linux, arm*-*-*bsd)
|
||||
</dl>
|
||||
|
||||
<p><a name="index-FIX_005fV4BX-598"></a><a name="index-g_t_002d_002dfix_002dv4bx-599"></a>The ‘<samp><span class="samp">R_ARM_V4BX</span></samp>’ 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 <samp><span class="option">--fix-v4bx</span></samp> 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 ‘<samp><span class="samp">R_ARM_V4BX</span></samp>’
|
||||
relocations are ignored.
|
||||
|
||||
<p><a name="index-FIX_005fV4BX_005fINTERWORKING-600"></a><a name="index-g_t_002d_002dfix_002dv4bx_002dinterworking-601"></a>Replace <code>BX rM</code> instructions identified by ‘<samp><span class="samp">R_ARM_V4BX</span></samp>’
|
||||
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-602"></a><a name="index-g_t_002d_002duse_002dblx-603"></a>The ‘<samp><span class="samp">--use-blx</span></samp>’ 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-604"></a><a name="index-g_t_002d_002dvfp11_002ddenorm_002dfix-605"></a>The ‘<samp><span class="samp">--vfp11-denorm-fix</span></samp>’ 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
|
||||
‘<samp><span class="samp">--vfp-denorm-fix=scalar</span></samp>’ if you are using the VFP11 scalar
|
||||
mode only, or ‘<samp><span class="samp">--vfp-denorm-fix=vector</span></samp>’ if you are using
|
||||
vector mode (the latter also works for scalar code). The default is
|
||||
‘<samp><span class="samp">--vfp-denorm-fix=none</span></samp>’.
|
||||
|
||||
<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-ARM1176-erratum-workaround-606"></a><a name="index-g_t_002d_002dfix_002darm1176-607"></a><a name="index-g_t_002d_002dno_002dfix_002darm1176-608"></a>The ‘<samp><span class="samp">--fix-arm1176</span></samp>’ switch enables a link-time workaround for an erratum
|
||||
in certain ARM1176 processors. The workaround is enabled by default if you
|
||||
are targetting ARM v6 (excluding ARM v6T2) or earlier. It can be disabled
|
||||
unconditionally by specifying ‘<samp><span class="samp">--no-fix-arm1176</span></samp>’.
|
||||
|
||||
<p>Further information is available in the “ARM1176JZ-S and ARM1176JZF-S
|
||||
Programmer Advice Notice” available on the ARM documentaion website at:
|
||||
http://infocenter.arm.com/.
|
||||
|
||||
<p><a name="index-NO_005fENUM_005fSIZE_005fWARNING-609"></a><a name="index-g_t_002d_002dno_002denum_002dsize_002dwarning-610"></a>The <samp><span class="option">--no-enum-size-warning</span></samp> 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-611"></a><a name="index-g_t_002d_002dno_002dwchar_002dsize_002dwarning-612"></a>The <samp><span class="option">--no-wchar-size-warning</span></samp> 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-613"></a><a name="index-g_t_002d_002dpic_002dveneer-614"></a>The ‘<samp><span class="samp">--pic-veneer</span></samp>’ 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
|
||||
‘<samp><span class="samp">--emit-relocs</span></samp>’ is used to generate relocatable binaries.
|
||||
|
||||
<p><a name="index-STUB_005fGROUP_005fSIZE-615"></a><a name="index-g_t_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-616"></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 <samp><span class="option">--stub-group-size=N</span></samp>.
|
||||
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 ‘<samp><span class="samp">N</span></samp>’, the parameter to the
|
||||
<samp><span class="option">--stub-group-size=</span></samp> option controls where the stub groups are
|
||||
placed. If it is negative then all stubs are placed after 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 ‘<samp><span class="samp">N</span></samp>’ 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 ‘<samp><span class="samp">N</span></samp>’ greater than 1 (or smaller than -1) tells the
|
||||
linker that a single group of stubs can service at most ‘<samp><span class="samp">N</span></samp>’ bytes
|
||||
from the input sections.
|
||||
|
||||
<p>The default, if <samp><span class="option">--stub-group-size=</span></samp> is not specified, is
|
||||
‘<samp><span class="samp">N = +1</span></samp>’.
|
||||
|
||||
<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,63 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.5 Assigning Values to Symbols</h3>
|
||||
|
||||
<p><a name="index-assignment-in-scripts-393"></a><a name="index-symbol-definition_002c-scripts-394"></a><a name="index-variables_002c-defining-395"></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="HIDDEN.html#HIDDEN">HIDDEN</a>: HIDDEN
|
||||
<li><a accesskey="3" href="PROVIDE.html#PROVIDE">PROVIDE</a>: PROVIDE
|
||||
<li><a accesskey="4" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">PROVIDE_HIDDEN</a>: PROVIDE_HIDDEN
|
||||
<li><a accesskey="5" 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,92 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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,72 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">5.1 How It Works: An Outline of BFD</h3>
|
||||
|
||||
<p><a name="index-opening-object-files-703"></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,78 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">5 BFD</h2>
|
||||
|
||||
<p><a name="index-back-end-697"></a><a name="index-object-file-management-698"></a><a name="index-object-formats-available-699"></a><a name="index-objdump-_002di-700"></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</a>) to
|
||||
list all the formats available for your configuration.
|
||||
|
||||
<p><a name="index-BFD-requirements-701"></a><a name="index-requirements-for-BFD-702"></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,98 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.1 Basic Linker Script Concepts</h3>
|
||||
|
||||
<p><a name="index-linker-script-concepts-343"></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 ‘<samp><span class="samp">-h</span></samp>’ 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 ‘<samp><span class="samp">-t</span></samp>’
|
||||
option.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">6.1 Have You Found a Bug?</h3>
|
||||
|
||||
<p><a name="index-bug-criteria-708"></a>
|
||||
If you are not sure whether you have found a bug, here are some guidelines:
|
||||
|
||||
|
||||
<a name="index-fatal-signal-709"></a>
|
||||
<a name="index-linker-crash-710"></a>
|
||||
<a name="index-crash-of-linker-711"></a>
|
||||
<ul><li>If the linker gets a fatal signal, for any input whatever, that is a
|
||||
<samp><span class="command">ld</span></samp> bug. Reliable linkers never crash.
|
||||
|
||||
<p><a name="index-error-on-valid-input-712"></a><li>If <samp><span class="command">ld</span></samp> produces an error message for valid input, that is a bug.
|
||||
|
||||
<p><a name="index-invalid-input-713"></a><li>If <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> are welcome in any case.
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,199 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">6.2 How to Report Bugs</h3>
|
||||
|
||||
<p><a name="index-bug-reports-714"></a><a name="index-g_t_0040command_007bld_007d-bugs_002c-reporting-715"></a>
|
||||
A number of companies and individuals offer support for <span class="sc">gnu</span>
|
||||
products. If you obtained <samp><span class="command">ld</span></samp> 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 <samp><span class="file">etc/SERVICE</span></samp> in the <span class="sc">gnu</span> Emacs
|
||||
distribution.
|
||||
|
||||
<p>Otherwise, send bug reports for <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp>. <samp><span class="command">ld</span></samp> announces it if you start it with
|
||||
the ‘<samp><span class="samp">--version</span></samp>’ argument.
|
||||
|
||||
<p>Without this, we will not know whether there is any point in looking for
|
||||
the bug in the current version of <samp><span class="command">ld</span></samp>.
|
||||
|
||||
<li>Any patches you may have applied to the <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp>—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 <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> source, send us context
|
||||
diffs, as generated by <code>diff</code> with the ‘<samp><span class="samp">-u</span></samp>’, ‘<samp><span class="samp">-c</span></samp>’, or
|
||||
‘<samp><span class="samp">-p</span></samp>’ option. Always send diffs from the old file to the new file.
|
||||
If you even discuss something in the <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> 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,227 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.9 Builtin Functions</h4>
|
||||
|
||||
<p><a name="index-functions-in-expressions-533"></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-534"></a><a name="index-expression_002c-absolute-535"></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-536"></a><a name="index-section-address-in-expression-537"></a>Return the address (VMA) of the named <var>section</var>. Your
|
||||
script must previously have defined the location of that section. In
|
||||
the following example, <code>start_of_output_1</code>, <code>symbol_1</code> and
|
||||
<code>symbol_2</code> are assigned equivalent values, except that
|
||||
<code>symbol_1</code> will be relative to the <code>.output1</code> section while
|
||||
the other two will be absolute:
|
||||
<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-538"></a><a name="index-ALIGN_0028_0040var_007bexp_007d_002c_0040var_007balign_007d_0029-539"></a><a name="index-round-up-location-counter-540"></a><a name="index-align-location-counter-541"></a><a name="index-round-up-expression-542"></a><a name="index-align-expression-543"></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-544"></a><a name="index-section-alignment-545"></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-546"></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-547"></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-548"></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-549"></a>This defines the end of the <code>PT_GNU_RELRO</code> segment when
|
||||
‘<samp><span class="samp">-z relro</span></samp>’ option is used. Second argument is returned.
|
||||
When ‘<samp><span class="samp">-z relro</span></samp>’ 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-550"></a><a name="index-symbol-defaults-551"></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 ‘<samp><span class="samp">begin</span></samp>’ to the first location in
|
||||
the ‘<samp><span class="samp">.text</span></samp>’ section—but if a symbol called ‘<samp><span class="samp">begin</span></samp>’ 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-552"></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-553"></a><a name="index-section-load-address-in-expression-554"></a>Return the absolute LMA of the named <var>section</var>. (see <a href="Output-Section-LMA.html#Output-Section-LMA">Output Section LMA</a>).
|
||||
|
||||
<p><a name="index-MAX-555"></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-556"></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-557"></a><a name="index-unallocated-address_002c-next-558"></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-559"></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-560"></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 ‘<samp><span class="samp">-T</span></samp>’
|
||||
option) that value will be returned; otherwise the value will be
|
||||
<var>default</var>. At present, the ‘<samp><span class="samp">-T</span></samp>’ command-line option can only
|
||||
be used to set the base address for the “text”, “data”, and
|
||||
“bss” sections, but you can 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-561"></a><a name="index-section-size-562"></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-563"></a><a name="index-header-size-564"></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-565"></a><a name="index-program-headers_002c-not-enough-room-566"></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 ‘<samp><span class="samp">not enough
|
||||
room for program headers</span></samp>’. 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,120 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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-704"></a><a name="index-internal-object_002dfile-format-705"></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,77 @@
|
|||
<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.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="next" href="Symbolic-Constants.html#Symbolic-Constants" title="Symbolic Constants">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Constants"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Symbolic-Constants.html#Symbolic-Constants">Symbolic Constants</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.1 Constants</h4>
|
||||
|
||||
<p><a name="index-integer-notation-499"></a><a name="index-constants-in-linker-scripts-500"></a>All constants are integers.
|
||||
|
||||
<p>As in C, the linker considers an integer beginning with ‘<samp><span class="samp">0</span></samp>’ to be
|
||||
octal, and an integer beginning with ‘<samp><span class="samp">0x</span></samp>’ or ‘<samp><span class="samp">0X</span></samp>’ to be
|
||||
hexadecimal. Alternatively the linker accepts suffixes of ‘<samp><span class="samp">h</span></samp>’ or
|
||||
‘<samp><span class="samp">H</span></samp>’ for hexadeciaml, ‘<samp><span class="samp">o</span></samp>’ or ‘<samp><span class="samp">O</span></samp>’ for octal, ‘<samp><span class="samp">b</span></samp>’ or
|
||||
‘<samp><span class="samp">B</span></samp>’ for binary and ‘<samp><span class="samp">d</span></samp>’ or ‘<samp><span class="samp">D</span></samp>’ for decimal. Any integer
|
||||
value without a prefix or a suffix is considered to be decimal.
|
||||
|
||||
<p><a name="index-scaled-integers-501"></a><a name="index-K-and-M-integer-suffixes-502"></a><a name="index-M-and-K-integer-suffixes-503"></a><a name="index-suffixes-for-integers-504"></a><a name="index-integer-suffixes-505"></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;
|
||||
_fourk_4 = 10000o;
|
||||
</pre>
|
||||
<p>Note - the <code>K</code> and <code>M</code> suffixes cannot be used in
|
||||
conjunction with the base suffixes mentioned above.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.1 Setting the Entry Point</h4>
|
||||
|
||||
<p><a name="index-ENTRY_0028_0040var_007bsymbol_007d_0029-348"></a><a name="index-start-of-execution-349"></a><a name="index-first-instruction-350"></a><a name="index-entry-point-351"></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 ‘<samp><span class="samp">-e</span></samp>’ <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 a target specific symbol, if it is defined; For many
|
||||
targets this is <code>start</code>, but PE and BeOS based systems for example
|
||||
check a list of possible entry symbols, matching the first one found.
|
||||
<li>the address of the first byte of the ‘<samp><span class="samp">.text</span></samp>’ section, if present;
|
||||
<li>The address <code>0</code>.
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">2.2 Environment Variables</h3>
|
||||
|
||||
<!-- man begin ENVIRONMENT -->
|
||||
<p>You can change the behaviour of <samp><span class="command">ld</span></samp> with the environment variables
|
||||
<code>GNUTARGET</code>,
|
||||
<code>LDEMULATION</code> and <code>COLLECT_NO_DEMANGLE</code>.
|
||||
|
||||
<p><a name="index-GNUTARGET-333"></a><a name="index-default-input-format-334"></a><code>GNUTARGET</code> determines the input-file object format if you don't
|
||||
use ‘<samp><span class="samp">-b</span></samp>’ (or its synonym ‘<samp><span class="samp">--format</span></samp>’). 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, <samp><span class="command">ld</span></samp> 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-335"></a><a name="index-default-emulation-336"></a><a name="index-emulation_002c-default-337"></a><code>LDEMULATION</code> determines the default emulation if you don't use the
|
||||
‘<samp><span class="samp">-m</span></samp>’ option. The emulation can affect various aspects of linker
|
||||
behaviour, particularly the default linker script. You can list the
|
||||
available emulations with the ‘<samp><span class="samp">--verbose</span></samp>’ or ‘<samp><span class="samp">-V</span></samp>’ options. If
|
||||
the ‘<samp><span class="samp">-m</span></samp>’ 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-338"></a><a name="index-demangling_002c-default-339"></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 ‘<samp><span class="samp">--demangle</span></samp>’ and ‘<samp><span class="samp">--no-demangle</span></samp>’
|
||||
options.
|
||||
|
||||
<!-- man end -->
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.7 Evaluation</h4>
|
||||
|
||||
<p><a name="index-lazy-evaluation-525"></a><a name="index-expression-evaluation-order-526"></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
|
||||
‘<samp><span class="samp">.</span></samp>’, 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 ‘<samp><span class="samp">non constant expression for initial
|
||||
address</span></samp>’.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.8 The Section of an Expression</h4>
|
||||
|
||||
<p><a name="index-expression-sections-527"></a><a name="index-absolute-expressions-528"></a><a name="index-relative-expressions-529"></a><a name="index-absolute-and-relocatable-symbols-530"></a><a name="index-relocatable-and-absolute-symbols-531"></a><a name="index-symbols_002c-relocatable-and-absolute-532"></a>Addresses and symbols may be section relative, or absolute. A section
|
||||
relative symbol is relocatable. If you request relocatable output
|
||||
using the ‘<samp><span class="samp">-r</span></samp>’ option, a further link operation may change the
|
||||
value of a section relative symbol. On the other hand, an absolute
|
||||
symbol will retain the same value throughout any further link
|
||||
operations.
|
||||
|
||||
<p>Some terms in linker expressions are addresses. This is true of
|
||||
section relative symbols and for builtin functions that return an
|
||||
address, such as <code>ADDR</code>, <code>LOADADDR</code>, <code>ORIGIN</code> and
|
||||
<code>SEGMENT_START</code>. Other terms are simply numbers, or are builtin
|
||||
functions that return a non-address value, such as <code>LENGTH</code>.
|
||||
One complication is that unless you set <code>LD_FEATURE ("SANE_EXPR")</code>
|
||||
(see <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a>), numbers and absolute symbols are treated
|
||||
differently depending on their location, for compatibility with older
|
||||
versions of <code>ld</code>. Expressions appearing outside an output
|
||||
section definition treat all numbers as absolute addresses.
|
||||
Expressions appearing inside an output section definition treat
|
||||
absolute symbols as numbers. If <code>LD_FEATURE ("SANE_EXPR")</code> is
|
||||
given, then absolute symbols and numbers are simply treated as numbers
|
||||
everywhere.
|
||||
|
||||
<p>In the following simple example,
|
||||
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
. = 0x100;
|
||||
__executable_start = 0x100;
|
||||
.data :
|
||||
{
|
||||
. = 0x10;
|
||||
__data_start = 0x10;
|
||||
*(.data)
|
||||
}
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
<p>both <code>.</code> and <code>__executable_start</code> are set to the absolute
|
||||
address 0x100 in the first two assignments, then both <code>.</code> and
|
||||
<code>__data_start</code> are set to 0x10 relative to the <code>.data</code>
|
||||
section in the second two assignments.
|
||||
|
||||
<p>For expressions involving numbers, relative addresses and absolute
|
||||
addresses, ld follows these rules to evaluate terms:
|
||||
|
||||
<ul>
|
||||
<li>Unary operations on a relative address, and binary operations on two
|
||||
relative addresses in the same section or between one relative address
|
||||
and a number, apply the operator to the offset part of the address(es).
|
||||
<li>Unary operations on an absolute address, and binary operations on one
|
||||
or more absolute addresses or on two relative addresses not in the
|
||||
same section, first convert any non-absolute term to an absolute
|
||||
address before applying the operator.
|
||||
</ul>
|
||||
|
||||
<p>The result section of each sub-expression is as follows:
|
||||
|
||||
<ul>
|
||||
<li>An operation involving only numbers results in a number.
|
||||
<li>The result of comparisons, ‘<samp><span class="samp">&&</span></samp>’ and ‘<samp><span class="samp">||</span></samp>’ is also a number.
|
||||
<li>The result of other binary arithmetic and logical operations on two
|
||||
relative addresses in the same section or two absolute addresess
|
||||
(after above conversions) is also a number.
|
||||
<li>The result of other operations on relative addresses or one
|
||||
relative address and a number, is a relative address in the same
|
||||
section as the relative operand(s).
|
||||
<li>The result of other operations on absolute addresses (after above
|
||||
conversions) is an absolute address.
|
||||
</ul>
|
||||
|
||||
<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 ‘<samp><span class="samp">.data</span></samp>’:
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
.data : { *(.data) _edata = ABSOLUTE(.); }
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent">If ‘<samp><span class="samp">ABSOLUTE</span></samp>’ were not used, ‘<samp><span class="samp">_edata</span></samp>’ would be relative to the
|
||||
‘<samp><span class="samp">.data</span></samp>’ section.
|
||||
|
||||
<p>Using <code>LOADADDR</code> also forces an expression absolute, since this
|
||||
particular builtin function returns an absolute address.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.10 Expressions in Linker Scripts</h3>
|
||||
|
||||
<p><a name="index-expressions-497"></a><a name="index-arithmetic-498"></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="Symbolic-Constants.html#Symbolic-Constants">Symbolic Constants</a>: Symbolic constants
|
||||
<li><a accesskey="3" href="Symbols.html#Symbols">Symbols</a>: Symbol Names
|
||||
<li><a accesskey="4" href="Orphan-Sections.html#Orphan-Sections">Orphan Sections</a>: Orphan Sections
|
||||
<li><a accesskey="5" href="Location-Counter.html#Location-Counter">Location Counter</a>: The Location Counter
|
||||
<li><a accesskey="6" href="Operators.html#Operators">Operators</a>: Operators
|
||||
<li><a accesskey="7" href="Evaluation.html#Evaluation">Evaluation</a>: Evaluation
|
||||
<li><a accesskey="8" href="Expression-Section.html#Expression-Section">Expression Section</a>: The Section of an Expression
|
||||
<li><a accesskey="9" href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a>: Builtin Functions
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.2 Commands Dealing with Files</h4>
|
||||
|
||||
<p><a name="index-linker-script-file-commands-352"></a>Several linker script commands deal with files.
|
||||
|
||||
<dl>
|
||||
<dt><code>INCLUDE </code><var>filename</var><dd><a name="index-INCLUDE-_0040var_007bfilename_007d-353"></a><a name="index-including-a-linker-script-354"></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 <samp><span class="option">-L</span></samp> 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-355"></a><a name="index-input-files-in-linker-scripts-356"></a><a name="index-input-object-files-in-linker-scripts-357"></a><a name="index-linker-script-input-object-files-358"></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 <samp><span class="file">subr.o</span></samp> any time you do
|
||||
a link, but you can't be bothered to put it on every link command line,
|
||||
then you can put ‘<samp><span class="samp">INPUT (subr.o)</span></samp>’ 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 ‘<samp><span class="samp">-T</span></samp>’ option.
|
||||
|
||||
<p>In case a <dfn>sysroot prefix</dfn> is configured, and the filename starts
|
||||
with the ‘<samp><span class="samp">/</span></samp>’ 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 ‘<samp><span class="samp">-L</span></samp>’ in <a href="Options.html#Options">Command Line Options</a>.
|
||||
|
||||
<p>If you use ‘<samp><span class="samp">INPUT (-l</span><var>file</var><span class="samp">)</span></samp>’, <samp><span class="command">ld</span></samp> will transform the
|
||||
name to <code>lib</code><var>file</var><code>.a</code>, as with the command line argument
|
||||
‘<samp><span class="samp">-l</span></samp>’.
|
||||
|
||||
<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-359"></a><a name="index-grouping-input-files-360"></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 ‘<samp><span class="samp">-(</span></samp>’
|
||||
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-361"></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
|
||||
<samp><span class="option">--as-needed</span></samp> option for all the files listed inside of it
|
||||
and restores previous <samp><span class="option">--as-needed</span></samp> resp. <samp><span class="option">--no-as-needed</span></samp>
|
||||
setting afterwards.
|
||||
|
||||
<br><dt><code>OUTPUT(</code><var>filename</var><code>)</code><dd><a name="index-OUTPUT_0028_0040var_007bfilename_007d_0029-362"></a><a name="index-output-file-name-in-linker-script-363"></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
|
||||
‘<samp><span class="samp">-o </span><var>filename</var></samp>’ 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 <samp><span class="file">a.out</span></samp>.
|
||||
|
||||
<br><dt><code>SEARCH_DIR(</code><var>path</var><code>)</code><dd><a name="index-SEARCH_005fDIR_0028_0040var_007bpath_007d_0029-364"></a><a name="index-library-search-path-in-linker-script-365"></a><a name="index-archive-search-path-in-linker-script-366"></a><a name="index-search-path-in-linker-script-367"></a>The <code>SEARCH_DIR</code> command adds <var>path</var> to the list of paths where
|
||||
<samp><span class="command">ld</span></samp> looks for archive libraries. Using
|
||||
<code>SEARCH_DIR(</code><var>path</var><code>)</code> is exactly like using ‘<samp><span class="samp">-L </span><var>path</var></samp>’
|
||||
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-368"></a><a name="index-first-input-file-369"></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,56 @@
|
|||
<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.11">
|
||||
<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-Constraint.html#Output-Section-Constraint" title="Output Section Constraint">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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-Constraint.html#Output-Section-Constraint">Output Section Constraint</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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.4 Forced Input Alignment</h5>
|
||||
|
||||
<p><a name="index-SUBALIGN_0028_0040var_007bsubsection_005falign_007d_0029-457"></a><a name="index-forcing-input-section-alignment-458"></a><a name="index-input-section-alignment-459"></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,54 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.3 Forced Output Alignment</h5>
|
||||
|
||||
<p><a name="index-ALIGN_0028_0040var_007bsection_005falign_007d_0029-454"></a><a name="index-forcing-output-section-alignment-455"></a><a name="index-output-section-alignment-456"></a>You can increase an output section's alignment by using ALIGN.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<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.11">
|
||||
<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="REGION_005fALIAS.html#REGION_005fALIAS" title="REGION_ALIAS">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Format-Commands"></a>
|
||||
Next: <a rel="next" accesskey="n" href="REGION_005fALIAS.html#REGION_005fALIAS">REGION_ALIAS</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>
|
||||
</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-370"></a><a name="index-output-file-format-in-linker-script-371"></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 ‘<samp><span class="samp">--oformat </span><var>bfdname</var></samp>’ 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 ‘<samp><span class="samp">-EB</span></samp>’ and ‘<samp><span class="samp">-EL</span></samp>’ command line options.
|
||||
This permits the linker script to set the output format based on the
|
||||
desired endianness.
|
||||
|
||||
<p>If neither ‘<samp><span class="samp">-EB</span></samp>’ nor ‘<samp><span class="samp">-EL</span></samp>’ are used, then the output format
|
||||
will be the first argument, <var>default</var>. If ‘<samp><span class="samp">-EB</span></samp>’ is used, the
|
||||
output format will be the second argument, <var>big</var>. If ‘<samp><span class="samp">-EL</span></samp>’ 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
|
||||
‘<samp><span class="samp">elf32-bigmips</span></samp>’, but if the user uses the ‘<samp><span class="samp">-EL</span></samp>’ command line
|
||||
option, the output file will be created in the ‘<samp><span class="samp">elf32-littlemips</span></samp>’
|
||||
format.
|
||||
|
||||
<br><dt><code>TARGET(</code><var>bfdname</var><code>)</code><dd><a name="index-TARGET_0028_0040var_007bbfdname_007d_0029-372"></a><a name="index-input-file-format-in-linker-script-373"></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 ‘<samp><span class="samp">-b </span><var>bfdname</var></samp>’ 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,517 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="appendix">Appendix B GNU Free Documentation License</h2>
|
||||
|
||||
<!-- The GNU Free Documentation License. -->
|
||||
<div align="center">Version 1.3, 3 November 2008</div>
|
||||
|
||||
<!-- This file is intended to be included within another document, -->
|
||||
<!-- hence no sectioning command or @node. -->
|
||||
<pre class="display"> Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
<a href="http://fsf.org/">http://fsf.org/</a>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
</pre>
|
||||
<ol type=1 start=0>
|
||||
<li>PREAMBLE
|
||||
|
||||
<p>The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document <dfn>free</dfn> 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.
|
||||
|
||||
<li>APPLICABILITY AND DEFINITIONS
|
||||
|
||||
<p>This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The “Document”, below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as “you”. You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
<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. (Thus, 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. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
<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. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
<p>A “Transparent” copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
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, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not “Transparent” is called “Opaque”.
|
||||
|
||||
<p>Examples of suitable formats for Transparent copies include plain
|
||||
<span class="sc">ascii</span> without markup, Texinfo input format, LaTeX input
|
||||
format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available
|
||||
<acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>,
|
||||
PostScript or <acronym>PDF</acronym> designed for human modification. Examples
|
||||
of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and
|
||||
<acronym>JPG</acronym>. Opaque formats include proprietary formats that can be
|
||||
read and edited only by proprietary word processors, <acronym>SGML</acronym> or
|
||||
<acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are
|
||||
not generally available, and the machine-generated <acronym>HTML</acronym>,
|
||||
PostScript or <acronym>PDF</acronym> 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.
|
||||
|
||||
<p>The “publisher” means any person or entity that distributes copies
|
||||
of the Document to the public.
|
||||
|
||||
<p>A section “Entitled XYZ” means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as “Acknowledgements”,
|
||||
“Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section “Entitled XYZ” according to this definition.
|
||||
|
||||
<p>The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
<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.
|
||||
|
||||
<li>COPYING IN QUANTITY
|
||||
|
||||
<p>If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) 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 computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
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.
|
||||
|
||||
<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:
|
||||
|
||||
<ol type=A start=1>
|
||||
<li>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.
|
||||
|
||||
<li>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 fewer than five),
|
||||
unless they release you from this requirement.
|
||||
|
||||
<li>State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
|
||||
<li>Preserve all the copyright notices of the Document.
|
||||
|
||||
<li>Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
|
||||
<li>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.
|
||||
|
||||
<li>Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
|
||||
<li>Include an unaltered copy of this License.
|
||||
|
||||
<li>Preserve the section Entitled “History”, Preserve 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.
|
||||
|
||||
<li>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.
|
||||
|
||||
<li>For any section Entitled “Acknowledgements” or “Dedications”, Preserve
|
||||
the Title of the section, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements and/or
|
||||
dedications given therein.
|
||||
|
||||
<li>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.
|
||||
|
||||
<li>Delete any section Entitled “Endorsements”. Such a section
|
||||
may not be included in the Modified Version.
|
||||
|
||||
<li>Do not retitle any existing section to be Entitled “Endorsements” or
|
||||
to conflict in title with any Invariant Section.
|
||||
|
||||
<li>Preserve any Warranty Disclaimers.
|
||||
</ol>
|
||||
|
||||
<p>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.
|
||||
|
||||
<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, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
<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.”
|
||||
|
||||
<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.
|
||||
|
||||
<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, is called an “aggregate” if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which 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 half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
<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, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
<p>If a section in the Document is Entitled “Acknowledgements”,
|
||||
“Dedications”, or “History”, the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
<li>TERMINATION
|
||||
|
||||
<p>You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||
will automatically terminate your rights under this License.
|
||||
|
||||
<p>However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
<p>Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
<p>Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, receipt of a copy of some or all of the same material does
|
||||
not give you any rights to use it.
|
||||
|
||||
<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
|
||||
<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
|
||||
|
||||
<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. If the Document
|
||||
specifies that a proxy can decide which future versions of this
|
||||
License can be used, that proxy's public statement of acceptance of a
|
||||
version permanently authorizes you to choose that version for the
|
||||
Document.
|
||||
|
||||
<li>RELICENSING
|
||||
|
||||
<p>“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
|
||||
World Wide Web server that publishes copyrightable works and also
|
||||
provides prominent facilities for anybody to edit those works. A
|
||||
public wiki that anybody can edit is an example of such a server. A
|
||||
“Massive Multiauthor Collaboration” (or “MMC”) contained in the
|
||||
site means any set of copyrightable works thus published on the MMC
|
||||
site.
|
||||
|
||||
<p>“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
|
||||
license published by Creative Commons Corporation, a not-for-profit
|
||||
corporation with a principal place of business in San Francisco,
|
||||
California, as well as future copyleft versions of that license
|
||||
published by that same organization.
|
||||
|
||||
<p>“Incorporate” means to publish or republish a Document, in whole or
|
||||
in part, as part of another Document.
|
||||
|
||||
<p>An MMC is “eligible for relicensing” if it is licensed under this
|
||||
License, and if all works that were first published under this License
|
||||
somewhere other than this MMC, and subsequently incorporated in whole
|
||||
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||
and (2) were thus incorporated prior to November 1, 2008.
|
||||
|
||||
<p>The operator of an MMC Site may republish an MMC contained in the site
|
||||
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||
provided the MMC is eligible for relicensing.
|
||||
|
||||
</ol>
|
||||
|
||||
<h3 class="heading">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.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
</pre>
|
||||
<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the “with<small class="dots">...</small>Texts.” line with this:
|
||||
|
||||
<pre class="smallexample"> 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>.
|
||||
</pre>
|
||||
<p>If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
<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.
|
||||
|
||||
<!-- Local Variables: -->
|
||||
<!-- ispell-local-pdict: "ispell-dict" -->
|
||||
<!-- End: -->
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="H8%2f300"></a>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.1 <samp><span class="command">ld</span></samp> and the H8/300</h3>
|
||||
|
||||
<p><a name="index-H8_002f300-support-569"></a>For the H8/300, <samp><span class="command">ld</span></samp> can perform these global optimizations when
|
||||
you specify the ‘<samp><span class="samp">--relax</span></samp>’ command-line option.
|
||||
|
||||
|
||||
<a name="index-relaxing-on-H8_002f300-570"></a>
|
||||
<dl><dt><em>relaxing address modes</em><dd><samp><span class="command">ld</span></samp> 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-571"></a><br><dt><em>synthesizing instructions</em><dd><!-- FIXME: specifically mov.b, or any mov instructions really? -->
|
||||
<samp><span class="command">ld</span></samp> 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 ‘<samp><span class="samp">mov.b </span><code>@</code><var>aa</var><span class="samp">:16</span></samp>’ into
|
||||
‘<samp><span class="samp">mov.b </span><code>@</code><var>aa</var><span class="samp">:8</span></samp>’ whenever the address <var>aa</var> is in the
|
||||
top page of memory).
|
||||
|
||||
<br><dt><em>bit manipulation instructions</em><dd><samp><span class="command">ld</span></samp> 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 ‘<samp><span class="samp">bset #xx:3,</span><code>@</code><var>aa</var><span class="samp">:32</span></samp>’ into
|
||||
‘<samp><span class="samp">bset #xx:3,</span><code>@</code><var>aa</var><span class="samp">:8</span></samp>’ whenever the address <var>aa</var> is in
|
||||
the top page of memory).
|
||||
|
||||
<br><dt><em>system control instructions</em><dd><samp><span class="command">ld</span></samp> 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 ‘<samp><span class="samp">ldc.w </span><code>@</code><var>aa</var><span class="samp">:32,ccr</span></samp>’ into
|
||||
‘<samp><span class="samp">ldc.w </span><code>@</code><var>aa</var><span class="samp">:16,ccr</span></samp>’ whenever the address <var>aa</var> is in
|
||||
the top page of memory).
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>HIDDEN - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<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.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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="HIDDEN"></a>
|
||||
Next: <a rel="next" accesskey="n" href="PROVIDE.html#PROVIDE">PROVIDE</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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.2 HIDDEN</h4>
|
||||
|
||||
<p><a name="index-HIDDEN-396"></a>For ELF targeted ports, define a symbol that will be hidden and won't be
|
||||
exported. The syntax is <code>HIDDEN(</code><var>symbol</var><code> = </code><var>expression</var><code>)</code>.
|
||||
|
||||
<p>Here is the example from <a href="Simple-Assignments.html#Simple-Assignments">Simple Assignments</a>, rewritten to use
|
||||
<code>HIDDEN</code>:
|
||||
|
||||
<pre class="smallexample"> HIDDEN(floating_point = 0);
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
HIDDEN(_etext = .);
|
||||
}
|
||||
HIDDEN(_bdata = (. + 3) & ~ 3);
|
||||
.data : { *(.data) }
|
||||
}
|
||||
</pre>
|
||||
<p class="noindent">In this case none of the three symbols will be visible outside this module.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.5 <samp><span class="command">ld</span></samp> and HPPA 32-bit ELF Support</h3>
|
||||
|
||||
<p><a name="index-HPPA-multiple-sub_002dspace-stubs-617"></a><a name="index-g_t_002d_002dmulti_002dsubspace-618"></a>When generating a shared library, <samp><span class="command">ld</span></samp> will by default generate
|
||||
import stubs suitable for use with a single sub-space application.
|
||||
The ‘<samp><span class="samp">--multi-subspace</span></samp>’ switch causes <samp><span class="command">ld</span></samp> to generate export
|
||||
stubs, and different (larger) import stubs suitable for use with
|
||||
multiple sub-spaces.
|
||||
|
||||
<p><a name="index-HPPA-stub-grouping-619"></a><a name="index-g_t_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-620"></a>Long branch stubs and import/export stubs are placed by <samp><span class="command">ld</span></samp> in
|
||||
stub sections located between groups of input sections.
|
||||
‘<samp><span class="samp">--stub-group-size</span></samp>’ 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 ‘<samp><span class="samp">N</span></samp>’ chooses this scheme, ensuring that
|
||||
branches to stubs always use a negative offset. Two special values of
|
||||
‘<samp><span class="samp">N</span></samp>’ are recognized, ‘<samp><span class="samp">1</span></samp>’ and ‘<samp><span class="samp">-1</span></samp>’. These both instruct
|
||||
<samp><span class="command">ld</span></samp> 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 ‘<samp><span class="samp">N</span></samp>’ respectively.
|
||||
|
||||
<p>Note that ‘<samp><span class="samp">--stub-group-size</span></samp>’ 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,65 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.11 Implicit Linker Scripts</h3>
|
||||
|
||||
<p><a name="index-implicit-linker-scripts-567"></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,136 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.1 Input Section Basics</h5>
|
||||
|
||||
<p><a name="index-input-section-basics-406"></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 ‘<samp><span class="samp">.text</span></samp>’ sections, you would write:
|
||||
<pre class="smallexample"> *(.text)
|
||||
</pre>
|
||||
<p class="noindent">Here the ‘<samp><span class="samp">*</span></samp>’ 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 <samp><span class="file">crtend.o</span></samp> and
|
||||
<samp><span class="file">otherfile.o</span></samp> 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 ‘<samp><span class="samp">.text</span></samp>’ and
|
||||
‘<samp><span class="samp">.rdata</span></samp>’ 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
|
||||
‘<samp><span class="samp">.text</span></samp>’ input sections will appear first, followed by all
|
||||
‘<samp><span class="samp">.rdata</span></samp>’ 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>To refine the sections that are included based on the section flags
|
||||
of an input section, INPUT_SECTION_FLAGS may be used.
|
||||
|
||||
<p>Here is a simple example for using Section header flags for ELF sections:
|
||||
|
||||
<pre class="smallexample"> SECTIONS {
|
||||
.text : { INPUT_SECTION_FLAGS (SHF_MERGE & SHF_STRINGS) *(.text) }
|
||||
.text2 : { INPUT_SECTION_FLAGS (!SHF_WRITE) *(.text) }
|
||||
}
|
||||
</pre>
|
||||
<p>In this example, the output section ‘<samp><span class="samp">.text</span></samp>’ will be comprised of any
|
||||
input section matching the name *(.text) whose section header flags
|
||||
<code>SHF_MERGE</code> and <code>SHF_STRINGS</code> are set. The output section
|
||||
‘<samp><span class="samp">.text2</span></samp>’ will be comprised of any input section matching the name *(.text)
|
||||
whose section header flag <code>SHF_WRITE</code> is clear.
|
||||
|
||||
<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>‘<samp><span class="samp">archive:file</span></samp>’<dd>matches file within archive
|
||||
<br><dt>‘<samp><span class="samp">archive:</span></samp>’<dd>matches the whole archive
|
||||
<br><dt>‘<samp><span class="samp">:file</span></samp>’<dd>matches file but not one in an archive
|
||||
</dl>
|
||||
|
||||
<p>Either one or both of ‘<samp><span class="samp">archive</span></samp>’ and ‘<samp><span class="samp">file</span></samp>’ 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
|
||||
‘<samp><span class="samp">c:myfile.o</span></samp>’ is a simple file specification, not ‘<samp><span class="samp">myfile.o</span></samp>’
|
||||
within an archive called ‘<samp><span class="samp">c</span></samp>’. ‘<samp><span class="samp">archive:file</span></samp>’ 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 ‘<samp><span class="samp">archive:file</span></samp>’ 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 ‘<samp><span class="samp">archive:file</span></samp>’ 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,79 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.3 Input Section for Common Symbols</h5>
|
||||
|
||||
<p><a name="index-common-symbol-placement-416"></a><a name="index-uninitialized-data-placement-417"></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 ‘<samp><span class="samp">COMMON</span></samp>’.
|
||||
|
||||
<p>You may use file names with the ‘<samp><span class="samp">COMMON</span></samp>’ 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
|
||||
‘<samp><span class="samp">.bss</span></samp>’ section in the output file. For example:
|
||||
<pre class="smallexample"> .bss { *(.bss) *(COMMON) }
|
||||
</pre>
|
||||
<p><a name="index-scommon-section-418"></a><a name="index-small-common-symbols-419"></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 ‘<samp><span class="samp">COMMON</span></samp>’ for standard common
|
||||
symbols and ‘<samp><span class="samp">.scommon</span></samp>’ for small common symbols. This permits you
|
||||
to map the different types of common symbols into memory at different
|
||||
locations.
|
||||
|
||||
<p><a name="index-g_t_005bCOMMON_005d-420"></a>You will sometimes see ‘<samp><span class="samp">[COMMON]</span></samp>’ in old linker scripts. This
|
||||
notation is now considered obsolete. It is equivalent to
|
||||
‘<samp><span class="samp">*(COMMON)</span></samp>’.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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 <samp><span class="file">all.o</span></samp> and place them at the
|
||||
start of output section ‘<samp><span class="samp">outputa</span></samp>’ which starts at location
|
||||
‘<samp><span class="samp">0x10000</span></samp>’. All of section ‘<samp><span class="samp">.input1</span></samp>’ from file <samp><span class="file">foo.o</span></samp>
|
||||
follows immediately, in the same output section. All of section
|
||||
‘<samp><span class="samp">.input2</span></samp>’ from <samp><span class="file">foo.o</span></samp> goes into output section
|
||||
‘<samp><span class="samp">outputb</span></samp>’, followed by section ‘<samp><span class="samp">.input1</span></samp>’ from <samp><span class="file">foo1.o</span></samp>.
|
||||
All of the remaining ‘<samp><span class="samp">.input1</span></samp>’ and ‘<samp><span class="samp">.input2</span></samp>’ sections from any
|
||||
files are written to output section ‘<samp><span class="samp">outputc</span></samp>’.
|
||||
|
||||
<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,58 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.4 Input Section and Garbage Collection</h5>
|
||||
|
||||
<p><a name="index-KEEP-421"></a><a name="index-garbage-collection-422"></a>When link-time garbage collection is in use (‘<samp><span class="samp">--gc-sections</span></samp>’),
|
||||
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,163 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.4.2 Input Section Wildcard Patterns</h5>
|
||||
|
||||
<p><a name="index-input-section-wildcards-407"></a><a name="index-wildcard-file-name-patterns-408"></a><a name="index-file-name-wildcard-patterns-409"></a><a name="index-section-name-wildcard-patterns-410"></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 ‘<samp><span class="samp">*</span></samp>’ 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>‘<samp><span class="samp">*</span></samp>’<dd>matches any number of characters
|
||||
<br><dt>‘<samp><span class="samp">?</span></samp>’<dd>matches any single character
|
||||
<br><dt>‘<samp><span class="samp">[</span><var>chars</var><span class="samp">]</span></samp>’<dd>matches a single instance of any of the <var>chars</var>; the ‘<samp><span class="samp">-</span></samp>’
|
||||
character may be used to specify a range of characters, as in
|
||||
‘<samp><span class="samp">[a-z]</span></samp>’ to match any lower case letter
|
||||
<br><dt>‘<samp><span class="samp">\</span></samp>’<dd>quotes the following character
|
||||
</dl>
|
||||
|
||||
<p>When a file name is matched with a wildcard, the wildcard characters
|
||||
will not match a ‘<samp><span class="samp">/</span></samp>’ character (used to separate directory names on
|
||||
Unix). A pattern consisting of a single ‘<samp><span class="samp">*</span></samp>’ character is an
|
||||
exception; it will always match any file name, whether it contains a
|
||||
‘<samp><span class="samp">/</span></samp>’ or not. In a section name, the wildcard characters will match
|
||||
a ‘<samp><span class="samp">/</span></samp>’ 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
|
||||
<samp><span class="file">data.o</span></samp> rule will not be used:
|
||||
<pre class="smallexample"> .data : { *(.data) }
|
||||
.data1 : { data.o(.data) }
|
||||
</pre>
|
||||
<p><a name="index-SORT_005fBY_005fNAME-411"></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-412"></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_005fBY_005fINIT_005fPRIORITY-413"></a><code>SORT_BY_INIT_PRIORITY</code> is very similar to <code>SORT_BY_NAME</code>. The
|
||||
difference is <code>SORT_BY_INIT_PRIORITY</code> will sort sections into
|
||||
ascending order by numerical value of the GCC init_priority attribute
|
||||
encoded in the section name before placing them in the output file.
|
||||
|
||||
<p><a name="index-SORT-414"></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
|
||||
<samp><span class="option">--sort-sections alignment</span></samp> 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
|
||||
<samp><span class="option">--sort-section name</span></samp> 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><a name="index-SORT_005fNONE-415"></a><code>SORT_NONE</code> disables section sorting by ignoring the command line
|
||||
section sorting option.
|
||||
|
||||
<p>If you ever get confused about where input sections are going, use the
|
||||
‘<samp><span class="samp">-M</span></samp>’ 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 ‘<samp><span class="samp">.text</span></samp>’
|
||||
sections in ‘<samp><span class="samp">.text</span></samp>’ and all ‘<samp><span class="samp">.bss</span></samp>’ sections in ‘<samp><span class="samp">.bss</span></samp>’.
|
||||
The linker will place the ‘<samp><span class="samp">.data</span></samp>’ section from all files beginning
|
||||
with an upper case character in ‘<samp><span class="samp">.DATA</span></samp>’; for all other files, the
|
||||
linker will place the ‘<samp><span class="samp">.data</span></samp>’ section in ‘<samp><span class="samp">.data</span></samp>’.
|
||||
<pre class="smallexample"> SECTIONS {
|
||||
.text : { *(.text) }
|
||||
.DATA : { [A-Z]*(.data) }
|
||||
.data : { *(.data) }
|
||||
.bss : { *(.bss) }
|
||||
}
|
||||
</pre>
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.4 Input Section Description</h4>
|
||||
|
||||
<p><a name="index-input-sections-404"></a><a name="index-mapping-input-sections-to-output-sections-405"></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,62 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">2 Invocation</h2>
|
||||
|
||||
<!-- man begin DESCRIPTION -->
|
||||
<p>The <span class="sc">gnu</span> linker <samp><span class="command">ld</span></samp> 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,769 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">LD Index</h2>
|
||||
|
||||
<ul class="index-cp" compact>
|
||||
<li><a href="Symbols.html#index-g_t_0022-513"><code>"</code></a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_0028-131"><code>-(</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002daccept_002dunknown_002dinput_002darch-133"><code>--accept-unknown-input-arch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dadd_002dneeded-137"><code>--add-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dadd_002dstdcall_002dalias-275"><code>--add-stdcall-alias</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dallow_002dmultiple_002ddefinition-190"><code>--allow-multiple-definition</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dallow_002dshlib_002dundefined-192"><code>--allow-shlib-undefined</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002darchitecture_003d_0040var_007barch_007d-11"><code>--architecture=</code><var>arch</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002das_002dneeded-135"><code>--as-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002daudit-_0040var_007bAUDITLIB_007d-8"><code>--audit </code><var>AUDITLIB</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dauxiliary_003d_0040var_007bname_007d-41"><code>--auxiliary=</code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dbank_002dwindow-331"><code>--bank-window</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dbase_002dfile-276"><code>--base-file</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dbe8-592"><code>--be8</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-g_t_002d_002dbss_002dplt-628"><code>--bss-plt</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dbuild_002did-273"><code>--build-id</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dbuild_002did_003d_0040var_007bstyle_007d-274"><code>--build-id=</code><var>style</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dcheck_002dsections-154"><code>--check-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dcopy_002ddt_002dneeded_002dentries-156"><code>--copy-dt-needed-entries</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dcref-159"><code>--cref</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddefault_002dimported_002dsymver-196"><code>--default-imported-symver</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddefault_002dscript_003d_0040var_007bscript_007d-108"><code>--default-script=</code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddefault_002dsymver-195"><code>--default-symver</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddefsym_003d_0040var_007bsymbol_007d_003d_0040var_007bexp_007d-163"><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-g_t_002d_002ddemangle_005b_003d_0040var_007bstyle_007d_005d-165"><code>--demangle[=</code><var>style</var><code>]</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddepaudit-_0040var_007bAUDITLIB_007d-24"><code>--depaudit </code><var>AUDITLIB</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddisable_002dauto_002dimage_002dbase-307"><code>--disable-auto-image-base</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddisable_002dauto_002dimport-311"><code>--disable-auto-import</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddisable_002dlong_002dsection_002dnames-279"><code>--disable-long-section-names</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddisable_002dnew_002ddtags-269"><code>--disable-new-dtags</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddisable_002druntime_002dpseudo_002dreloc-313"><code>--disable-runtime-pseudo-reloc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddisable_002dstdcall_002dfixup-281"><code>--disable-stdcall-fixup</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddiscard_002dall-121"><code>--discard-all</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddiscard_002dlocals-124"><code>--discard-locals</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddll-277"><code>--dll</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddll_002dsearch_002dprefix-309"><code>--dll-search-prefix</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002ddotsyms-642"><code>--dotsyms</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddsbt_002dindex-328"><code>--dsbt-index</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddsbt_002dsize-327"><code>--dsbt-size</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddynamic_002dlinker_003d_0040var_007bfile_007d-169"><code>--dynamic-linker=</code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddynamic_002dlist_002dcpp_002dnew-152"><code>--dynamic-list-cpp-new</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddynamic_002dlist_002dcpp_002dtypeinfo-153"><code>--dynamic-list-cpp-typeinfo</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddynamic_002dlist_002ddata-151"><code>--dynamic-list-data</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddynamic_002dlist_003d_0040var_007bdynamic_002dlist_002dfile_007d-150"><code>--dynamic-list=</code><var>dynamic-list-file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002ddynamicbase-319"><code>--dynamicbase</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002deh_002dframe_002dhdr-266"><code>--eh-frame-hdr</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002demit_002drelocs-84"><code>--emit-relocs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-g_t_002d_002demit_002dstack_002dsyms-679"><code>--emit-stack-syms</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-g_t_002d_002demit_002dstub_002dsyms-671"><code>--emit-stub-syms</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002demit_002dstub_002dsyms-640"><code>--emit-stub-syms</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-g_t_002d_002demit_002dstub_002dsyms-633"><code>--emit-stub-syms</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002denable_002dauto_002dimage_002dbase-306"><code>--enable-auto-image-base</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002denable_002dauto_002dimport-310"><code>--enable-auto-import</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002denable_002dextra_002dpe_002ddebug-314"><code>--enable-extra-pe-debug</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002denable_002dlong_002dsection_002dnames-278"><code>--enable-long-section-names</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002denable_002dnew_002ddtags-268"><code>--enable-new-dtags</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002denable_002druntime_002dpseudo_002dreloc-312"><code>--enable-runtime-pseudo-reloc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002denable_002dstdcall_002dfixup-280"><code>--enable-stdcall-fixup</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dentry_003d_0040var_007bentry_007d-28"><code>--entry=</code><var>entry</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002derror_002dunresolved_002dsymbols-262"><code>--error-unresolved-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dexclude_002dall_002dsymbols-287"><code>--exclude-all-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dexclude_002dlibs-29"><code>--exclude-libs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dexclude_002dmodules_002dfor_002dimplib-30"><code>--exclude-modules-for-implib</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dexclude_002dsymbols-286"><code>--exclude-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dexport_002dall_002dsymbols-285"><code>--export-all-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dexport_002ddynamic-33"><code>--export-dynamic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-g_t_002d_002dextra_002doverlay_002dstubs-673"><code>--extra-overlay-stubs</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dfatal_002dwarnings-170"><code>--fatal-warnings</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dfile_002dalignment-288"><code>--file-alignment</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dfilter_003d_0040var_007bname_007d-43"><code>--filter=</code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dfix_002darm1176-607"><code>--fix-arm1176</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="i960.html#index-g_t_002d_002dfix_002dcortex_002da8-576"><code>--fix-cortex-a8</code></a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dfix_002dv4bx-599"><code>--fix-v4bx</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dfix_002dv4bx_002dinterworking-601"><code>--fix-v4bx-interworking</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dforce_002ddynamic-86"><code>--force-dynamic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dforce_002dexe_002dsuffix-172"><code>--force-exe-suffix</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dforceinteg-320"><code>--forceinteg</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dformat_003d_0040var_007bformat_007d-14"><code>--format=</code><var>format</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="TI-COFF.html#index-g_t_002d_002dformat_003d_0040var_007bversion_007d-681"><code>--format=</code><var>version</var></a>: <a href="TI-COFF.html#TI-COFF">TI COFF</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dgc_002dsections-173"><code>--gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dgot-332"><code>--got</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="M68K.html#index-g_t_002d_002dgot_003d_0040var_007btype_007d-622"><code>--got=</code><var>type</var></a>: <a href="M68K.html#M68K">M68K</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dgpsize_003d_0040var_007bvalue_007d-48"><code>--gpsize=</code><var>value</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dhash_002dsize_003d_0040var_007bnumber_007d-270"><code>--hash-size=</code><var>number</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dhash_002dstyle_003d_0040var_007bstyle_007d-271"><code>--hash-style=</code><var>style</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dheap-290"><code>--heap</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dhelp-183"><code>--help</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dimage_002dbase-292"><code>--image-base</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002djust_002dsymbols_003d_0040var_007bfile_007d-93"><code>--just-symbols=</code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dkill_002dat-293"><code>--kill-at</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dlarge_002daddress_002daware-294"><code>--large-address-aware</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dld_002dgenerated_002dunwind_002dinfo-267"><code>--ld-generated-unwind-info</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dleading_002dunderscore-282"><code>--leading-underscore</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dlibrary_002dpath_003d_0040var_007bdir_007d-62"><code>--library-path=</code><var>dir</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dlibrary_003d_0040var_007bnamespec_007d-59"><code>--library=</code><var>namespec</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-g_t_002d_002dlocal_002dstore_003dlo_003ahi-675"><code>--local-store=lo:hi</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dmajor_002dimage_002dversion-295"><code>--major-image-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dmajor_002dos_002dversion-296"><code>--major-os-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dmajor_002dsubsystem_002dversion-297"><code>--major-subsystem-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="i960.html#index-g_t_002d_002dmerge_002dexidx_002dentries-578"><code>--merge-exidx-entries</code></a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dminor_002dimage_002dversion-298"><code>--minor-image-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dminor_002dos_002dversion-299"><code>--minor-os-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dminor_002dsubsystem_002dversion-300"><code>--minor-subsystem-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dmri_002dscript_003d_0040var_007bMRI_002dcmdfile_007d-18"><code>--mri-script=</code><var>MRI-cmdfile</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="HPPA-ELF32.html#index-g_t_002d_002dmulti_002dsubspace-618"><code>--multi-subspace</code></a>: <a href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dnmagic-71"><code>--nmagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002daccept_002dunknown_002dinput_002darch-134"><code>--no-accept-unknown-input-arch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dadd_002dneeded-138"><code>--no-add-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dallow_002dshlib_002dundefined-193"><code>--no-allow-shlib-undefined</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002das_002dneeded-136"><code>--no-as-needed</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dbind-324"><code>--no-bind</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dcheck_002dsections-155"><code>--no-check-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dcopy_002ddt_002dneeded_002dentries-157"><code>--no-copy-dt-needed-entries</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002ddefine_002dcommon-161"><code>--no-define-common</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002ddemangle-166"><code>--no-demangle</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002ddotsyms-643"><code>--no-dotsyms</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dno_002denum_002dsize_002dwarning-610"><code>--no-enum-size-warning</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dexport_002ddynamic-34"><code>--no-export-dynamic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dfatal_002dwarnings-171"><code>--no-fatal-warnings</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dno_002dfix_002darm1176-608"><code>--no-fix-arm1176</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="i960.html#index-g_t_002d_002dno_002dfix_002dcortex_002da8-577"><code>--no-fix-cortex-a8</code></a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dgc_002dsections-174"><code>--no-gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002disolation-322"><code>--no-isolation</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dkeep_002dmemory-187"><code>--no-keep-memory</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dleading_002dunderscore-283"><code>--no-leading-underscore</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="i960.html#index-g_t_002d_002dno_002dmerge_002dexidx_002dentries-579"><code>--no-merge-exidx-entries</code></a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dmerge_002dexidx_002dentries-329"><code>--no-merge-exidx-entries</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dmulti_002dtoc-653"><code>--no-multi-toc</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002domagic-76"><code>--no-omagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dopd_002doptimize-647"><code>--no-opd-optimize</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="SPU-ELF.html#index-g_t_002d_002dno_002doverlays-669"><code>--no-overlays</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dplt_002dalign-658"><code>--no-plt-align</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dplt_002dstatic_002dchain-661"><code>--no-plt-static-chain</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dplt_002dthread_002dsafe-664"><code>--no-plt-thread-safe</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dprint_002dgc_002dsections-177"><code>--no-print-gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dseh-323"><code>--no-seh</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dtls_002doptimize-645"><code>--no-tls-optimize</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-g_t_002d_002dno_002dtls_002doptimize-635"><code>--no-tls-optimize</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dtoc_002doptimize-651"><code>--no-toc-optimize</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dno_002dtoc_002dsort-655"><code>--no-toc-sort</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dtrampoline-330"><code>--no-trampoline</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dundefined-188"><code>--no-undefined</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dundefined_002dversion-194"><code>--no-undefined-version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dwarn_002dmismatch-197"><code>--no-warn-mismatch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dwarn_002dsearch_002dmismatch-198"><code>--no-warn-search-mismatch</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dno_002dwchar_002dsize_002dwarning-612"><code>--no-wchar-size-warning</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002dwhole_002darchive-199"><code>--no-whole-archive</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dnoinhibit_002dexec-201"><code>--noinhibit-exec</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dnon_002doverlapping_002dopd-649"><code>--non-overlapping-opd</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dnxcompat-321"><code>--nxcompat</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002doformat_003d_0040var_007boutput_002dformat_007d-203"><code>--oformat=</code><var>output-format</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002domagic-73"><code>--omagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dout_002dimplib-305"><code>--out-implib</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002doutput_002ddef-303"><code>--output-def</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002doutput_003d_0040var_007boutput_007d-79"><code>--output=</code><var>output</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dpic_002dexecutable-205"><code>--pic-executable</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dpic_002dveneer-614"><code>--pic-veneer</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dplt_002dalign-657"><code>--plt-align</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dplt_002dstatic_002dchain-660"><code>--plt-static-chain</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dplt_002dthread_002dsafe-663"><code>--plt-thread-safe</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="SPU-ELF.html#index-g_t_002d_002dplugin-667"><code>--plugin</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dprint_002dgc_002dsections-176"><code>--print-gc-sections</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dprint_002dmap-67"><code>--print-map</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dprint_002doutput_002dformat-179"><code>--print-output-format</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dreduce_002dmemory_002doverheads-272"><code>--reduce-memory-overheads</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002drelax-209"><code>--relax</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="i960.html#index-g_t_0040option_007b_002d_002drelax_007d-on-i960-573"><samp><span class="option">--relax</span></samp> on i960</a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-g_t_002d_002drelax-on-PowerPC-625"><code>--relax on PowerPC</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Xtensa.html#index-g_t_0040option_007b_002d_002drelax_007d-on-Xtensa-694"><samp><span class="option">--relax</span></samp> on Xtensa</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002drelocatable-91"><code>--relocatable</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dretain_002dsymbols_002dfile_003d_0040var_007bfilename_007d-216"><code>--retain-symbols-file=</code><var>filename</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dscript_003d_0040var_007bscript_007d-105"><code>--script=</code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-g_t_002d_002dsdata_002dgot-631"><code>--sdata-got</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsection_002dalignment-315"><code>--section-alignment</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsection_002dstart_003d_0040var_007bsectionname_007d_003d_0040var_007borg_007d-234"><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-g_t_002d_002dsecure_002dplt-629"><code>--secure-plt</code></a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsort_002dcommon-224"><code>--sort-common</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsort_002dsection_003dalignment-226"><code>--sort-section=alignment</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsort_002dsection_003dname-225"><code>--sort-section=name</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsplit_002dby_002dfile-227"><code>--split-by-file</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsplit_002dby_002dreloc-228"><code>--split-by-reloc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dstack-317"><code>--stack</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="SPU-ELF.html#index-g_t_002d_002dstack_002danalysis-677"><code>--stack-analysis</code></a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dstats-229"><code>--stats</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dstrip_002dall-96"><code>--strip-all</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dstrip_002ddebug-99"><code>--strip-debug</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-g_t_002d_002dstub_002dgroup_002dsize-638"><code>--stub-group-size</code></a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="HPPA-ELF32.html#index-g_t_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-620"><code>--stub-group-size=</code><var>N</var></a>: <a href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dstub_002dgroup_002dsize_003d_0040var_007bN_007d-616"><code>--stub-group-size=</code><var>N</var></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsubsystem-318"><code>--subsystem</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dsupport_002dold_002dcode-585"><code>--support-old-code</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dsysroot_003d_0040var_007bdirectory_007d-230"><code>--sysroot=</code><var>directory</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dtarget_002dhelp-184"><code>--target-help</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dtarget1_002dabs-595"><code>--target1-abs</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dtarget1_002drel-594"><code>--target1-rel</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dtarget2_003d_0040var_007btype_007d-597"><code>--target2=</code><var>type</var></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dthumb_002dentry_003d_0040var_007bentry_007d-588"><code>--thumb-entry=</code><var>entry</var></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dtrace-102"><code>--trace</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dtrace_002dsymbol_003d_0040var_007bsymbol_007d-127"><code>--trace-symbol=</code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dtraditional_002dformat-231"><code>--traditional-format</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dtsaware-326"><code>--tsaware</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dundefined_003d_0040var_007bsymbol_007d-111"><code>--undefined=</code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dunique_005b_003d_0040var_007bSECTION_007d_005d-115"><code>--unique[=</code><var>SECTION</var><code>]</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dunresolved_002dsymbols-243"><code>--unresolved-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002duse_002dblx-603"><code>--use-blx</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002duse_002dnul_002dprefixed_002dimport_002dtables-590"><code>--use-nul-prefixed-import-tables</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dverbose_005b_003d_0040var_007bNUMBER_007d_005d-244"><code>--verbose[=</code><var>NUMBER</var><code>]</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dversion-118"><code>--version</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dversion_002dscript_003d_0040var_007bversion_002dscriptfile_007d-246"><code>--version-script=</code><var>version-scriptfile</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-g_t_002d_002dvfp11_002ddenorm_002dfix-605"><code>--vfp11-denorm-fix</code></a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002dalternate_002dem-260"><code>--warn-alternate-em</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002dcommon-248"><code>--warn-common</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002dconstructors-251"><code>--warn-constructors</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002dmultiple_002dgp-252"><code>--warn-multiple-gp</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002donce-253"><code>--warn-once</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002dsection_002dalign-256"><code>--warn-section-align</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002dshared_002dtextrel-259"><code>--warn-shared-textrel</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwarn_002dunresolved_002dsymbols-261"><code>--warn-unresolved-symbols</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwdmdriver-325"><code>--wdmdriver</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwhole_002darchive-263"><code>--whole-archive</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dwrap_003d_0040var_007bsymbol_007d-265"><code>--wrap=</code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dA-_0040var_007barch_007d-10"><code>-A </code><var>arch</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_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-g_t_002dassert-_0040var_007bkeyword_007d-139"><code>-assert </code><var>keyword</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002db-_0040var_007bformat_007d-13"><code>-b </code><var>format</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dBdynamic-140"><code>-Bdynamic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dBgroup-143"><code>-Bgroup</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dBshareable-222"><code>-Bshareable</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dBstatic-144"><code>-Bstatic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dBsymbolic-148"><code>-Bsymbolic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dBsymbolic_002dfunctions-149"><code>-Bsymbolic-functions</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dc-_0040var_007bMRI_002dcmdfile_007d-17"><code>-c </code><var>MRI-cmdfile</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dcall_005fshared-142"><code>-call_shared</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dd-21"><code>-d</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002ddc-22"><code>-dc</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002ddn-145"><code>-dn</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002ddp-23"><code>-dp</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002ddT-_0040var_007bscript_007d-107"><code>-dT </code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002ddy-141"><code>-dy</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dE-32"><code>-E</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002de-_0040var_007bentry_007d-27"><code>-e </code><var>entry</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dEB-37"><code>-EB</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dEL-39"><code>-EL</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dF-_0040var_007bname_007d-42"><code>-F </code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002df-_0040var_007bname_007d-40"><code>-f </code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dfini_003d_0040var_007bname_007d-45"><code>-fini=</code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dg-46"><code>-g</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dG-_0040var_007bvalue_007d-47"><code>-G </code><var>value</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dh-_0040var_007bname_007d-51"><code>-h </code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002di-53"><code>-i</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dI_0040var_007bfile_007d-168"><code>-I</code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dinit_003d_0040var_007bname_007d-56"><code>-init=</code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dL-_0040var_007bdir_007d-61"><code>-L </code><var>dir</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dl-_0040var_007bnamespec_007d-58"><code>-l </code><var>namespec</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dM-66"><code>-M</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dm-_0040var_007bemulation_007d-64"><code>-m </code><var>emulation</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dMap_003d_0040var_007bmapfile_007d-185"><code>-Map=</code><var>mapfile</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dN-72"><code>-N</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dn-68"><code>-n</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002d_002dno_002drelax-212">–no-relax</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dnon_005fshared-146"><code>-non_shared</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dnostdlib-202"><code>-nostdlib</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dO-_0040var_007blevel_007d-81"><code>-O </code><var>level</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002do-_0040var_007boutput_007d-78"><code>-o </code><var>output</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dP-_0040var_007bAUDITLIB_007d-25"><code>-P </code><var>AUDITLIB</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dpie-204"><code>-pie</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dq-83"><code>-q</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dqmagic-207"><code>-qmagic</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dQy-208"><code>-Qy</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dr-90"><code>-r</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dR-_0040var_007bfile_007d-92"><code>-R </code><var>file</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002drpath_002dlink_003d_0040var_007bdir_007d-220"><code>-rpath-link=</code><var>dir</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002drpath_003d_0040var_007bdir_007d-218"><code>-rpath=</code><var>dir</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dS-98"><code>-S</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002ds-95"><code>-s</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dshared-221"><code>-shared</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dsoname_003d_0040var_007bname_007d-52"><code>-soname=</code><var>name</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dstatic-147"><code>-static</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dt-101"><code>-t</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dT-_0040var_007bscript_007d-104"><code>-T </code><var>script</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dTbss_003d_0040var_007borg_007d-235"><code>-Tbss=</code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dTdata_003d_0040var_007borg_007d-236"><code>-Tdata=</code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dTrodata_002dsegment_003d_0040var_007borg_007d-241"><code>-Trodata-segment=</code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dTtext_002dsegment_003d_0040var_007borg_007d-239"><code>-Ttext-segment=</code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dTtext_003d_0040var_007borg_007d-237"><code>-Ttext=</code><var>org</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002du-_0040var_007bsymbol_007d-110"><code>-u </code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dUr-113"><code>-Ur</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dV-117"><code>-V</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dv-116"><code>-v</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dX-123"><code>-X</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dx-120"><code>-x</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dY-_0040var_007bpath_007d-129"><code>-Y </code><var>path</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dy-_0040var_007bsymbol_007d-126"><code>-y </code><var>symbol</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dz-defs-189"><code>-z defs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dz-_0040var_007bkeyword_007d-130"><code>-z </code><var>keyword</var></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-g_t_002dz-muldefs-191"><code>-z muldefs</code></a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Location-Counter.html#index-g_t_002e-515"><code>.</code></a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-g_t_002fDISCARD_002f-443">/DISCARD/</a>: <a href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a></li>
|
||||
<li><a href="Output-Section-Phdr.html#index-g_t_003a_0040var_007bphdr_007d-466"><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-g_t_003d_0040var_007bfillexp_007d-469"><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-g_t_003e_0040var_007bregion_007d-463"><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-g_t_005bCOMMON_005d-420">[COMMON]</a>: <a href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bABSOLUTE_007d-_0028MRI_0029-717"><code>ABSOLUTE</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Expression-Section.html#index-absolute-and-relocatable-symbols-530">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-528">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-534"><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-536"><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-402">address, section</a>: <a href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bALIAS_007d-_0028MRI_0029-718"><code>ALIAS</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bALIGN_007d-_0028MRI_0029-719"><code>ALIGN</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-align-expression-543">align expression</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-align-location-counter-541">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-538"><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-539"><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-454"><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="WIN32.html#index-aligned-common-symbols-692">aligned common symbols</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-ALIGNOF_0028_0040var_007bsection_007d_0029-544"><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-477">allocating memory</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-architecture-391">architecture</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Options.html#index-architectures-9">architectures</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-archive-files_002c-from-cmd-line-57">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-366">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-498">arithmetic</a>: <a href="Expressions.html#Expressions">Expressions</a></li>
|
||||
<li><a href="Operators.html#index-arithmetic-operators-523">arithmetic operators</a>: <a href="Operators.html#Operators">Operators</a></li>
|
||||
<li><a href="ARM.html#index-ARM-interworking-support-584">ARM interworking support</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-ARM1176-erratum-workaround-606">ARM1176 erratum workaround</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="File-Commands.html#index-AS_005fNEEDED_0028_0040var_007bfiles_007d_0029-361"><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-377"><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-378">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-393">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-449"><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-448"><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-688">automatic data imports</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="BFD.html#index-back-end-697">back end</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bBASE_007d-_0028MRI_0029-720"><code>BASE</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="ARM.html#index-BE8-591">BE8</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Canonical-format.html#index-BFD-canonical-format-704">BFD canonical format</a>: <a href="Canonical-format.html#Canonical-format">Canonical format</a></li>
|
||||
<li><a href="BFD.html#index-BFD-requirements-701">BFD requirements</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="Options.html#index-big_002dendian-objects-35">big-endian objects</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-binary-input-format-12">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-546"><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-708">bug criteria</a>: <a href="Bug-Criteria.html#Bug-Criteria">Bug Criteria</a></li>
|
||||
<li><a href="Bug-Reporting.html#index-bug-reports-714">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-706">bugs in <samp><span class="command">ld</span></samp></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-426"><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-438">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-g_t_0040code_007bCHIP_007d-_0028MRI_0029-721"><code>CHIP</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Environment.html#index-COLLECT_005fNO_005fDEMANGLE-338"><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-250">combining symbols, warnings on</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Scripts.html#index-command-files-342">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-20">common allocation</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-common-allocation-in-linker-script-382">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-416">common symbol placement</a>: <a href="Input-Section-Common.html#Input-Section-Common">Input Section Common</a></li>
|
||||
<li><a href="Symbolic-Constants.html#index-COMMONPAGESIZE-509"><code>COMMONPAGESIZE</code></a>: <a href="Symbolic-Constants.html#Symbolic-Constants">Symbolic Constants</a></li>
|
||||
<li><a href="Options.html#index-compatibility_002c-MRI-19">compatibility, MRI</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Symbolic-Constants.html#index-CONSTANT-507"><code>CONSTANT</code></a>: <a href="Symbolic-Constants.html#Symbolic-Constants">Symbolic Constants</a></li>
|
||||
<li><a href="Constants.html#index-constants-in-linker-scripts-500">constants in linker scripts</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Output-Section-Constraint.html#index-constraints-on-output-sections-462">constraints on output sections</a>: <a href="Output-Section-Constraint.html#Output-Section-Constraint">Output Section Constraint</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-CONSTRUCTORS-437"><code>CONSTRUCTORS</code></a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="Options.html#index-constructors-114">constructors</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-constructors_002c-arranging-in-link-439">constructors, arranging in link</a>: <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a></li>
|
||||
<li><a href="i960.html#index-Cortex_002dA8-erratum-workaround-575">Cortex-A8 erratum workaround</a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-crash-of-linker-711">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-434"><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-686">creating a DEF file</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Options.html#index-cross-reference-table-158">cross reference table</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-cross-references-388">cross references</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Location-Counter.html#index-current-output-location-518">current output location</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-data-423">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-547"><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-548"><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-549"><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-233">dbx</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-DEF-files_002c-creating-301">DEF files, creating</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Environment.html#index-default-emulation-336">default emulation</a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="Environment.html#index-default-input-format-334">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-550"><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-122">deleting local symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Environment.html#index-demangling_002c-default-339">demangling, default</a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="Options.html#index-demangling_002c-from-command-line-164">demangling, from command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="WIN32.html#index-direct-linking-to-a-dll-690">direct linking to a dll</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-discarding-sections-440">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-478">discontinuous memory</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Options.html#index-DLLs_002c-creating-284">DLLs, creating</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-DLLs_002c-linking-to-308">DLLs, linking to</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Location-Counter.html#index-dot-516">dot</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Location-Counter.html#index-dot-inside-sections-520">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-521">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-167">dynamic linker, from command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-dynamic-symbol-table-31">dynamic symbol table</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PHDRS.html#index-ELF-program-headers-488">ELF program headers</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Options.html#index-emulation-63">emulation</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Environment.html#index-emulation_002c-default-337">emulation, default</a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bEND_007d-_0028MRI_0029-722"><code>END</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Options.html#index-endianness-36">endianness</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Entry-Point.html#index-entry-point-351">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-26">entry point, from command line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-entry-point_002c-thumb-587">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-348"><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-712">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-346">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-683">exporting DLL symbols</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Evaluation.html#index-expression-evaluation-order-526">expression evaluation order</a>: <a href="Evaluation.html#Evaluation">Evaluation</a></li>
|
||||
<li><a href="Expression-Section.html#index-expression-sections-527">expression sections</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-expression_002c-absolute-535">expression, absolute</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Expressions.html#index-expressions-497">expressions</a>: <a href="Expressions.html#Expressions">Expressions</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-EXTERN-379"><code>EXTERN</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-fatal-signal-709">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-409">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-491"><code>FILEHDR</code></a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Output-Section-Keywords.html#index-filename-symbols-436">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-471">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-431"><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-44">finalization function</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="File-Commands.html#index-first-input-file-369">first input file</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Entry-Point.html#index-first-instruction-350">first instruction</a>: <a href="Entry-Point.html#Entry-Point">Entry Point</a></li>
|
||||
<li><a href="ARM.html#index-FIX_005fV4BX-598">FIX_V4BX</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-FIX_005fV4BX_005fINTERWORKING-600">FIX_V4BX_INTERWORKING</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-FORCE_005fCOMMON_005fALLOCATION-381"><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-458">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-455">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-87">forcing the creation of dynamic sections</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bFORMAT_007d-_0028MRI_0029-723"><code>FORMAT</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-functions-in-expressions-533">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-422">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-175">garbage collection</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-generating-optimized-output-82">generating optimized output</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Overview.html#index-g_t_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-333"><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-359"><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-360">grouping input files</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Options.html#index-groups-of-archives-132">groups of archives</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="H8_002f300.html#index-H8_002f300-support-569">H8/300 support</a>: <a href="H8_002f300.html#H8_002f300">H8/300</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-header-size-564">header size</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-heap-size-289">heap size</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-help-181">help</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="HIDDEN.html#index-HIDDEN-396">HIDDEN</a>: <a href="HIDDEN.html#HIDDEN">HIDDEN</a></li>
|
||||
<li><a href="Location-Counter.html#index-holes-519">holes</a>: <a href="Location-Counter.html#Location-Counter">Location Counter</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-holes_002c-filling-432">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-617">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-619">HPPA stub grouping</a>: <a href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a></li>
|
||||
<li><a href="i960.html#index-i960-support-572">i960 support</a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="Options.html#index-image-base-291">image base</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Implicit-Linker-Scripts.html#index-implicit-linker-scripts-567">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-682">import libraries</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="File-Commands.html#index-INCLUDE-_0040var_007bfilename_007d-353"><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-354">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-264">including an entire archive</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-incremental-link-54">incremental link</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-INHIBIT_005fCOMMON_005fALLOCATION-383"><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-55">initialization function</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-initialized-data-in-ROM-453">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-373">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-435">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-356">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-103">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-357">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-459">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-406">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-407">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-404">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-355"><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-385"><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-386">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-499">integer notation</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Constants.html#index-integer-suffixes-505">integer suffixes</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Canonical-format.html#index-internal-object_002dfile-format-705">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-713">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-502">K and M integer suffixes</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Input-Section-Keep.html#index-KEEP-421">KEEP</a>: <a href="Input-Section-Keep.html#Input-Section-Keep">Input Section Keep</a></li>
|
||||
<li><a href="MEMORY.html#index-l-_003d-485"><code>l =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Evaluation.html#index-lazy-evaluation-525">lazy evaluation</a>: <a href="Evaluation.html#Evaluation">Evaluation</a></li>
|
||||
<li><a href="Bug-Reporting.html#index-g_t_0040command_007bld_007d-bugs_002c-reporting-715"><samp><span class="command">ld</span></samp> bugs, reporting</a>: <a href="Bug-Reporting.html#Bug-Reporting">Bug Reporting</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-LD_005fFEATURE_0028_0040var_007bstring_007d_0029-392"><code>LD_FEATURE(</code><var>string</var><code>)</code></a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Environment.html#index-LDEMULATION-335"><code>LDEMULATION</code></a>: <a href="Environment.html#Environment">Environment</a></li>
|
||||
<li><a href="MEMORY.html#index-len-_003d-484"><code>len =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-LENGTH-_003d-483"><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-552"><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-365">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-65">link map</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-link_002dtime-runtime-library-search-path-219">link-time runtime library search path</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Bug-Criteria.html#index-linker-crash-710">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-343">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-345">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-352">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-344">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-358">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-347">linker script simple commands</a>: <a href="Simple-Commands.html#Simple-Commands">Simple Commands</a></li>
|
||||
<li><a href="Scripts.html#index-linker-scripts-341">linker scripts</a>: <a href="Scripts.html#Scripts">Scripts</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bLIST_007d-_0028MRI_0029-724"><code>LIST</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Options.html#index-little_002dendian-objects-38">little-endian objects</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bLOAD_007d-_0028MRI_0029-725"><code>LOAD</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-load-address-450">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-553"><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-447">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-125">local symbols, deleting</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Location-Counter.html#index-location-counter-517">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-428"><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-503">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-580">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-390">machine architecture</a>: <a href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a></li>
|
||||
<li><a href="Machine-Dependent.html#index-machine-dependencies-568">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-405">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-555"><code>MAX</code></a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Symbolic-Constants.html#index-MAXPAGESIZE-508"><code>MAXPAGESIZE</code></a>: <a href="Symbolic-Constants.html#Symbolic-Constants">Symbolic Constants</a></li>
|
||||
<li><a href="MEMORY.html#index-MEMORY-474"><code>MEMORY</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-memory-region-attributes-479">memory region attributes</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-memory-regions-475">memory regions</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Output-Section-Region.html#index-memory-regions-and-sections-465">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-186">memory usage</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-MIN-556"><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-621">Motorola 68K GOT generation</a>: <a href="M68K.html#M68K">M68K</a></li>
|
||||
<li><a href="MRI.html#index-MRI-compatibility-716">MRI compatibility</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="MSP430.html#index-MSP430-extra-sections-623">MSP430 extra sections</a>: <a href="MSP430.html#MSP430">MSP430</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bNAME_007d-_0028MRI_0029-726"><code>NAME</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Output-Section-Name.html#index-name_002c-section-400">name, section</a>: <a href="Output-Section-Name.html#Output-Section-Name">Output Section Name</a></li>
|
||||
<li><a href="Symbols.html#index-names-511">names</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-naming-the-output-file-80">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-557"><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-70">NMAGIC</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-NO_005fENUM_005fSIZE_005fWARNING-609">NO_ENUM_SIZE_WARNING</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-NO_005fWCHAR_005fSIZE_005fWARNING-611">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-387"><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-445"><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-565">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-481"><code>o =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="BFD.html#index-objdump-_002di-700"><code>objdump -i</code></a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="BFD.html#index-object-file-management-698">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-699">object formats available</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="Options.html#index-object-size-49">object size</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-OMAGIC-75">OMAGIC</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Constraint.html#index-ONLY_005fIF_005fRO-460"><code>ONLY_IF_RO</code></a>: <a href="Output-Section-Constraint.html#Output-Section-Constraint">Output Section Constraint</a></li>
|
||||
<li><a href="Output-Section-Constraint.html#index-ONLY_005fIF_005fRW-461"><code>ONLY_IF_RW</code></a>: <a href="Output-Section-Constraint.html#Output-Section-Constraint">Output Section Constraint</a></li>
|
||||
<li><a href="BFD-outline.html#index-opening-object-files-703">opening object files</a>: <a href="BFD-outline.html#BFD-outline">BFD outline</a></li>
|
||||
<li><a href="Operators.html#index-operators-for-arithmetic-522">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-g_t_0040code_007bORDER_007d-_0028MRI_0029-727"><code>ORDER</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="MEMORY.html#index-org-_003d-482"><code>org =</code></a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="MEMORY.html#index-ORIGIN-_003d-480"><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-559"><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-514">orphan</a>: <a href="Orphan-Sections.html#Orphan-Sections">Orphan Sections</a></li>
|
||||
<li><a href="Options.html#index-output-file-after-errors-200">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-371">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-363">output file name in linker script</a>: <a href="File-Commands.html#File-Commands">File Commands</a></li>
|
||||
<li><a href="Options.html#index-output-format-180">output format</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Forced-Output-Alignment.html#index-output-section-alignment-456">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-444">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-425">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-362"><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-389"><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-370"><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-472"><code>OVERLAY</code></a>: <a href="Overlay-Description.html#Overlay-Description">Overlay Description</a></li>
|
||||
<li><a href="Overlay-Description.html#index-overlays-473">overlays</a>: <a href="Overlay-Description.html#Overlay-Description">Overlay Description</a></li>
|
||||
<li><a href="Options.html#index-partial-link-88">partial link</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-PE-import-table-prefixing-589">PE import table prefixing</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="PHDRS.html#index-PHDRS-486"><code>PHDRS</code></a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="ARM.html#index-PIC_005fVENEER-613">PIC_VENEER</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-position-independent-executables-206">position independent executables</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-ELF32-options-626">PowerPC ELF32 options</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-GOT-630">PowerPC GOT</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-long-branches-624">PowerPC long branches</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-PLT-627">PowerPC PLT</a>: <a href="PowerPC-ELF32.html#PowerPC-ELF32">PowerPC ELF32</a></li>
|
||||
<li><a href="PowerPC-ELF32.html#index-PowerPC-stub-symbols-632">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-634">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-641">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-636">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-652">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-646">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-648">PowerPC64 OPD spacing</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-PLT-call-stub-static-chain-659">PowerPC64 PLT call stub static chain</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-PLT-call-stub-thread-safety-662">PowerPC64 PLT call stub thread safety</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-PLT-stub-alignment-656">PowerPC64 PLT stub alignment</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-stub-grouping-637">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-639">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-644">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-650">PowerPC64 TOC optimization</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="PowerPC64-ELF64.html#index-PowerPC64-TOC-sorting-654">PowerPC64 TOC sorting</a>: <a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a></li>
|
||||
<li><a href="Operators.html#index-precedence-in-expressions-524">precedence in expressions</a>: <a href="Operators.html#Operators">Operators</a></li>
|
||||
<li><a href="Output-Section-Type.html#index-prevent-unnecessary-loading-446">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-487">program headers</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Output-Section-Phdr.html#index-program-headers-and-sections-468">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-566">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-489">program segments</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="PROVIDE.html#index-PROVIDE-397">PROVIDE</a>: <a href="PROVIDE.html#PROVIDE">PROVIDE</a></li>
|
||||
<li><a href="PROVIDE_005fHIDDEN.html#index-PROVIDE_005fHIDDEN-398">PROVIDE_HIDDEN</a>: <a href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">PROVIDE_HIDDEN</a></li>
|
||||
<li><a href="MRI.html#index-g_t_0040code_007bPUBLIC_007d-_0028MRI_0029-728"><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-429"><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-512">quoted symbol names</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-read_002donly-text-69">read-only text</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-read_002fwrite-from-cmd-line-74">read/write from cmd line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="REGION_005fALIAS.html#index-region-alias-375">region alias</a>: <a href="REGION_005fALIAS.html#REGION_005fALIAS">REGION_ALIAS</a></li>
|
||||
<li><a href="REGION_005fALIAS.html#index-region-names-376">region names</a>: <a href="REGION_005fALIAS.html#REGION_005fALIAS">REGION_ALIAS</a></li>
|
||||
<li><a href="REGION_005fALIAS.html#index-REGION_005fALIAS_0028_0040var_007balias_007d_002c-_0040var_007bregion_007d_0029-374"><code>REGION_ALIAS(</code><var>alias</var><code>, </code><var>region</var><code>)</code></a>: <a href="REGION_005fALIAS.html#REGION_005fALIAS">REGION_ALIAS</a></li>
|
||||
<li><a href="MEMORY.html#index-regions-of-memory-476">regions of memory</a>: <a href="MEMORY.html#MEMORY">MEMORY</a></li>
|
||||
<li><a href="Expression-Section.html#index-relative-expressions-529">relative expressions</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Options.html#index-relaxing-addressing-modes-211">relaxing addressing modes</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="H8_002f300.html#index-relaxing-on-H8_002f300-570">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-574">relaxing on i960</a>: <a href="i960.html#i960">i960</a></li>
|
||||
<li><a href="M68HC11_002f68HC12.html#index-relaxing-on-M68HC11-581">relaxing on M68HC11</a>: <a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">M68HC11/68HC12</a></li>
|
||||
<li><a href="Xtensa.html#index-relaxing-on-Xtensa-695">relaxing on Xtensa</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
<li><a href="Expression-Section.html#index-relocatable-and-absolute-symbols-531">relocatable and absolute symbols</a>: <a href="Expression-Section.html#Expression-Section">Expression Section</a></li>
|
||||
<li><a href="Options.html#index-relocatable-output-89">relocatable output</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-removing-sections-442">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-707">reporting bugs in <samp><span class="command">ld</span></samp></a>: <a href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a></li>
|
||||
<li><a href="BFD.html#index-requirements-for-BFD-702">requirements for BFD</a>: <a href="BFD.html#BFD">BFD</a></li>
|
||||
<li><a href="Options.html#index-retain-relocations-in-final-executable-85">retain relocations in final executable</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-retaining-specified-symbols-213">retaining specified symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-rodata-segment-origin_002c-cmd-line-242">rodata segment origin, cmd line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-LMA.html#index-ROM-initialized-data-452">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-542">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-540">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-50">runtime library name</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-runtime-library-search-path-217">runtime library search path</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="WIN32.html#index-runtime-pseudo_002drelocation-689">runtime pseudo-relocation</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Constants.html#index-scaled-integers-501">scaled integers</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Input-Section-Common.html#index-scommon-section-418">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-106">script files</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Scripts.html#index-scripts-340">scripts</a>: <a href="Scripts.html#Scripts">Scripts</a></li>
|
||||
<li><a href="Options.html#index-search-directory_002c-from-cmd-line-60">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-367">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-364"><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-g_t_0040code_007bSECT_007d-_0028MRI_0029-729"><code>SECT</code> (MRI)</a>: <a href="MRI.html#MRI">MRI</a></li>
|
||||
<li><a href="Output-Section-Address.html#index-section-address-403">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-537">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-545">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-258">section alignment, warnings on</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Output-Section-Data.html#index-section-data-424">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-470">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-451">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-554">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-401">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-410">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-562">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-464">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-467">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-399"><code>SECTIONS</code></a>: <a href="SECTIONS.html#SECTIONS">SECTIONS</a></li>
|
||||
<li><a href="Output-Section-Discarding.html#index-sections_002c-discarding-441">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-238">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-560"><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-490">segments, ELF</a>: <a href="PHDRS.html#PHDRS">PHDRS</a></li>
|
||||
<li><a href="Options.html#index-shared-libraries-223">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-427"><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-561"><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-563"><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-419">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-414">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-412">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_005fINIT_005fPRIORITY-413">SORT_BY_INIT_PRIORITY</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-411">SORT_BY_NAME</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="Input-Section-Wildcards.html#index-SORT_005fNONE-415">SORT_NONE</a>: <a href="Input-Section-Wildcards.html#Input-Section-Wildcards">Input Section Wildcards</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-676">SPU</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-ELF-options-665">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-672">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-674">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-670">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-668">SPU overlays</a>: <a href="SPU-ELF.html#SPU-ELF">SPU ELF</a></li>
|
||||
<li><a href="SPU-ELF.html#index-SPU-plugins-666">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-430"><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-316">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-349">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-368"><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-97">strip all symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-strip-debugger-symbols-100">strip debugger symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-stripping-all-but-some-symbols-214">stripping all but some symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-STUB_005fGROUP_005fSIZE-615">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-457"><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-504">suffixes for integers</a>: <a href="Constants.html#Constants">Constants</a></li>
|
||||
<li><a href="Builtin-Functions.html#index-symbol-defaults-551">symbol defaults</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Assignments.html#index-symbol-definition_002c-scripts-394">symbol definition, scripts</a>: <a href="Assignments.html#Assignments">Assignments</a></li>
|
||||
<li><a href="Symbols.html#index-symbol-names-510">symbol names</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
|
||||
<li><a href="Options.html#index-symbol-tracing-128">symbol tracing</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="VERSION.html#index-symbol-versions-494">symbol versions</a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="Options.html#index-symbol_002donly-input-94">symbol-only input</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Symbolic-Constants.html#index-symbolic-constants-506">symbolic constants</a>: <a href="Symbolic-Constants.html#Symbolic-Constants">Symbolic Constants</a></li>
|
||||
<li><a href="Options.html#index-symbols_002c-from-command-line-162">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-532">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-215">symbols, retaining selectively</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-synthesizing-linker-210">synthesizing linker</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="H8_002f300.html#index-synthesizing-on-H8_002f300-571">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-372"><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-593">TARGET1</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="ARM.html#index-TARGET2-596">TARGET2</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-text-segment-origin_002c-cmd-line-240">text segment origin, cmd line</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-thumb-entry-point-586">thumb entry point</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="TI-COFF.html#index-TI-COFF-versions-680">TI COFF versions</a>: <a href="TI-COFF.html#TI-COFF">TI COFF</a></li>
|
||||
<li><a href="Options.html#index-traditional-format-232">traditional format</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="M68HC11_002f68HC12.html#index-trampoline-generation-on-M68HC11-582">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-583">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-558">unallocated address, next</a>: <a href="Builtin-Functions.html#Builtin-Functions">Builtin Functions</a></li>
|
||||
<li><a href="Options.html#index-undefined-symbol-112">undefined symbol</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Miscellaneous-Commands.html#index-undefined-symbol-in-linker-script-380">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-255">undefined symbols, warnings on</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Input-Section-Common.html#index-uninitialized-data-placement-417">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-433">unspecified memory</a>: <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a></li>
|
||||
<li><a href="Options.html#index-usage-182">usage</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="ARM.html#index-USE_005fBLX-602">USE_BLX</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="WIN32.html#index-using-a-DEF-file-685">using a DEF file</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="WIN32.html#index-using-auto_002dexport-functionality-684">using auto-export functionality</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="WIN32.html#index-Using-decorations-687">Using decorations</a>: <a href="WIN32.html#WIN32">WIN32</a></li>
|
||||
<li><a href="Assignments.html#index-variables_002c-defining-395">variables, defining</a>: <a href="Assignments.html#Assignments">Assignments</a></li>
|
||||
<li><a href="Options.html#index-verbose_005b_003d_0040var_007bNUMBER_007d_005d-245">verbose[=<var>NUMBER</var>]</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-version-119">version</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="VERSION.html#index-version-script-495">version script</a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="Options.html#index-version-script_002c-symbol-versions-247">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-493"><code>VERSION {script text}</code></a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="VERSION.html#index-versions-of-symbols-496">versions of symbols</a>: <a href="VERSION.html#VERSION">VERSION</a></li>
|
||||
<li><a href="ARM.html#index-VFP11_005fDENORM_005fFIX-604">VFP11_DENORM_FIX</a>: <a href="ARM.html#ARM">ARM</a></li>
|
||||
<li><a href="Options.html#index-warnings_002c-on-combining-symbols-249">warnings, on combining symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-warnings_002c-on-section-alignment-257">warnings, on section alignment</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="Options.html#index-warnings_002c-on-undefined-symbols-254">warnings, on undefined symbols</a>: <a href="Options.html#Options">Options</a></li>
|
||||
<li><a href="WIN32.html#index-weak-externals-691">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-408">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-696">Xtensa options</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
<li><a href="Xtensa.html#index-Xtensa-processors-693">Xtensa processors</a>: <a href="Xtensa.html#Xtensa">Xtensa</a></li>
|
||||
</ul></body></html>
|
||||
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.5 The Location Counter</h4>
|
||||
|
||||
<p><a name="index-g_t_002e-515"></a><a name="index-dot-516"></a><a name="index-location-counter-517"></a><a name="index-current-output-location-518"></a>The special linker variable <dfn>dot</dfn> ‘<samp><span class="samp">.</span></samp>’ 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-519"></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 ‘<samp><span class="samp">.text</span></samp>’ section from <samp><span class="file">file1</span></samp> is
|
||||
located at the beginning of the output section ‘<samp><span class="samp">output</span></samp>’. It is
|
||||
followed by a 1000 byte gap. Then the ‘<samp><span class="samp">.text</span></samp>’ section from
|
||||
<samp><span class="file">file2</span></samp> appears, also with a 1000 byte gap following before the
|
||||
‘<samp><span class="samp">.text</span></samp>’ section from <samp><span class="file">file3</span></samp>. The notation ‘<samp><span class="samp">= 0x12345678</span></samp>’
|
||||
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-520"></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 ‘<samp><span class="samp">.text</span></samp>’ 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 ‘<samp><span class="samp">.text</span></samp>’ 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 ‘<samp><span class="samp">.data</span></samp>’ section will start at 0x500
|
||||
and it will have an extra 0x600 bytes worth of space after the end of
|
||||
the values from the ‘<samp><span class="samp">.data</span></samp>’ input sections and before the end of
|
||||
the ‘<samp><span class="samp">.data</span></samp>’ output section itself.
|
||||
|
||||
<p><a name="index-dot-outside-sections-521"></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,87 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="M68HC11%2f68HC12"></a>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.3 <samp><span class="command">ld</span></samp> and the Motorola 68HC11 and 68HC12 families</h3>
|
||||
|
||||
<p><a name="index-M68HC11-and-68HC12-support-580"></a>
|
||||
|
||||
<h4 class="subsection">4.3.1 Linker Relaxation</h4>
|
||||
|
||||
<p>For the Motorola 68HC11, <samp><span class="command">ld</span></samp> can perform these global
|
||||
optimizations when you specify the ‘<samp><span class="samp">--relax</span></samp>’ command-line option.
|
||||
|
||||
|
||||
<a name="index-relaxing-on-M68HC11-581"></a>
|
||||
<dl><dt><em>relaxing address modes</em><dd><samp><span class="command">ld</span></samp> 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><samp><span class="command">ld</span></samp> 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 <samp><span class="command">gcc</span></samp> is called with <samp><span class="option">-mrelax</span></samp>, 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-582"></a><a name="index-trampoline-generation-on-M68HC12-583"></a>For 68HC11 and 68HC12, <samp><span class="command">ld</span></samp> 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,66 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.6 <samp><span class="command">ld</span></samp> and the Motorola 68K family</h3>
|
||||
|
||||
<p><a name="index-Motorola-68K-GOT-generation-621"></a><a name="index-g_t_002d_002dgot_003d_0040var_007btype_007d-622"></a>The ‘<samp><span class="samp">--got=</span><var>type</var></samp>’ option lets you choose the GOT generation scheme.
|
||||
The choices are ‘<samp><span class="samp">single</span></samp>’, ‘<samp><span class="samp">negative</span></samp>’, ‘<samp><span class="samp">multigot</span></samp>’ and
|
||||
‘<samp><span class="samp">target</span></samp>’. When ‘<samp><span class="samp">target</span></samp>’ is selected the linker chooses
|
||||
the default GOT generation scheme for the current target.
|
||||
‘<samp><span class="samp">single</span></samp>’ tells the linker to generate a single GOT with
|
||||
entries only at non-negative offsets.
|
||||
‘<samp><span class="samp">negative</span></samp>’ instructs the linker to generate a single GOT with
|
||||
entries at both negative and positive offsets. Not all environments
|
||||
support such GOTs.
|
||||
‘<samp><span class="samp">multigot</span></samp>’ 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,147 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.7 MEMORY Command</h3>
|
||||
|
||||
<p><a name="index-MEMORY-474"></a><a name="index-memory-regions-475"></a><a name="index-regions-of-memory-476"></a><a name="index-allocating-memory-477"></a><a name="index-discontinuous-memory-478"></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 within the <code>MEMORY</code> command. However you can
|
||||
add later alias names to existing memory regions with the <a href="REGION_005fALIAS.html#REGION_005fALIAS">REGION_ALIAS</a>
|
||||
command.
|
||||
|
||||
<p><a name="index-memory-region-attributes-479"></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>‘<samp><span class="samp">R</span></samp>’<dd>Read-only section
|
||||
<br><dt>‘<samp><span class="samp">W</span></samp>’<dd>Read/write section
|
||||
<br><dt>‘<samp><span class="samp">X</span></samp>’<dd>Executable section
|
||||
<br><dt>‘<samp><span class="samp">A</span></samp>’<dd>Allocatable section
|
||||
<br><dt>‘<samp><span class="samp">I</span></samp>’<dd>Initialized section
|
||||
<br><dt>‘<samp><span class="samp">L</span></samp>’<dd>Same as ‘<samp><span class="samp">I</span></samp>’
|
||||
<br><dt>‘<samp><span class="samp">!</span></samp>’<dd>Invert the sense of any of the attributes that follow
|
||||
</dl>
|
||||
|
||||
<p>If a unmapped section matches any of the listed attributes other than
|
||||
‘<samp><span class="samp">!</span></samp>’, it will be placed in the memory region. The ‘<samp><span class="samp">!</span></samp>’
|
||||
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-480"></a><a name="index-o-_003d-481"></a><a name="index-org-_003d-482"></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-483"></a><a name="index-len-_003d-484"></a><a name="index-l-_003d-485"></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 ‘<samp><span class="samp">0</span></samp>’ for 256 kilobytes,
|
||||
and the other starting at ‘<samp><span class="samp">0x40000000</span></samp>’ for four megabytes. The
|
||||
linker will place into the ‘<samp><span class="samp">rom</span></samp>’ 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 ‘<samp><span class="samp">ram</span></samp>’ 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
|
||||
‘<samp><span class="samp">></span><var>region</var></samp>’ output section attribute. For example, if you have
|
||||
a memory region named ‘<samp><span class="samp">mem</span></samp>’, you would use ‘<samp><span class="samp">>mem</span></samp>’ 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,74 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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 ‘<samp><span class="samp">.MMIX.reg_contents</span></samp>’ 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
|
||||
‘<samp><span class="samp">.MMIX.reg_contents</span></samp>’ 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,145 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="appendix">Appendix A MRI Compatible Script Files</h2>
|
||||
|
||||
<p><a name="index-MRI-compatibility-716"></a>To aid users making the transition to <span class="sc">gnu</span> <samp><span class="command">ld</span></samp> from the MRI
|
||||
linker, <samp><span class="command">ld</span></samp> 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
|
||||
<samp><span class="command">ld</span></samp>. <span class="sc">gnu</span> <samp><span class="command">ld</span></samp> 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
|
||||
‘<samp><span class="samp">-c</span></samp>’ 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, <samp><span class="command">ld</span></samp>
|
||||
issues a warning message, but continues processing the script.
|
||||
|
||||
<p>Lines beginning with ‘<samp><span class="samp">*</span></samp>’ are comments.
|
||||
|
||||
<p>You can write these commands using all upper-case letters, or all
|
||||
lower case; for example, ‘<samp><span class="samp">chip</span></samp>’ is the same as ‘<samp><span class="samp">CHIP</span></samp>’.
|
||||
The following list shows only the upper-case form of each command.
|
||||
|
||||
|
||||
<a name="index-g_t_0040code_007bABSOLUTE_007d-_0028MRI_0029-717"></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, <samp><span class="command">ld</span></samp> 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-g_t_0040code_007bALIAS_007d-_0028MRI_0029-718"></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-g_t_0040code_007bALIGN_007d-_0028MRI_0029-719"></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-g_t_0040code_007bBASE_007d-_0028MRI_0029-720"></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-g_t_0040code_007bCHIP_007d-_0028MRI_0029-721"></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-g_t_0040code_007bEND_007d-_0028MRI_0029-722"></a><br><dt><code>END</code><dd>This command does nothing whatever; it's only accepted for compatibility.
|
||||
|
||||
<p><a name="index-g_t_0040code_007bFORMAT_007d-_0028MRI_0029-723"></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 ‘<samp><span class="samp">S</span></samp>’
|
||||
|
||||
<li>IEEE, if <var>output-format</var> is ‘<samp><span class="samp">IEEE</span></samp>’
|
||||
|
||||
<li>COFF (the ‘<samp><span class="samp">coff-m68k</span></samp>’ variant in BFD), if <var>output-format</var> is
|
||||
‘<samp><span class="samp">COFF</span></samp>’
|
||||
</ol>
|
||||
|
||||
<p><a name="index-g_t_0040code_007bLIST_007d-_0028MRI_0029-724"></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
|
||||
<samp><span class="command">ld</span></samp> command-line option ‘<samp><span class="samp">-M</span></samp>’.
|
||||
|
||||
<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-g_t_0040code_007bLOAD_007d-_0028MRI_0029-725"></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 <samp><span class="command">ld</span></samp>
|
||||
command line.
|
||||
|
||||
<p><a name="index-g_t_0040code_007bNAME_007d-_0028MRI_0029-726"></a><br><dt><code>NAME </code><var>output-name</var><dd><var>output-name</var> is the name for the program produced by <samp><span class="command">ld</span></samp>; the
|
||||
MRI-compatible command <code>NAME</code> is equivalent to the command-line
|
||||
option ‘<samp><span class="samp">-o</span></samp>’ or the general script language command <code>OUTPUT</code>.
|
||||
|
||||
<p><a name="index-g_t_0040code_007bORDER_007d-_0028MRI_0029-727"></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, <samp><span class="command">ld</span></samp> 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-g_t_0040code_007bPUBLIC_007d-_0028MRI_0029-728"></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-g_t_0040code_007bSECT_007d-_0028MRI_0029-729"></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>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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 ‘<samp><span class="samp">-m [mpu type]</span></samp>’
|
||||
will select an appropriate linker script for selected MPU type. (To get a list of known MPUs
|
||||
just pass ‘<samp><span class="samp">-m help</span></samp>’ option to the linker).
|
||||
|
||||
<p><a name="index-MSP430-extra-sections-623"></a>The linker will recognize some extra sections which are MSP430 specific:
|
||||
|
||||
<dl>
|
||||
<dt><code>‘</code><samp><span class="samp">.vectors</span></samp><code>’</code><dd>Defines a portion of ROM where interrupt vectors located.
|
||||
|
||||
<br><dt><code>‘</code><samp><span class="samp">.bootloader</span></samp><code>’</code><dd>Defines the bootloader portion of the ROM (if applicable). Any code
|
||||
in this section will be uploaded to the MPU.
|
||||
|
||||
<br><dt><code>‘</code><samp><span class="samp">.infomem</span></samp><code>’</code><dd>Defines an information memory section (if applicable). Any code in
|
||||
this section will be uploaded to the MPU.
|
||||
|
||||
<br><dt><code>‘</code><samp><span class="samp">.infomemnobits</span></samp><code>’</code><dd>This is the same as the ‘<samp><span class="samp">.infomem</span></samp>’ section except that any code
|
||||
in this section will not be uploaded to the MPU.
|
||||
|
||||
<br><dt><code>‘</code><samp><span class="samp">.noinit</span></samp><code>’</code><dd>Denotes a portion of RAM located above ‘<samp><span class="samp">.bss</span></samp>’ section.
|
||||
|
||||
<p>The last two sections are used by gcc.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">4 Machine Dependent Features</h2>
|
||||
|
||||
<p><a name="index-machine-dependencies-568"></a><samp><span class="command">ld</span></samp> has additional features on some platforms; the following
|
||||
sections describe them. Machines where <samp><span class="command">ld</span></samp> has no additional
|
||||
functionality are not listed.
|
||||
|
||||
<ul class="menu">
|
||||
<li><a accesskey="1" href="H8_002f300.html#H8_002f300">H8/300</a>: <samp><span class="command">ld</span></samp> and the H8/300
|
||||
|
||||
<li><a accesskey="2" href="i960.html#i960">i960</a>: <samp><span class="command">ld</span></samp> and the Intel 960 family
|
||||
|
||||
<li><a accesskey="3" href="ARM.html#ARM">ARM</a>: <samp><span class="command">ld</span></samp> and the ARM family
|
||||
|
||||
<li><a accesskey="4" href="HPPA-ELF32.html#HPPA-ELF32">HPPA ELF32</a>: <samp><span class="command">ld</span></samp> and HPPA 32-bit ELF
|
||||
|
||||
<li><a accesskey="5" href="M68K.html#M68K">M68K</a>: <samp><span class="command">ld</span></samp> and the Motorola 68K family
|
||||
|
||||
<li><a accesskey="6" href="MMIX.html#MMIX">MMIX</a>: <samp><span class="command">ld</span></samp> and MMIX
|
||||
|
||||
<li><a accesskey="7" href="MSP430.html#MSP430">MSP430</a>: <samp><span class="command">ld</span></samp> 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>: <samp><span class="command">ld</span></samp> and PowerPC 32-bit ELF Support
|
||||
|
||||
<li><a href="PowerPC64-ELF64.html#PowerPC64-ELF64">PowerPC64 ELF64</a>: <samp><span class="command">ld</span></samp> and PowerPC64 64-bit ELF Support
|
||||
|
||||
<li><a href="SPU-ELF.html#SPU-ELF">SPU ELF</a>: <samp><span class="command">ld</span></samp> and SPU ELF Support
|
||||
|
||||
<li><a href="TI-COFF.html#TI-COFF">TI COFF</a>: <samp><span class="command">ld</span></samp> and TI COFF
|
||||
|
||||
<li><a href="WIN32.html#WIN32">WIN32</a>: <samp><span class="command">ld</span></samp> and WIN32 (cygwin/mingw)
|
||||
|
||||
<li><a href="Xtensa.html#Xtensa">Xtensa</a>: <samp><span class="command">ld</span></samp> and Xtensa Processors
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<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.11">
|
||||
<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="REGION_005fALIAS.html#REGION_005fALIAS" title="REGION_ALIAS">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Miscellaneous-Commands"></a>
|
||||
Previous: <a rel="previous" accesskey="p" href="REGION_005fALIAS.html#REGION_005fALIAS">REGION_ALIAS</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Simple-Commands.html#Simple-Commands">Simple Commands</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.5 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-377"></a><a name="index-assertion-in-linker-script-378"></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-379"></a><a name="index-undefined-symbol-in-linker-script-380"></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 ‘<samp><span class="samp">-u</span></samp>’ command-line option.
|
||||
|
||||
<br><dt><code>FORCE_COMMON_ALLOCATION</code><dd><a name="index-FORCE_005fCOMMON_005fALLOCATION-381"></a><a name="index-common-allocation-in-linker-script-382"></a>This command has the same effect as the ‘<samp><span class="samp">-d</span></samp>’ command-line option:
|
||||
to make <samp><span class="command">ld</span></samp> assign space to common symbols even if a relocatable
|
||||
output file is specified (‘<samp><span class="samp">-r</span></samp>’).
|
||||
|
||||
<br><dt><code>INHIBIT_COMMON_ALLOCATION</code><dd><a name="index-INHIBIT_005fCOMMON_005fALLOCATION-383"></a><a name="index-common-allocation-in-linker-script-384"></a>This command has the same effect as the ‘<samp><span class="samp">--no-define-common</span></samp>’
|
||||
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-385"></a><a name="index-insert-user-script-into-default-script-386"></a>This command is typically used in a script specified by ‘<samp><span class="samp">-T</span></samp>’ 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 ‘<samp><span class="samp">-T</span></samp>’ 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 ‘<samp><span class="samp">-T</span></samp>’ scripts are parsed before the default
|
||||
linker script, statements in the ‘<samp><span class="samp">-T</span></samp>’ 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 ‘<samp><span class="samp">-T</span></samp>’ output sections before those in the default script. Here
|
||||
is an example of how a ‘<samp><span class="samp">-T</span></samp>’ 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-387"></a><a name="index-cross-references-388"></a>This command may be used to tell <samp><span class="command">ld</span></samp> 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
|
||||
<samp><span class="command">ld</span></samp> 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-389"></a><a name="index-machine-architecture-390"></a><a name="index-architecture-391"></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 ‘<samp><span class="samp">-f</span></samp>’ option.
|
||||
|
||||
<br><dt><code>LD_FEATURE(</code><var>string</var><code>)</code><dd><a name="index-LD_005fFEATURE_0028_0040var_007bstring_007d_0029-392"></a>This command may be used to modify <samp><span class="command">ld</span></samp> behavior. If
|
||||
<var>string</var> is <code>"SANE_EXPR"</code> then absolute symbols and numbers
|
||||
in a script are simply treated as numbers everywhere.
|
||||
See <a href="Expression-Section.html#Expression-Section">Expression Section</a>.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.6 Operators</h4>
|
||||
|
||||
<p><a name="index-operators-for-arithmetic-522"></a><a name="index-arithmetic-operators-523"></a><a name="index-precedence-in-expressions-524"></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,73 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.4 Orphan Sections</h4>
|
||||
|
||||
<p><a name="index-orphan-514"></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 __stop_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 ‘<samp><span class="samp">.</span></samp>’
|
||||
character.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.3 Output Section Address</h4>
|
||||
|
||||
<p><a name="index-address_002c-section-402"></a><a name="index-section-address-403"></a>The <var>address</var> is an expression for the VMA (the virtual memory
|
||||
address) of the output section. This address is optional, but if it
|
||||
is provided then the output address will be set exactly as specified.
|
||||
|
||||
<p>If the output address is not specified then one will be chosen for the
|
||||
section, based on the heuristic below. This address will be adjusted
|
||||
to fit the alignment requirement of the output section. The
|
||||
alignment requirement is the strictest alignment of any input section
|
||||
contained within the output section.
|
||||
|
||||
<p>The output section address heuristic is as follows:
|
||||
|
||||
<ul>
|
||||
<li>If an output memory <var>region</var> is set for the section then it
|
||||
is added to this region and its address will be the next free address
|
||||
in that region.
|
||||
|
||||
<li>If the MEMORY command has been used to create a list of memory
|
||||
regions then the first region which has attributes compatible with the
|
||||
section is selected to contain it. The section's output address will
|
||||
be the next free address in that region; <a href="MEMORY.html#MEMORY">MEMORY</a>.
|
||||
|
||||
<li>If no memory regions were specified, or none match the section then
|
||||
the output address will be based on the current value of the location
|
||||
counter.
|
||||
</ul>
|
||||
|
||||
<p class="noindent">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
|
||||
‘<samp><span class="samp">.text</span></samp>’ 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 any of the ‘<samp><span class="samp">.text</span></samp>’
|
||||
input sections.
|
||||
|
||||
<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, provided that the section is non-empty. (Empty
|
||||
sections are ignored).
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.8 Output Section Attributes</h4>
|
||||
|
||||
<p><a name="index-output-section-attributes-444"></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>constraint</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-Constraint.html#Output-Section-Constraint">Output Section Constraint</a>: Output section constraint
|
||||
<li><a accesskey="6" href="Output-Section-Region.html#Output-Section-Region">Output Section Region</a>: Output section region
|
||||
<li><a accesskey="7" href="Output-Section-Phdr.html#Output-Section-Phdr">Output Section Phdr</a>: Output section phdr
|
||||
<li><a accesskey="8" href="Output-Section-Fill.html#Output-Section-Fill">Output Section Fill</a>: Output section fill
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Output Section Constraint - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<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-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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Output-Section-Constraint"></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-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.5 Output Section Constraint</h5>
|
||||
|
||||
<p><a name="index-ONLY_005fIF_005fRO-460"></a><a name="index-ONLY_005fIF_005fRW-461"></a><a name="index-constraints-on-output-sections-462"></a>You can specify that an output section should only be created if all
|
||||
of its input sections are read-only or all of its input sections are
|
||||
read-write by using the keyword <code>ONLY_IF_RO</code> and
|
||||
<code>ONLY_IF_RW</code> respectively.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.5 Output Section Data</h4>
|
||||
|
||||
<p><a name="index-data-423"></a><a name="index-section-data-424"></a><a name="index-output-section-data-425"></a><a name="index-BYTE_0028_0040var_007bexpression_007d_0029-426"></a><a name="index-SHORT_0028_0040var_007bexpression_007d_0029-427"></a><a name="index-LONG_0028_0040var_007bexpression_007d_0029-428"></a><a name="index-QUAD_0028_0040var_007bexpression_007d_0029-429"></a><a name="index-SQUAD_0028_0040var_007bexpression_007d_0029-430"></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 ‘<samp><span class="samp">addr</span></samp>’:
|
||||
<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-431"></a><a name="index-holes_002c-filling-432"></a><a name="index-unspecified-memory-433"></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 ‘<samp><span class="samp">0x90</span></samp>’:
|
||||
<pre class="smallexample"> FILL(0x90909090)
|
||||
</pre>
|
||||
<p>The <code>FILL</code> command is similar to the ‘<samp><span class="samp">=</span><var>fillexp</var></samp>’ 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,77 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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>constraint</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,72 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.7 Output Section Discarding</h4>
|
||||
|
||||
<p><a name="index-discarding-sections-440"></a><a name="index-sections_002c-discarding-441"></a><a name="index-removing-sections-442"></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 ‘<samp><span class="samp">.foo</span></samp>’ section in the output file if there is a
|
||||
‘<samp><span class="samp">.foo</span></samp>’ 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-g_t_002fDISCARD_002f-443"></a>The special output section name ‘<samp><span class="samp">/DISCARD/</span></samp>’ may be used to discard
|
||||
input sections. Any input sections which are assigned to an output
|
||||
section named ‘<samp><span class="samp">/DISCARD/</span></samp>’ are not included in the output file.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.8 Output Section Fill</h5>
|
||||
|
||||
<p><a name="index-g_t_003d_0040var_007bfillexp_007d-469"></a><a name="index-section-fill-pattern-470"></a><a name="index-fill-pattern_002c-entire-section-471"></a>You can set the fill pattern for an entire section by using
|
||||
‘<samp><span class="samp">=</span><var>fillexp</var></samp>’. <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 ‘<samp><span class="samp">0x</span></samp>’ and without a trailing ‘<samp><span class="samp">k</span></samp>’ or ‘<samp><span class="samp">M</span></samp>’, 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,124 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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-434"></a>
|
||||
<a name="index-input-filename-symbols-435"></a>
|
||||
<a name="index-filename-symbols-436"></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-437"></a><a name="index-C_002b_002b-constructors_002c-arranging-in-link-438"></a><a name="index-constructors_002c-arranging-in-link-439"></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 ‘<samp><span class="samp">SORT_BY_NAME(CONSTRUCTORS)</span></samp>’ instead. When using the
|
||||
<code>.ctors</code> and <code>.dtors</code> sections, use ‘<samp><span class="samp">*(SORT_BY_NAME(.ctors))</span></samp>’ and
|
||||
‘<samp><span class="samp">*(SORT_BY_NAME(.dtors))</span></samp>’ instead of just ‘<samp><span class="samp">*(.ctors)</span></samp>’ and
|
||||
‘<samp><span class="samp">*(.dtors)</span></samp>’.
|
||||
|
||||
<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,124 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.2 Output Section LMA</h5>
|
||||
|
||||
<p><a name="index-AT_003e_0040var_007blma_005fregion_007d-448"></a><a name="index-AT_0028_0040var_007blma_007d_0029-449"></a><a name="index-load-address-450"></a><a name="index-section-load-address-451"></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 virtual address is specified by the
|
||||
see <a href="Output-Section-Address.html#Output-Section-Address">Output Section Address</a> described earlier. The load address is
|
||||
specified by the <code>AT</code> or <code>AT></code> keywords. Specifying a load
|
||||
address is optional.
|
||||
|
||||
<p>The <code>AT</code> keyword takes an expression as an argument. This
|
||||
specifies the exact load address of the section. The <code>AT></code> keyword
|
||||
takes the name of a memory region as an argument. See <a href="MEMORY.html#MEMORY">MEMORY</a>. The
|
||||
load address of the section is set to the next free address in the
|
||||
region, aligned to the section's alignment requirements.
|
||||
|
||||
<p>If neither <code>AT</code> nor <code>AT></code> is specified for an allocatable
|
||||
section, the linker will use the following heuristic to determine the
|
||||
load address:
|
||||
|
||||
<ul>
|
||||
<li>If the section has a specific VMA address, then this is used as
|
||||
the LMA address as well.
|
||||
|
||||
<li>If the section is not allocatable then its LMA is set to its VMA.
|
||||
|
||||
<li>Otherwise if a memory region can be found that is compatible
|
||||
with the current section, and this region contains at least one
|
||||
section, then the LMA is set so the difference between the
|
||||
VMA and LMA is the same as the difference between the VMA and LMA of
|
||||
the last section in the located region.
|
||||
|
||||
<li>If no memory regions have been declared then a default region
|
||||
that covers the entire address space is used in the previous step.
|
||||
|
||||
<li>If no suitable region could be found, or there was no previous
|
||||
section then the LMA is set equal to the VMA.
|
||||
</ul>
|
||||
|
||||
<p><a name="index-ROM-initialized-data-452"></a><a name="index-initialized-data-in-ROM-453"></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 ‘<samp><span class="samp">.text</span></samp>’, which starts at <code>0x1000</code>, one called
|
||||
‘<samp><span class="samp">.mdata</span></samp>’, which is loaded at the end of the ‘<samp><span class="samp">.text</span></samp>’ section
|
||||
even though its VMA is <code>0x2000</code>, and one called ‘<samp><span class="samp">.bss</span></samp>’ 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,65 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.2 Output Section Name</h4>
|
||||
|
||||
<p><a name="index-name_002c-section-400"></a><a name="index-section-name-401"></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 ‘<samp><span class="samp">.text</span></samp>’, ‘<samp><span class="samp">.data</span></samp>’ or ‘<samp><span class="samp">.bss</span></samp>’). 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 ‘<samp><span class="samp">/DISCARD/</span></samp>’ is special; <a href="Output-Section-Discarding.html#Output-Section-Discarding">Output Section Discarding</a>.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.7 Output Section Phdr</h5>
|
||||
|
||||
<p><a name="index-g_t_003a_0040var_007bphdr_007d-466"></a><a name="index-section_002c-assigning-to-program-header-467"></a><a name="index-program-headers-and-sections-468"></a>You can assign a section to a previously defined program segment by
|
||||
using ‘<samp><span class="samp">:</span><var>phdr</var></samp>’. 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,59 @@
|
|||
<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.11">
|
||||
<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-Constraint.html#Output-Section-Constraint" title="Output Section Constraint">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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="Output-Section-Constraint.html#Output-Section-Constraint">Output Section Constraint</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output-Section-Attributes">Output Section Attributes</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h5 class="subsubsection">3.6.8.6 Output Section Region</h5>
|
||||
|
||||
<p><a name="index-g_t_003e_0040var_007bregion_007d-463"></a><a name="index-section_002c-assigning-to-memory-region-464"></a><a name="index-memory-regions-and-sections-465"></a>You can assign a section to a previously defined region of memory by
|
||||
using ‘<samp><span class="samp">></span><var>region</var></samp>’. 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,72 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</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-445"></a><a name="index-prevent-unnecessary-loading-446"></a><a name="index-loading_002c-preventing-447"></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
|
||||
‘<samp><span class="samp">ROM</span></samp>’ section is addressed at memory location ‘<samp><span class="samp">0</span></samp>’ and does not
|
||||
need to be loaded when the program is run.
|
||||
<pre class="smallexample"> SECTIONS {
|
||||
ROM 0 (NOLOAD) : { ... }
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.6.9 Overlay Description</h4>
|
||||
|
||||
<p><a name="index-OVERLAY-472"></a><a name="index-overlays-473"></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 ‘<samp><span class="samp">.text0</span></samp>’ and ‘<samp><span class="samp">.text1</span></samp>’ to start at
|
||||
address 0x1000. ‘<samp><span class="samp">.text0</span></samp>’ will be loaded at address 0x4000, and
|
||||
‘<samp><span class="samp">.text1</span></samp>’ will be loaded immediately after ‘<samp><span class="samp">.text0</span></samp>’. 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,75 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">1 Overview</h2>
|
||||
|
||||
<p><a name="index-g_t_0040sc_007bgnu_007d-linker-1"></a><a name="index-what-is-this_003f-2"></a>
|
||||
|
||||
<!-- man begin DESCRIPTION -->
|
||||
<p><samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp>.
|
||||
|
||||
<p><samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> uses the general purpose BFD libraries
|
||||
to operate on object files. This allows <samp><span class="command">ld</span></samp> 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,
|
||||
<samp><span class="command">ld</span></samp> 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,177 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.8 PHDRS Command</h3>
|
||||
|
||||
<p><a name="index-PHDRS-486"></a><a name="index-program-headers-487"></a><a name="index-ELF-program-headers-488"></a><a name="index-program-segments-489"></a><a name="index-segments_002c-ELF-490"></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 ‘<samp><span class="samp">-p</span></samp>’ 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. The headers are processed in order and it
|
||||
is usual for them to map to sections in ascending load address order.
|
||||
|
||||
<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 ‘<samp><span class="samp">:</span><var>phdr</var></samp>’ 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 ‘<samp><span class="samp">:</span><var>phdr</var></samp>’, using it once for each segment which should
|
||||
contain the section.
|
||||
|
||||
<p>If you place a section in one or more segments using ‘<samp><span class="samp">:</span><var>phdr</var></samp>’,
|
||||
then the linker will place all subsequent allocatable sections which do
|
||||
not specify ‘<samp><span class="samp">:</span><var>phdr</var></samp>’ 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-491"></a><a name="index-PHDRS-492"></a>You may use the <code>FILEHDR</code> and <code>PHDRS</code> keywords 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. If applied to a loadable
|
||||
segment (<code>PT_LOAD</code>), all prior loadable segments must have one of
|
||||
these keywords.
|
||||
|
||||
<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,79 @@
|
|||
<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.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link rel="prev" href="HIDDEN.html#HIDDEN" title="HIDDEN">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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="HIDDEN.html#HIDDEN">HIDDEN</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Assignments.html#Assignments">Assignments</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.3 PROVIDE</h4>
|
||||
|
||||
<p><a name="index-PROVIDE-397"></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
|
||||
‘<samp><span class="samp">etext</span></samp>’. However, ANSI C requires that the user be able to use
|
||||
‘<samp><span class="samp">etext</span></samp>’ as a function name without encountering an error. The
|
||||
<code>PROVIDE</code> keyword may be used to define a symbol, such as
|
||||
‘<samp><span class="samp">etext</span></samp>’, 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 ‘<samp><span class="samp">etext</span></samp>’:
|
||||
<pre class="smallexample"> SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
_etext = .;
|
||||
PROVIDE(etext = .);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>In this example, if the program defines ‘<samp><span class="samp">_etext</span></samp>’ (with a leading
|
||||
underscore), the linker will give a multiple definition error. If, on
|
||||
the other hand, the program defines ‘<samp><span class="samp">etext</span></samp>’ (with no leading
|
||||
underscore), the linker will silently use the definition in the program.
|
||||
If the program references ‘<samp><span class="samp">etext</span></samp>’ but does not define it, the
|
||||
linker will use the definition in the linker script.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="PROVIDE_HIDDEN"></a>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.4 PROVIDE_HIDDEN</h4>
|
||||
|
||||
<p><a name="index-PROVIDE_005fHIDDEN-398"></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,103 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.9 <samp><span class="command">ld</span></samp> and PowerPC 32-bit ELF Support</h3>
|
||||
|
||||
<p><a name="index-PowerPC-long-branches-624"></a><a name="index-g_t_002d_002drelax-on-PowerPC-625"></a>Branches on PowerPC processors are limited to a signed 26-bit
|
||||
displacement, which may result in <samp><span class="command">ld</span></samp> giving
|
||||
‘<samp><span class="samp">relocation truncated to fit</span></samp>’ errors with very large programs.
|
||||
‘<samp><span class="samp">--relax</span></samp>’ 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. You may combine ‘<samp><span class="samp">-r</span></samp>’ and
|
||||
‘<samp><span class="samp">--relax</span></samp>’ to add trampolines in a partial link. In that case
|
||||
both branches to undefined symbols and inter-section branches are also
|
||||
considered potentially out of range, and trampolines inserted.
|
||||
|
||||
<p><a name="index-PowerPC-ELF32-options-626"></a>
|
||||
|
||||
<a name="index-PowerPC-PLT-627"></a>
|
||||
<a name="index-g_t_002d_002dbss_002dplt-628"></a>
|
||||
<dl><dt><samp><span class="option">--bss-plt</span></samp><dd>Current PowerPC GCC accepts a ‘<samp><span class="samp">-msecure-plt</span></samp>’ 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
|
||||
<samp><span class="command">ld</span></samp> will generate this layout, including stubs to access the
|
||||
PLT, if all input files (including startup and static libraries) were
|
||||
compiled with ‘<samp><span class="samp">-msecure-plt</span></samp>’. ‘<samp><span class="samp">--bss-plt</span></samp>’ forces the old
|
||||
BSS PLT (and GOT layout) which can give slightly better performance.
|
||||
|
||||
<p><a name="index-g_t_002d_002dsecure_002dplt-629"></a><br><dt><samp><span class="option">--secure-plt</span></samp><dd><samp><span class="command">ld</span></samp> will use the new PLT and GOT layout if it is linking new
|
||||
‘<samp><span class="samp">-fpic</span></samp>’ or ‘<samp><span class="samp">-fPIC</span></samp>’ 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-630"></a><a name="index-g_t_002d_002dsdata_002dgot-631"></a><br><dt><samp><span class="option">--sdata-got</span></samp><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
|
||||
‘<samp><span class="samp">-z relro -z now</span></samp>’. 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. ‘<samp><span class="samp">--sdata-got</span></samp>’ 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-632"></a><a name="index-g_t_002d_002demit_002dstub_002dsyms-633"></a><br><dt><samp><span class="option">--emit-stub-syms</span></samp><dd>This option causes <samp><span class="command">ld</span></samp> to label linker stubs with a local
|
||||
symbol that encodes the stub type and destination.
|
||||
|
||||
<p><a name="index-PowerPC-TLS-optimization-634"></a><a name="index-g_t_002d_002dno_002dtls_002doptimize-635"></a><br><dt><samp><span class="option">--no-tls-optimize</span></samp><dd>PowerPC <samp><span class="command">ld</span></samp> 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,157 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.10 <samp><span class="command">ld</span></samp> and PowerPC64 64-bit ELF Support</h3>
|
||||
|
||||
<p><a name="index-PowerPC64-ELF64-options-636"></a>
|
||||
|
||||
<a name="index-PowerPC64-stub-grouping-637"></a>
|
||||
<a name="index-g_t_002d_002dstub_002dgroup_002dsize-638"></a>
|
||||
<dl><dt><samp><span class="option">--stub-group-size</span></samp><dd>Long branch stubs, PLT call stubs and TOC adjusting stubs are placed
|
||||
by <samp><span class="command">ld</span></samp> in stub sections located between groups of input sections.
|
||||
‘<samp><span class="samp">--stub-group-size</span></samp>’ 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 ‘<samp><span class="samp">N</span></samp>’ chooses this scheme, ensuring that
|
||||
branches to stubs always use a negative offset. Two special values of
|
||||
‘<samp><span class="samp">N</span></samp>’ are recognized, ‘<samp><span class="samp">1</span></samp>’ and ‘<samp><span class="samp">-1</span></samp>’. These both instruct
|
||||
<samp><span class="command">ld</span></samp> 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 ‘<samp><span class="samp">N</span></samp>’ respectively.
|
||||
|
||||
<p>Note that ‘<samp><span class="samp">--stub-group-size</span></samp>’ 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-639"></a><a name="index-g_t_002d_002demit_002dstub_002dsyms-640"></a><br><dt><samp><span class="option">--emit-stub-syms</span></samp><dd>This option causes <samp><span class="command">ld</span></samp> to label linker stubs with a local
|
||||
symbol that encodes the stub type and destination.
|
||||
|
||||
<p><a name="index-PowerPC64-dot-symbols-641"></a><a name="index-g_t_002d_002ddotsyms-642"></a><a name="index-g_t_002d_002dno_002ddotsyms-643"></a><br><dt><samp><span class="option">--dotsyms, --no-dotsyms</span></samp><dd>These two options control how <samp><span class="command">ld</span></samp> 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 (‘<samp><span class="samp">.</span></samp>’). To
|
||||
properly version a function ‘<samp><span class="samp">foo</span></samp>’, the version script thus needs
|
||||
to control both ‘<samp><span class="samp">foo</span></samp>’ and ‘<samp><span class="samp">.foo</span></samp>’. The option
|
||||
‘<samp><span class="samp">--dotsyms</span></samp>’, on by default, automatically adds the required
|
||||
dot-prefixed patterns. Use ‘<samp><span class="samp">--no-dotsyms</span></samp>’ to disable this
|
||||
feature.
|
||||
|
||||
<p><a name="index-PowerPC64-TLS-optimization-644"></a><a name="index-g_t_002d_002dno_002dtls_002doptimize-645"></a><br><dt><samp><span class="option">--no-tls-optimize</span></samp><dd>PowerPC64 <samp><span class="command">ld</span></samp> 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-646"></a><a name="index-g_t_002d_002dno_002dopd_002doptimize-647"></a><br><dt><samp><span class="option">--no-opd-optimize</span></samp><dd>PowerPC64 <samp><span class="command">ld</span></samp> normally removes <code>.opd</code> section entries
|
||||
corresponding to deleted link-once functions, or functions removed by
|
||||
the action of ‘<samp><span class="samp">--gc-sections</span></samp>’ or linker script <code>/DISCARD/</code>.
|
||||
Use this option to disable <code>.opd</code> optimization.
|
||||
|
||||
<p><a name="index-PowerPC64-OPD-spacing-648"></a><a name="index-g_t_002d_002dnon_002doverlapping_002dopd-649"></a><br><dt><samp><span class="option">--non-overlapping-opd</span></samp><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-650"></a><a name="index-g_t_002d_002dno_002dtoc_002doptimize-651"></a><br><dt><samp><span class="option">--no-toc-optimize</span></samp><dd>PowerPC64 <samp><span class="command">ld</span></samp> 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-652"></a><a name="index-g_t_002d_002dno_002dmulti_002dtoc-653"></a><br><dt><samp><span class="option">--no-multi-toc</span></samp><dd>If given any toc option besides <code>-mcmodel=medium</code> or
|
||||
<code>-mcmodel=large</code>, 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 <samp><span class="command">ld</span></samp> 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. <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld -r</span></samp>.
|
||||
Use this option to turn off this feature.
|
||||
|
||||
<p><a name="index-PowerPC64-TOC-sorting-654"></a><a name="index-g_t_002d_002dno_002dtoc_002dsort-655"></a><br><dt><samp><span class="option">--no-toc-sort</span></samp><dd>By default, <samp><span class="command">ld</span></samp> sorts TOC sections so that those whose file
|
||||
happens to have a section called <code>.init</code> or <code>.fini</code> are
|
||||
placed first, followed by TOC sections referenced by code generated
|
||||
with PowerPC64 gcc's <code>-mcmodel=small</code>, and lastly TOC sections
|
||||
referenced only by code generated with PowerPC64 gcc's
|
||||
<code>-mcmodel=medium</code> or <code>-mcmodel=large</code> options. Doing this
|
||||
results in better TOC grouping for multi-TOC. Use this option to turn
|
||||
off this feature.
|
||||
|
||||
<p><a name="index-PowerPC64-PLT-stub-alignment-656"></a><a name="index-g_t_002d_002dplt_002dalign-657"></a><a name="index-g_t_002d_002dno_002dplt_002dalign-658"></a><br><dt><samp><span class="option">--plt-align</span></samp><dt><samp><span class="option">--no-plt-align</span></samp><dd>Use these options to control whether individual PLT call stubs are
|
||||
aligned to a 32-byte boundary, or to the specified power of two
|
||||
boundary when using <code>--plt-align=</code>. By default PLT call stubs
|
||||
are packed tightly.
|
||||
|
||||
<p><a name="index-PowerPC64-PLT-call-stub-static-chain-659"></a><a name="index-g_t_002d_002dplt_002dstatic_002dchain-660"></a><a name="index-g_t_002d_002dno_002dplt_002dstatic_002dchain-661"></a><br><dt><samp><span class="option">--plt-static-chain</span></samp><dt><samp><span class="option">--no-plt-static-chain</span></samp><dd>Use these options to control whether PLT call stubs load the static
|
||||
chain pointer (r11). <code>ld</code> defaults to not loading the static
|
||||
chain since there is never any need to do so on a PLT call.
|
||||
|
||||
<p><a name="index-PowerPC64-PLT-call-stub-thread-safety-662"></a><a name="index-g_t_002d_002dplt_002dthread_002dsafe-663"></a><a name="index-g_t_002d_002dno_002dplt_002dthread_002dsafe-664"></a><br><dt><samp><span class="option">--plt-thread-safe</span></samp><dt><samp><span class="option">--no-thread-safe</span></samp><dd>With power7's weakly ordered memory model, it is possible when using
|
||||
lazy binding for ld.so to update a plt entry in one thread and have
|
||||
another thread see the individual plt entry words update in the wrong
|
||||
order, despite ld.so carefully writing in the correct order and using
|
||||
memory write barriers. To avoid this we need some sort of read
|
||||
barrier in the call stub, or use LD_BIND_NOW=1. By default, <code>ld</code>
|
||||
looks for calls to commonly used functions that create threads, and if
|
||||
seen, adds the necessary barriers. Use these options to change the
|
||||
default behaviour.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>REGION_ALIAS - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<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 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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="REGION_ALIAS"></a>
|
||||
<a name="REGION_005fALIAS"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Miscellaneous-Commands.html#Miscellaneous-Commands">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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.4.4 Assign alias names to memory regions</h4>
|
||||
|
||||
<p><a name="index-REGION_005fALIAS_0028_0040var_007balias_007d_002c-_0040var_007bregion_007d_0029-374"></a><a name="index-region-alias-375"></a><a name="index-region-names-376"></a>
|
||||
Alias names can be added to existing memory regions created with the
|
||||
<a href="MEMORY.html#MEMORY">MEMORY</a> command. Each name corresponds to at most one memory region.
|
||||
|
||||
<pre class="smallexample"> REGION_ALIAS(<var>alias</var>, <var>region</var>)
|
||||
</pre>
|
||||
<p>The <code>REGION_ALIAS</code> function creates an alias name <var>alias</var> for the
|
||||
memory region <var>region</var>. This allows a flexible mapping of output sections
|
||||
to memory regions. An example follows.
|
||||
|
||||
<p>Suppose we have an application for embedded systems which come with various
|
||||
memory storage devices. All have a general purpose, volatile memory <code>RAM</code>
|
||||
that allows code execution or data storage. Some may have a read-only,
|
||||
non-volatile memory <code>ROM</code> that allows code execution and read-only data
|
||||
access. The last variant is a read-only, non-volatile memory <code>ROM2</code> with
|
||||
read-only data access and no code execution capability. We have four output
|
||||
sections:
|
||||
|
||||
<ul>
|
||||
<li><code>.text</code> program code;
|
||||
<li><code>.rodata</code> read-only data;
|
||||
<li><code>.data</code> read-write initialized data;
|
||||
<li><code>.bss</code> read-write zero initialized data.
|
||||
</ul>
|
||||
|
||||
<p>The goal is to provide a linker command file that contains a system independent
|
||||
part defining the output sections and a system dependent part mapping the
|
||||
output sections to the memory regions available on the system. Our embedded
|
||||
systems come with three different memory setups <code>A</code>, <code>B</code> and
|
||||
<code>C</code>:
|
||||
<p><table summary=""><tr align="left"><td valign="top" width="25%">Section </td><td valign="top" width="25%">Variant A </td><td valign="top" width="25%">Variant B </td><td valign="top" width="25%">Variant C
|
||||
<br></td></tr><tr align="left"><td valign="top" width="25%">.text </td><td valign="top" width="25%">RAM </td><td valign="top" width="25%">ROM </td><td valign="top" width="25%">ROM
|
||||
<br></td></tr><tr align="left"><td valign="top" width="25%">.rodata </td><td valign="top" width="25%">RAM </td><td valign="top" width="25%">ROM </td><td valign="top" width="25%">ROM2
|
||||
<br></td></tr><tr align="left"><td valign="top" width="25%">.data </td><td valign="top" width="25%">RAM </td><td valign="top" width="25%">RAM/ROM </td><td valign="top" width="25%">RAM/ROM2
|
||||
<br></td></tr><tr align="left"><td valign="top" width="25%">.bss </td><td valign="top" width="25%">RAM </td><td valign="top" width="25%">RAM </td><td valign="top" width="25%">RAM
|
||||
<br></td></tr></table>
|
||||
The notation <code>RAM/ROM</code> or <code>RAM/ROM2</code> means that this section is
|
||||
loaded into region <code>ROM</code> or <code>ROM2</code> respectively. Please note that
|
||||
the load address of the <code>.data</code> section starts in all three variants at
|
||||
the end of the <code>.rodata</code> section.
|
||||
|
||||
<p>The base linker script that deals with the output sections follows. It
|
||||
includes the system dependent <code>linkcmds.memory</code> file that describes the
|
||||
memory layout:
|
||||
<pre class="smallexample"> INCLUDE linkcmds.memory
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
} > REGION_TEXT
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
rodata_end = .;
|
||||
} > REGION_RODATA
|
||||
.data : AT (rodata_end)
|
||||
{
|
||||
data_start = .;
|
||||
*(.data)
|
||||
} > REGION_DATA
|
||||
data_size = SIZEOF(.data);
|
||||
data_load_start = LOADADDR(.data);
|
||||
.bss :
|
||||
{
|
||||
*(.bss)
|
||||
} > REGION_BSS
|
||||
}
|
||||
</pre>
|
||||
<p>Now we need three different <code>linkcmds.memory</code> files to define memory
|
||||
regions and alias names. The content of <code>linkcmds.memory</code> for the three
|
||||
variants <code>A</code>, <code>B</code> and <code>C</code>:
|
||||
<dl>
|
||||
<dt><code>A</code><dd>Here everything goes into the <code>RAM</code>.
|
||||
<pre class="smallexample"> MEMORY
|
||||
{
|
||||
RAM : ORIGIN = 0, LENGTH = 4M
|
||||
}
|
||||
|
||||
REGION_ALIAS("REGION_TEXT", RAM);
|
||||
REGION_ALIAS("REGION_RODATA", RAM);
|
||||
REGION_ALIAS("REGION_DATA", RAM);
|
||||
REGION_ALIAS("REGION_BSS", RAM);
|
||||
</pre>
|
||||
<br><dt><code>B</code><dd>Program code and read-only data go into the <code>ROM</code>. Read-write data goes
|
||||
into the <code>RAM</code>. An image of the initialized data is loaded into the
|
||||
<code>ROM</code> and will be copied during system start into the <code>RAM</code>.
|
||||
<pre class="smallexample"> MEMORY
|
||||
{
|
||||
ROM : ORIGIN = 0, LENGTH = 3M
|
||||
RAM : ORIGIN = 0x10000000, LENGTH = 1M
|
||||
}
|
||||
|
||||
REGION_ALIAS("REGION_TEXT", ROM);
|
||||
REGION_ALIAS("REGION_RODATA", ROM);
|
||||
REGION_ALIAS("REGION_DATA", RAM);
|
||||
REGION_ALIAS("REGION_BSS", RAM);
|
||||
</pre>
|
||||
<br><dt><code>C</code><dd>Program code goes into the <code>ROM</code>. Read-only data goes into the
|
||||
<code>ROM2</code>. Read-write data goes into the <code>RAM</code>. An image of the
|
||||
initialized data is loaded into the <code>ROM2</code> and will be copied during
|
||||
system start into the <code>RAM</code>.
|
||||
<pre class="smallexample"> MEMORY
|
||||
{
|
||||
ROM : ORIGIN = 0, LENGTH = 2M
|
||||
ROM2 : ORIGIN = 0x10000000, LENGTH = 1M
|
||||
RAM : ORIGIN = 0x20000000, LENGTH = 1M
|
||||
}
|
||||
|
||||
REGION_ALIAS("REGION_TEXT", ROM);
|
||||
REGION_ALIAS("REGION_RODATA", ROM2);
|
||||
REGION_ALIAS("REGION_DATA", RAM);
|
||||
REGION_ALIAS("REGION_BSS", RAM);
|
||||
</pre>
|
||||
</dl>
|
||||
|
||||
<p>It is possible to write a common system initialization routine to copy the
|
||||
<code>.data</code> section from <code>ROM</code> or <code>ROM2</code> into the <code>RAM</code> if
|
||||
necessary:
|
||||
<pre class="smallexample"> #include <string.h>
|
||||
|
||||
extern char data_start [];
|
||||
extern char data_size [];
|
||||
extern char data_load_start [];
|
||||
|
||||
void copy_data(void)
|
||||
{
|
||||
if (data_start != data_load_start)
|
||||
{
|
||||
memcpy(data_start, data_load_start, (size_t) data_size);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">6 Reporting Bugs</h2>
|
||||
|
||||
<p><a name="index-bugs-in-_0040command_007bld_007d-706"></a><a name="index-reporting-bugs-in-_0040command_007bld_007d-707"></a>
|
||||
Your bug reports play an essential role in making <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp>
|
||||
work better. Bug reports are your contribution to the maintenance of
|
||||
<samp><span class="command">ld</span></samp>.
|
||||
|
||||
<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,100 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.6 SECTIONS Command</h3>
|
||||
|
||||
<p><a name="index-SECTIONS-399"></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,100 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.11 <samp><span class="command">ld</span></samp> and SPU ELF Support</h3>
|
||||
|
||||
<p><a name="index-SPU-ELF-options-665"></a>
|
||||
|
||||
<a name="index-SPU-plugins-666"></a>
|
||||
<a name="index-g_t_002d_002dplugin-667"></a>
|
||||
<dl><dt><samp><span class="option">--plugin</span></samp><dd>This option marks an executable as a PIC plugin module.
|
||||
|
||||
<p><a name="index-SPU-overlays-668"></a><a name="index-g_t_002d_002dno_002doverlays-669"></a><br><dt><samp><span class="option">--no-overlays</span></samp><dd>Normally, <samp><span class="command">ld</span></samp> recognizes calls to functions within overlay
|
||||
regions, and redirects such calls to an overlay manager via a stub.
|
||||
<samp><span class="command">ld</span></samp> also provides a built-in overlay manager. This option
|
||||
turns off all this special overlay handling.
|
||||
|
||||
<p><a name="index-SPU-overlay-stub-symbols-670"></a><a name="index-g_t_002d_002demit_002dstub_002dsyms-671"></a><br><dt><samp><span class="option">--emit-stub-syms</span></samp><dd>This option causes <samp><span class="command">ld</span></samp> to label overlay stubs with a local
|
||||
symbol that encodes the stub type and destination.
|
||||
|
||||
<p><a name="index-SPU-extra-overlay-stubs-672"></a><a name="index-g_t_002d_002dextra_002doverlay_002dstubs-673"></a><br><dt><samp><span class="option">--extra-overlay-stubs</span></samp><dd>This option causes <samp><span class="command">ld</span></samp> 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-674"></a><a name="index-g_t_002d_002dlocal_002dstore_003dlo_003ahi-675"></a><br><dt><samp><span class="option">--local-store=lo:hi</span></samp><dd><samp><span class="command">ld</span></samp> 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 <samp><span class="option">--local-store=0:0</span></samp>.
|
||||
|
||||
<p><a name="index-SPU-676"></a><a name="index-g_t_002d_002dstack_002danalysis-677"></a><br><dt><samp><span class="option">--stack-analysis</span></samp><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,
|
||||
<samp><span class="command">ld</span></samp> will provide an estimate of maximum stack usage.
|
||||
<samp><span class="command">ld</span></samp> 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-678"></a><a name="index-g_t_002d_002demit_002dstack_002dsyms-679"></a><br><dt><samp><span class="option">--emit-stack-syms</span></samp><dd>This option, if given along with <samp><span class="option">--stack-analysis</span></samp> will result
|
||||
in <samp><span class="command">ld</span></samp> 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,69 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.2 Linker Script Format</h3>
|
||||
|
||||
<p><a name="index-linker-script-format-344"></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
|
||||
‘<samp><span class="samp">/*</span></samp>’ and ‘<samp><span class="samp">*/</span></samp>’. As in C, comments are syntactically equivalent
|
||||
to whitespace.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h2 class="chapter">3 Linker Scripts</h2>
|
||||
|
||||
<p><a name="index-scripts-340"></a><a name="index-linker-scripts-341"></a><a name="index-command-files-342"></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 ‘<samp><span class="samp">--verbose</span></samp>’ command line option
|
||||
to display the default linker script. Certain command line options,
|
||||
such as ‘<samp><span class="samp">-r</span></samp>’ or ‘<samp><span class="samp">-N</span></samp>’, will affect the default linker script.
|
||||
|
||||
<p>You may supply your own linker script by using the ‘<samp><span class="samp">-T</span></samp>’ 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,94 @@
|
|||
<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.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Assignments.html#Assignments" title="Assignments">
|
||||
<link rel="next" href="HIDDEN.html#HIDDEN" title="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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Simple-Assignments"></a>
|
||||
Next: <a rel="next" accesskey="n" href="HIDDEN.html#HIDDEN">HIDDEN</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Assignments.html#Assignments">Assignments</a>
|
||||
<hr>
|
||||
</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 ‘<samp><span class="samp">.</span></samp>’ 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 ‘<samp><span class="samp">floating_point</span></samp>’ will be defined as
|
||||
zero. The symbol ‘<samp><span class="samp">_etext</span></samp>’ will be defined as the address following
|
||||
the last ‘<samp><span class="samp">.text</span></samp>’ input section. The symbol ‘<samp><span class="samp">_bdata</span></samp>’ will be
|
||||
defined as the address following the ‘<samp><span class="samp">.text</span></samp>’ output section aligned
|
||||
upward to a 4 byte boundary.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.4 Simple Linker Script Commands</h3>
|
||||
|
||||
<p><a name="index-linker-script-simple-commands-347"></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="REGION_005fALIAS.html#REGION_005fALIAS">REGION_ALIAS</a>: Assign alias names to memory regions
|
||||
<li><a accesskey="5" href="Miscellaneous-Commands.html#Miscellaneous-Commands">Miscellaneous Commands</a>: Other linker script commands
|
||||
</ul>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.3 Simple Linker Script Example</h3>
|
||||
|
||||
<p><a name="index-linker-script-example-345"></a><a name="index-example-of-linker-script-346"></a>Many linker scripts are fairly simple.
|
||||
|
||||
<p>The simplest possible linker script has just one command:
|
||||
‘<samp><span class="samp">SECTIONS</span></samp>’. You use the ‘<samp><span class="samp">SECTIONS</span></samp>’ command to describe the
|
||||
memory layout of the output file.
|
||||
|
||||
<p>The ‘<samp><span class="samp">SECTIONS</span></samp>’ 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
|
||||
‘<samp><span class="samp">.text</span></samp>’, ‘<samp><span class="samp">.data</span></samp>’, and ‘<samp><span class="samp">.bss</span></samp>’ 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 ‘<samp><span class="samp">SECTIONS</span></samp>’ command as the keyword ‘<samp><span class="samp">SECTIONS</span></samp>’,
|
||||
followed by a series of symbol assignments and output section
|
||||
descriptions enclosed in curly braces.
|
||||
|
||||
<p>The first line inside the ‘<samp><span class="samp">SECTIONS</span></samp>’ command of the above example
|
||||
sets the value of the special symbol ‘<samp><span class="samp">.</span></samp>’, 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
|
||||
‘<samp><span class="samp">SECTIONS</span></samp>’ command, the location counter has the value ‘<samp><span class="samp">0</span></samp>’.
|
||||
|
||||
<p>The second line defines an output section, ‘<samp><span class="samp">.text</span></samp>’. 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 ‘<samp><span class="samp">*</span></samp>’ is a
|
||||
wildcard which matches any file name. The expression ‘<samp><span class="samp">*(.text)</span></samp>’
|
||||
means all ‘<samp><span class="samp">.text</span></samp>’ input sections in all input files.
|
||||
|
||||
<p>Since the location counter is ‘<samp><span class="samp">0x10000</span></samp>’ when the output section
|
||||
‘<samp><span class="samp">.text</span></samp>’ is defined, the linker will set the address of the
|
||||
‘<samp><span class="samp">.text</span></samp>’ section in the output file to be ‘<samp><span class="samp">0x10000</span></samp>’.
|
||||
|
||||
<p>The remaining lines define the ‘<samp><span class="samp">.data</span></samp>’ and ‘<samp><span class="samp">.bss</span></samp>’ sections in
|
||||
the output file. The linker will place the ‘<samp><span class="samp">.data</span></samp>’ output section
|
||||
at address ‘<samp><span class="samp">0x8000000</span></samp>’. After the linker places the ‘<samp><span class="samp">.data</span></samp>’
|
||||
output section, the value of the location counter will be
|
||||
‘<samp><span class="samp">0x8000000</span></samp>’ plus the size of the ‘<samp><span class="samp">.data</span></samp>’ output section. The
|
||||
effect is that the linker will place the ‘<samp><span class="samp">.bss</span></samp>’ output section
|
||||
immediately after the ‘<samp><span class="samp">.data</span></samp>’ 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 ‘<samp><span class="samp">.text</span></samp>’ and ‘<samp><span class="samp">.data</span></samp>’
|
||||
sections will probably satisfy any alignment constraints, but the linker
|
||||
may have to create a small gap between the ‘<samp><span class="samp">.data</span></samp>’ and ‘<samp><span class="samp">.bss</span></samp>’
|
||||
sections.
|
||||
|
||||
<p>That's it! That's a simple and complete linker script.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.5.5 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 ‘<samp><span class="samp">name
|
||||
mangling</span></samp>’. 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 ‘<samp><span class="samp">foo</span></samp>’ in the symbol table. This entry
|
||||
holds the address of an ‘<samp><span class="samp">int</span></samp>’ 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 ‘<samp><span class="samp">foo</span></samp>’ 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 ‘<samp><span class="samp">foo</span></samp>’ in the symbol table, gets it address
|
||||
and then copies this address into the block of memory associated with
|
||||
the variable ‘<samp><span class="samp">a</span></samp>’.
|
||||
|
||||
<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 ‘<samp><span class="samp">foo</span></samp>’ 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 ‘<samp><span class="samp">&</span></samp>’ operators. These are correct.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Symbolic Constants - Untitled</title>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta name="description" content="Untitled">
|
||||
<meta name="generator" content="makeinfo 4.11">
|
||||
<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="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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="node">
|
||||
<p>
|
||||
<a name="Symbolic-Constants"></a>
|
||||
Next: <a rel="next" accesskey="n" href="Symbols.html#Symbols">Symbols</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>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.2 Symbolic Constants</h4>
|
||||
|
||||
<p><a name="index-symbolic-constants-506"></a><a name="index-CONSTANT-507"></a>It is possible to refer to target specific constants via the use of
|
||||
the <code>CONSTANT(</code><var>name</var><code>)</code> operator, where <var>name</var> is one of:
|
||||
|
||||
<dl>
|
||||
<dt><code>MAXPAGESIZE</code><dd><a name="index-MAXPAGESIZE-508"></a>The target's maximum page size.
|
||||
|
||||
<br><dt><code>COMMONPAGESIZE</code><dd><a name="index-COMMONPAGESIZE-509"></a>The target's default page size.
|
||||
</dl>
|
||||
|
||||
<p>So for example:
|
||||
|
||||
<pre class="smallexample"> .text ALIGN (CONSTANT (MAXPAGESIZE)) : { *(.text) }
|
||||
</pre>
|
||||
<p>will create a text section aligned to the largest page boundary
|
||||
supported by the target.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<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.11">
|
||||
<link title="Top" rel="start" href="index.html#Top">
|
||||
<link rel="up" href="Expressions.html#Expressions" title="Expressions">
|
||||
<link rel="prev" href="Symbolic-Constants.html#Symbolic-Constants" title="Symbolic 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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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="Symbolic-Constants.html#Symbolic-Constants">Symbolic Constants</a>,
|
||||
Up: <a rel="up" accesskey="u" href="Expressions.html#Expressions">Expressions</a>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<h4 class="subsection">3.10.3 Symbol Names</h4>
|
||||
|
||||
<p><a name="index-symbol-names-510"></a><a name="index-names-511"></a><a name="index-quoted-symbol-names-512"></a><a name="index-g_t_0022-513"></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, ‘<samp><span class="samp">A-B</span></samp>’ is one symbol,
|
||||
whereas ‘<samp><span class="samp">A - B</span></samp>’ is an expression involving subtraction.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.12 <samp><span class="command">ld</span></samp>'s Support for Various TI COFF Versions</h3>
|
||||
|
||||
<p><a name="index-TI-COFF-versions-680"></a><a name="index-g_t_002d_002dformat_003d_0040var_007bversion_007d-681"></a>The ‘<samp><span class="samp">--format</span></samp>’ 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; <samp><span class="command">ld</span></samp> 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,223 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">3.9 VERSION Command</h3>
|
||||
|
||||
<p><a name="index-VERSION-_0040_007bscript-text_0040_007d-493"></a><a name="index-symbol-versions-494"></a><a name="index-version-script-495"></a><a name="index-versions-of-symbols-496"></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 ‘<samp><span class="samp">--version-script</span></samp>’ 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::*;
|
||||
"f(int, double)";
|
||||
};
|
||||
} VERS_1.2;
|
||||
</pre>
|
||||
<p>This example version script defines three version nodes. The first
|
||||
version node defined is ‘<samp><span class="samp">VERS_1.1</span></samp>’; it has no other dependencies.
|
||||
The script binds the symbol ‘<samp><span class="samp">foo1</span></samp>’ to ‘<samp><span class="samp">VERS_1.1</span></samp>’. 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 ‘<samp><span class="samp">old</span></samp>’, ‘<samp><span class="samp">original</span></samp>’, or ‘<samp><span class="samp">new</span></samp>’
|
||||
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 ‘<samp><span class="samp">VERS_1.2</span></samp>’. This node
|
||||
depends upon ‘<samp><span class="samp">VERS_1.1</span></samp>’. The script binds the symbol ‘<samp><span class="samp">foo2</span></samp>’
|
||||
to the version node ‘<samp><span class="samp">VERS_1.2</span></samp>’.
|
||||
|
||||
<p>Finally, the version script defines node ‘<samp><span class="samp">VERS_2.0</span></samp>’. This node
|
||||
depends upon ‘<samp><span class="samp">VERS_1.2</span></samp>’. The scripts binds the symbols ‘<samp><span class="samp">bar1</span></samp>’
|
||||
and ‘<samp><span class="samp">bar2</span></samp>’ are bound to the version node ‘<samp><span class="samp">VERS_2.0</span></samp>’.
|
||||
|
||||
<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 ‘<samp><span class="samp">global: *;</span></samp>’
|
||||
somewhere in the version script. Note that it's slightly crazy to use
|
||||
wildcards in a global spec except on the last version node. Global
|
||||
wildcards elsewhere run the risk of accidentally adding symbols to the
|
||||
set exported for an old version. That's wrong since older versions
|
||||
ought to have a fixed set of symbols.
|
||||
|
||||
<p>The names of the version nodes have no specific meaning other than what
|
||||
they might suggest to the person reading them. The ‘<samp><span class="samp">2.0</span></samp>’ version
|
||||
could just as well have appeared in between ‘<samp><span class="samp">1.1</span></samp>’ and ‘<samp><span class="samp">1.2</span></samp>’.
|
||||
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 ‘<samp><span class="samp">original_foo</span></samp>’ to
|
||||
be an alias for ‘<samp><span class="samp">foo</span></samp>’ bound to the version node ‘<samp><span class="samp">VERS_1.1</span></samp>’.
|
||||
The ‘<samp><span class="samp">local:</span></samp>’ directive can be used to prevent the symbol
|
||||
‘<samp><span class="samp">original_foo</span></samp>’ from being exported. A ‘<samp><span class="samp">.symver</span></samp>’ 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 ‘<samp><span class="samp">.symver</span></samp>’ 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, ‘<samp><span class="samp">foo@</span></samp>’ represents the symbol ‘<samp><span class="samp">foo</span></samp>’ bound to the
|
||||
unspecified base version of the symbol. The source file that contains this
|
||||
example would define 4 C functions: ‘<samp><span class="samp">original_foo</span></samp>’, ‘<samp><span class="samp">old_foo</span></samp>’,
|
||||
‘<samp><span class="samp">old_foo1</span></samp>’, and ‘<samp><span class="samp">new_foo</span></samp>’.
|
||||
|
||||
<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
|
||||
‘<samp><span class="samp">foo@@VERS_2.0</span></samp>’ type of ‘<samp><span class="samp">.symver</span></samp>’ 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., ‘<samp><span class="samp">old_foo</span></samp>’), or you can use the ‘<samp><span class="samp">.symver</span></samp>’ 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 ‘<samp><span class="samp">lang</span></samp>’s are ‘<samp><span class="samp">C</span></samp>’, ‘<samp><span class="samp">C++</span></samp>’, and ‘<samp><span class="samp">Java</span></samp>’.
|
||||
The linker will iterate over the list of symbols at the link time and
|
||||
demangle them according to ‘<samp><span class="samp">lang</span></samp>’ before matching them to the
|
||||
patterns specified in ‘<samp><span class="samp">version-script-commands</span></samp>’. The default
|
||||
‘<samp><span class="samp">lang</span></samp>’ is ‘<samp><span class="samp">C</span></samp>’.
|
||||
|
||||
<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,459 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.13 <samp><span class="command">ld</span></samp> and WIN32 (cygwin/mingw)</h3>
|
||||
|
||||
<p>This section describes some of the win32 specific <samp><span class="command">ld</span></samp> 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-682"></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 <samp><span class="command">ld</span></samp> have specific
|
||||
support for creating such libraries provided with the
|
||||
‘<samp><span class="samp">--out-implib</span></samp>’ command line option.
|
||||
|
||||
<br><dt><em>exporting DLL symbols</em><dd><a name="index-exporting-DLL-symbols-683"></a>The cygwin/mingw <samp><span class="command">ld</span></samp> 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-684"></a>By default <samp><span class="command">ld</span></samp> 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
|
||||
<li>–exclude-modules-for-implib
|
||||
<li>–version-script
|
||||
</ul>
|
||||
|
||||
<p>When auto-export is in operation, <samp><span class="command">ld</span></samp> will export all the non-local
|
||||
(global and common) symbols it finds in a DLL, with the exception of a few
|
||||
symbols known to belong to the system's runtime and libraries. As it will
|
||||
often not be desirable to export all of a DLL's symbols, which may include
|
||||
private functions that are not part of any public interface, the command-line
|
||||
options listed above may be used to filter symbols out from the list for
|
||||
exporting. The ‘<samp><span class="samp">--output-def</span></samp>’ option can be used in order to see the
|
||||
final list of exported symbols with all exclusions taken into effect.
|
||||
|
||||
<p>If ‘<samp><span class="samp">--export-all-symbols</span></samp>’ 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-685"></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 ‘<samp><span class="samp"><dll
|
||||
name>.def</span></samp>’ and is added as any other object file to the linker's
|
||||
command line. The file's name must end in ‘<samp><span class="samp">.def</span></samp>’ or ‘<samp><span class="samp">.DEF</span></samp>’.
|
||||
|
||||
<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
|
||||
‘<samp><span class="samp">--export-all-symbols</span></samp>’ option is also used.
|
||||
|
||||
<p>Here is an example of a DEF file for a shared library called ‘<samp><span class="samp">xyz.dll</span></samp>’:
|
||||
|
||||
<pre class="example"> LIBRARY "xyz.dll" BASE=0x20000000
|
||||
|
||||
EXPORTS
|
||||
foo
|
||||
bar
|
||||
_bar = bar
|
||||
another_foo = abc.dll.afoo
|
||||
var1 DATA
|
||||
doo = foo == foo2
|
||||
eoo DATA == var1
|
||||
</pre>
|
||||
<p>This example defines a DLL with a non-default base address and seven
|
||||
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 ‘<samp><span class="samp">abc.dll</span></samp>’. The final symbol
|
||||
<code>var1</code> is declared to be a data object. The ‘<samp><span class="samp">doo</span></samp>’ symbol in
|
||||
export library is an alias of ‘<samp><span class="samp">foo</span></samp>’, which gets the string name
|
||||
in export table ‘<samp><span class="samp">foo2</span></samp>’. The ‘<samp><span class="samp">eoo</span></samp>’ symbol is an data export
|
||||
symbol, which gets in export table the name ‘<samp><span class="samp">var1</span></samp>’.
|
||||
|
||||
<p>The optional <code>LIBRARY <name></code> command indicates the <em>internal</em>
|
||||
name of the output DLL. If ‘<samp><span class="samp"><name></span></samp>’ does not include a suffix,
|
||||
the default library suffix, ‘<samp><span class="samp">.DLL</span></samp>’ 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 ‘<samp><span class="samp"><name></span></samp>’ does not include a suffix, the default
|
||||
executable suffix, ‘<samp><span class="samp">.EXE</span></samp>’ 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] [== <name3>] ) *
|
||||
</pre>
|
||||
<p>Declares ‘<samp><span class="samp"><name1></span></samp>’ as an exported symbol from the DLL, or declares
|
||||
‘<samp><span class="samp"><name1></span></samp>’ as an exported alias for ‘<samp><span class="samp"><name2></span></samp>’; or declares
|
||||
‘<samp><span class="samp"><name1></span></samp>’ as a "forward" alias for the symbol
|
||||
‘<samp><span class="samp"><external-name></span></samp>’ in the DLL ‘<samp><span class="samp"><module-name></span></samp>’.
|
||||
Optionally, the symbol may be exported by the specified ordinal
|
||||
‘<samp><span class="samp"><integer></span></samp>’ alias. The optional ‘<samp><span class="samp"><name3></span></samp>’ is the to be used
|
||||
string in import/export table for the symbol.
|
||||
|
||||
<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-686"></a>While linking a shared dll, <samp><span class="command">ld</span></samp> is able to create a DEF file
|
||||
with the ‘<samp><span class="samp">--output-def <file></span></samp>’ command line option.
|
||||
|
||||
<br><dt><em>Using decorations</em><dd><a name="index-Using-decorations-687"></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 ‘<samp><span class="samp">--export-all-symbols</span></samp>’ 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
|
||||
‘<samp><span class="samp">--enable-auto-import</span></samp>’ and ‘<samp><span class="samp">automatic data imports</span></samp>’ for more
|
||||
information.
|
||||
</dl>
|
||||
|
||||
<p><a name="index-automatic-data-imports-688"></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 ‘<samp><span class="samp">--enable-auto-import</span></samp>’
|
||||
command-line option, although it is enabled by default on cygwin/mingw.
|
||||
The ‘<samp><span class="samp">--enable-auto-import</span></samp>’ 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 ‘<samp><span class="samp">--enable-auto-import</span></samp>’ 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-689"></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 ‘<samp><span class="samp">--enable-runtime-pseudo-relocs</span></samp>’ 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>‘<samp><span class="samp">--enable-runtime-pseudo-relocs</span></samp>’ is not the default; it must be explicitly
|
||||
enabled as needed.
|
||||
|
||||
<p><a name="index-direct-linking-to-a-dll-690"></a><br><dt><em>direct linking to a dll</em><dd>The cygwin/mingw ports of <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> 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
|
||||
‘<samp><span class="samp">-L</span></samp>’ and ‘<samp><span class="samp">-l</span></samp>’, because <samp><span class="command">ld</span></samp> 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 ‘<samp><span class="samp">-lxxx</span></samp>’ 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 ‘<samp><span class="samp">cygxxx.dll</span></samp>’ but in fact is ‘<samp><span class="samp"><prefix>xxx.dll</span></samp>’,
|
||||
where ‘<samp><span class="samp"><prefix></span></samp>’ is set by the <samp><span class="command">ld</span></samp> option
|
||||
‘<samp><span class="samp">--dll-search-prefix=<prefix></span></samp>’. In the case of cygwin, the standard gcc spec
|
||||
file includes ‘<samp><span class="samp">--dll-search-prefix=cyg</span></samp>’, so in effect we actually search for
|
||||
‘<samp><span class="samp">cygxxx.dll</span></samp>’.
|
||||
|
||||
<p>Other win32-based unix environments, such as mingw or pw32, may use other
|
||||
‘<samp><span class="samp"><prefix></span></samp>’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 ‘<samp><span class="samp">bin</span></samp>’ directory for
|
||||
applications and dll's and a ‘<samp><span class="samp">lib</span></samp>’ 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 ‘<samp><span class="samp">bin</span></samp>’ 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
|
||||
(‘<samp><span class="samp">cygncurses-5.dll</span></samp>’) this will often fail, unless one specifies
|
||||
‘<samp><span class="samp">-L../bin -lncurses-5</span></samp>’ 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 ‘<samp><span class="samp">lib</span></samp>’
|
||||
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
|
||||
‘<samp><span class="samp">--enable-runtime-pseudo-relocs</span></samp>’ 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 ‘<samp><span class="samp">foo</span></samp>’ will be exported as ‘<samp><span class="samp">foo</span></samp>’, but it can also be
|
||||
exported as ‘<samp><span class="samp">_foo</span></samp>’ 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 ‘<samp><span class="samp">_foo = foo</span></samp>’ maps the symbol ‘<samp><span class="samp">foo</span></samp>’ to ‘<samp><span class="samp">_foo</span></samp>’.
|
||||
|
||||
<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 ‘<samp><span class="samp">_foo</span></samp>’ can be exported as
|
||||
‘<samp><span class="samp">foo</span></samp>’ but not as ‘<samp><span class="samp">_foo</span></samp>’ 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 ‘<samp><span class="samp">_foo = foo</span></samp>’ maps the exported symbol ‘<samp><span class="samp">foo</span></samp>’ to
|
||||
‘<samp><span class="samp">_foo</span></samp>’.
|
||||
</dl>
|
||||
|
||||
<p>Note: using a DEF file disables the default auto-export behavior,
|
||||
unless the ‘<samp><span class="samp">--export-all-symbols</span></samp>’ 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
|
||||
‘<samp><span class="samp">--export-all-symbols</span></samp>’ option. If you list only the
|
||||
renamed symbols in the DEF file, and use ‘<samp><span class="samp">--export-all-symbols</span></samp>’
|
||||
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-691"></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.
|
||||
|
||||
<p><a name="index-aligned-common-symbols-692"></a><br><dt><em>aligned common symbols</em><dd>As a GNU extension to the PE file format, it is possible to specify the
|
||||
desired alignment for a common symbol. This information is conveyed from
|
||||
the assembler or compiler to the linker by means of GNU-specific commands
|
||||
carried in the object file's ‘<samp><span class="samp">.drectve</span></samp>’ section, which are recognized
|
||||
by <samp><span class="command">ld</span></samp> and respected when laying out the common symbols. Native
|
||||
tools will be able to process object files employing this GNU extension,
|
||||
but will fail to respect the alignment instructions, and may issue noisy
|
||||
warnings about unknown linker directives.
|
||||
</dl>
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.14 <code>ld</code> and Xtensa Processors</h3>
|
||||
|
||||
<p><a name="index-Xtensa-processors-693"></a>The default <samp><span class="command">ld</span></samp> 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"><samp><span class="command">ld</span></samp> 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-g_t_0040option_007b_002d_002drelax_007d-on-Xtensa-694"></a><a name="index-relaxing-on-Xtensa-695"></a>Relaxation is enabled by default for the Xtensa version of <samp><span class="command">ld</span></samp> 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 <samp><span class="option">--size-opt</span></samp> 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-696"></a>
|
||||
<dl>
|
||||
<dt><samp><span class="option">--size-opt</span></samp><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,94 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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>
|
||||
</div>
|
||||
|
||||
<h3 class="section">4.2 <samp><span class="command">ld</span></samp> and the Intel 960 Family</h3>
|
||||
|
||||
<p><a name="index-i960-support-572"></a>
|
||||
You can use the ‘<samp><span class="samp">-A</span><var>architecture</var></samp>’ 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 <samp><span class="command">ld</span></samp> command line included ‘<samp><span class="samp">-ACA</span></samp>’<!-- /@w --> as
|
||||
well as ‘<samp><span class="samp">-ltry</span></samp>’<!-- /@w -->, the linker would look (in its built-in search
|
||||
paths, and in any paths you specify with ‘<samp><span class="samp">-L</span></samp>’) 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 ‘<samp><span class="samp">-ACA</span></samp>’<!-- /@w -->.
|
||||
|
||||
<p>You can meaningfully use ‘<samp><span class="samp">-A</span></samp>’ 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 ‘<samp><span class="samp">-l</span></samp>’<!-- /@w -->
|
||||
specifies a library.
|
||||
|
||||
<p><a name="index-g_t_0040option_007b_002d_002drelax_007d-on-i960-573"></a><a name="index-relaxing-on-i960-574"></a><samp><span class="command">ld</span></samp> supports the ‘<samp><span class="samp">--relax</span></samp>’ option for the i960 family. If
|
||||
you specify ‘<samp><span class="samp">--relax</span></samp>’, <samp><span class="command">ld</span></samp> 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. <samp><span class="command">ld</span></samp> 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).
|
||||
|
||||
<p><a name="index-Cortex_002dA8-erratum-workaround-575"></a><a name="index-g_t_002d_002dfix_002dcortex_002da8-576"></a><a name="index-g_t_002d_002dno_002dfix_002dcortex_002da8-577"></a>The ‘<samp><span class="samp">--fix-cortex-a8</span></samp>’ switch enables a link-time workaround for an erratum in certain Cortex-A8 processors. The workaround is enabled by default if you are targeting the ARM v7-A architecture profile. It can be enabled otherwise by specifying ‘<samp><span class="samp">--fix-cortex-a8</span></samp>’, or disabled unconditionally by specifying ‘<samp><span class="samp">--no-fix-cortex-a8</span></samp>’.
|
||||
|
||||
<p>The erratum only affects Thumb-2 code. Please contact ARM for further details.
|
||||
|
||||
<p><a name="index-g_t_002d_002dmerge_002dexidx_002dentries-578"></a><a name="index-g_t_002d_002dno_002dmerge_002dexidx_002dentries-579"></a>The ‘<samp><span class="samp">--no-merge-exidx-entries</span></samp>’ switch disables the merging of adjacent exidx entries in debuginfo.
|
||||
|
||||
</body></html>
|
||||
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
<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.11">
|
||||
<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.23.2.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3
|
||||
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; }
|
||||
span.sansserif { font-family:sans-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 C6X uClinux targets</a>
|
||||
<li><a href="Options.html#Options">2.1.3 Options specific to Motorola 68HC11 and 68HC12 targets</a>
|
||||
<li><a href="Options.html#Options">2.1.4 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="REGION_005fALIAS.html#REGION_005fALIAS">3.4.4 Assign alias names to memory regions</a>
|
||||
<li><a href="Miscellaneous-Commands.html#Miscellaneous-Commands">3.4.5 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="HIDDEN.html#HIDDEN">3.5.2 HIDDEN</a>
|
||||
<li><a href="PROVIDE.html#PROVIDE">3.5.3 PROVIDE</a>
|
||||
<li><a href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">3.5.4 PROVIDE_HIDDEN</a>
|
||||
<li><a href="Source-Code-Reference.html#Source-Code-Reference">3.5.5 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-Constraint.html#Output-Section-Constraint">3.6.8.5 Output Section Constraint</a>
|
||||
<li><a href="Output-Section-Region.html#Output-Section-Region">3.6.8.6 Output Section Region</a>
|
||||
<li><a href="Output-Section-Phdr.html#Output-Section-Phdr">3.6.8.7 Output Section Phdr</a>
|
||||
<li><a href="Output-Section-Fill.html#Output-Section-Fill">3.6.8.8 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="Symbolic-Constants.html#Symbolic-Constants">3.10.2 Symbolic Constants</a>
|
||||
<li><a href="Symbols.html#Symbols">3.10.3 Symbol Names</a>
|
||||
<li><a href="Orphan-Sections.html#Orphan-Sections">3.10.4 Orphan Sections</a>
|
||||
<li><a href="Location-Counter.html#Location-Counter">3.10.5 The Location Counter</a>
|
||||
<li><a href="Operators.html#Operators">3.10.6 Operators</a>
|
||||
<li><a href="Evaluation.html#Evaluation">3.10.7 Evaluation</a>
|
||||
<li><a href="Expression-Section.html#Expression-Section">3.10.8 The Section of an Expression</a>
|
||||
<li><a href="Builtin-Functions.html#Builtin-Functions">3.10.9 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 <samp><span class="command">ld</span></samp> and the H8/300</a>
|
||||
<li><a href="i960.html#i960">4.2 <samp><span class="command">ld</span></samp> and the Intel 960 Family</a>
|
||||
<li><a href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">4.3 <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> and the ARM family</a>
|
||||
<li><a href="HPPA-ELF32.html#HPPA-ELF32">4.5 <samp><span class="command">ld</span></samp> and HPPA 32-bit ELF Support</a>
|
||||
<li><a href="M68K.html#M68K">4.6 <samp><span class="command">ld</span></samp> 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 <samp><span class="command">ld</span></samp> and PowerPC 32-bit ELF Support</a>
|
||||
<li><a href="PowerPC64-ELF64.html#PowerPC64-ELF64">4.10 <samp><span class="command">ld</span></samp> and PowerPC64 64-bit ELF Support</a>
|
||||
<li><a href="SPU-ELF.html#SPU-ELF">4.11 <samp><span class="command">ld</span></samp> and SPU ELF Support</a>
|
||||
<li><a href="TI-COFF.html#TI-COFF">4.12 <samp><span class="command">ld</span></samp>'s Support for Various TI COFF Versions</a>
|
||||
<li><a href="WIN32.html#WIN32">4.13 <samp><span class="command">ld</span></samp> 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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<h2 class="unnumbered">LD</h2>
|
||||
|
||||
<p>This file documents the <span class="sc">gnu</span> linker ld
|
||||
(GNU Binutils)
|
||||
version 2.23.2.
|
||||
|
||||
<p>This document is distributed under the terms of the GNU Free
|
||||
Documentation License version 1.3. 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>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue