neingeist
/
arduinisten
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

145 lines
9.1 KiB
HTML

<html lang="en">
<head>
<title>MRI - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Reporting-Bugs.html#Reporting-Bugs" title="Reporting Bugs">
<link rel="next" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" title="GNU Free Documentation License">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU linker LD
(GNU Binutils)
version 2.19.
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family: serif; font-weight: normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="MRI"></a>Next:&nbsp;<a rel="next" accesskey="n" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr><br>
</div>
<h2 class="appendix">Appendix A MRI Compatible Script Files</h2>
<p><a name="index-MRI-compatibility-648"></a>To aid users making the transition to <span class="sc">gnu</span> <span class="command">ld</span> from the MRI
linker, <span class="command">ld</span> can use MRI compatible linker scripts as an
alternative to the more general-purpose linker scripting language
described in <a href="Scripts.html#Scripts">Scripts</a>. MRI compatible linker scripts have a much
simpler command set than the scripting language otherwise used with
<span class="command">ld</span>. <span class="sc">gnu</span> <span class="command">ld</span> supports the most commonly used MRI
linker commands; these commands are described here.
<p>In general, MRI scripts aren't of much use with the <code>a.out</code> object
file format, since it only has three sections and MRI scripts lack some
features to make use of them.
<p>You can specify a file containing an MRI-compatible script using the
<span class="samp">-c</span> command-line option.
<p>Each command in an MRI-compatible script occupies its own line; each
command line starts with the keyword that identifies the command (though
blank lines are also allowed for punctuation). If a line of an
MRI-compatible script begins with an unrecognized keyword, <span class="command">ld</span>
issues a warning message, but continues processing the script.
<p>Lines beginning with <span class="samp">*</span> are comments.
<p>You can write these commands using all upper-case letters, or all
lower case; for example, <span class="samp">chip</span> is the same as <span class="samp">CHIP</span>.
The following list shows only the upper-case form of each command.
<a name="index-_0040code_007bABSOLUTE_007d-_0028MRI_0029-649"></a>
<dl><dt><code>ABSOLUTE </code><var>secname</var><dt><code>ABSOLUTE </code><var>secname</var><code>, </code><var>secname</var><code>, ... </code><var>secname</var><dd>Normally, <span class="command">ld</span> includes in the output file all sections from all
the input files. However, in an MRI-compatible script, you can use the
<code>ABSOLUTE</code> command to restrict the sections that will be present in
your output program. If the <code>ABSOLUTE</code> command is used at all in a
script, then only the sections named explicitly in <code>ABSOLUTE</code>
commands will appear in the linker output. You can still use other
input sections (whatever you select on the command line, or using
<code>LOAD</code>) to resolve addresses in the output file.
<p><a name="index-_0040code_007bALIAS_007d-_0028MRI_0029-650"></a><br><dt><code>ALIAS </code><var>out-secname</var><code>, </code><var>in-secname</var><dd>Use this command to place the data from input section <var>in-secname</var>
in a section called <var>out-secname</var> in the linker output file.
<p><var>in-secname</var> may be an integer.
<p><a name="index-_0040code_007bALIGN_007d-_0028MRI_0029-651"></a><br><dt><code>ALIGN </code><var>secname</var><code> = </code><var>expression</var><dd>Align the section called <var>secname</var> to <var>expression</var>. The
<var>expression</var> should be a power of two.
<p><a name="index-_0040code_007bBASE_007d-_0028MRI_0029-652"></a><br><dt><code>BASE </code><var>expression</var><dd>Use the value of <var>expression</var> as the lowest address (other than
absolute addresses) in the output file.
<p><a name="index-_0040code_007bCHIP_007d-_0028MRI_0029-653"></a><br><dt><code>CHIP </code><var>expression</var><dt><code>CHIP </code><var>expression</var><code>, </code><var>expression</var><dd>This command does nothing; it is accepted only for compatibility.
<p><a name="index-_0040code_007bEND_007d-_0028MRI_0029-654"></a><br><dt><code>END</code><dd>This command does nothing whatever; it's only accepted for compatibility.
<p><a name="index-_0040code_007bFORMAT_007d-_0028MRI_0029-655"></a><br><dt><code>FORMAT </code><var>output-format</var><dd>Similar to the <code>OUTPUT_FORMAT</code> command in the more general linker
language, but restricted to one of these output formats:
<ol type=1 start=1>
<li>S-records, if <var>output-format</var> is <span class="samp">S</span>
<li>IEEE, if <var>output-format</var> is <span class="samp">IEEE</span>
<li>COFF (the <span class="samp">coff-m68k</span> variant in BFD), if <var>output-format</var> is
<span class="samp">COFF</span>
</ol>
<p><a name="index-_0040code_007bLIST_007d-_0028MRI_0029-656"></a><br><dt><code>LIST </code><var>anything</var><code>...</code><dd>Print (to the standard output file) a link map, as produced by the
<span class="command">ld</span> command-line option <span class="samp">-M</span>.
<p>The keyword <code>LIST</code> may be followed by anything on the
same line, with no change in its effect.
<p><a name="index-_0040code_007bLOAD_007d-_0028MRI_0029-657"></a><br><dt><code>LOAD </code><var>filename</var><dt><code>LOAD </code><var>filename</var><code>, </code><var>filename</var><code>, ... </code><var>filename</var><dd>Include one or more object file <var>filename</var> in the link; this has the
same effect as specifying <var>filename</var> directly on the <span class="command">ld</span>
command line.
<p><a name="index-_0040code_007bNAME_007d-_0028MRI_0029-658"></a><br><dt><code>NAME </code><var>output-name</var><dd><var>output-name</var> is the name for the program produced by <span class="command">ld</span>; the
MRI-compatible command <code>NAME</code> is equivalent to the command-line
option <span class="samp">-o</span> or the general script language command <code>OUTPUT</code>.
<p><a name="index-_0040code_007bORDER_007d-_0028MRI_0029-659"></a><br><dt><code>ORDER </code><var>secname</var><code>, </code><var>secname</var><code>, ... </code><var>secname</var><dt><code>ORDER </code><var>secname</var> <var>secname</var> <var>secname</var><dd>Normally, <span class="command">ld</span> orders the sections in its output file in the
order in which they first appear in the input files. In an MRI-compatible
script, you can override this ordering with the <code>ORDER</code> command. The
sections you list with <code>ORDER</code> will appear first in your output
file, in the order specified.
<p><a name="index-_0040code_007bPUBLIC_007d-_0028MRI_0029-660"></a><br><dt><code>PUBLIC </code><var>name</var><code>=</code><var>expression</var><dt><code>PUBLIC </code><var>name</var><code>,</code><var>expression</var><dt><code>PUBLIC </code><var>name</var> <var>expression</var><dd>Supply a value (<var>expression</var>) for external symbol
<var>name</var> used in the linker input files.
<p><a name="index-_0040code_007bSECT_007d-_0028MRI_0029-661"></a><br><dt><code>SECT </code><var>secname</var><code>, </code><var>expression</var><dt><code>SECT </code><var>secname</var><code>=</code><var>expression</var><dt><code>SECT </code><var>secname</var> <var>expression</var><dd>You can use any of these three forms of the <code>SECT</code> command to
specify the start address (<var>expression</var>) for section <var>secname</var>.
If you have more than one <code>SECT</code> statement for the same
<var>secname</var>, only the <em>first</em> sets the start address.
</dl>
<!-- *-texinfo-*- -->
</body></html>