annotate docs/manual/x795.html @ 234:d389adbcc4ab

Added section base and length symbols to lwlink Added the ability for a link script to define section base and section length symbols when linking. These symbols are searched for when an external reference is resolved before looking up any symbols in the various objects being linked. Also documented the new link script directives and added such directives to all default link scripts.
author William Astle <lost@l-w.ca>
date Fri, 10 Aug 2012 23:47:56 -0600
parents 2cc599f1bebf
children ce1fdc8d6568
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
231
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
2 <HTML
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
3 ><HEAD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
4 ><TITLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
5 >Linking Scripts</TITLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
6 ><META
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
7 NAME="GENERATOR"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
9 REL="HOME"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
10 TITLE="LW Tool Chain"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
11 HREF="index.html"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
12 REL="UP"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
13 TITLE="LWLINK"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
14 HREF="c681.html"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
15 REL="PREVIOUS"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
16 TITLE="Linker Operation"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
17 HREF="x781.html"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
18 REL="NEXT"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
19 TITLE="Format Specific Linking Notes"
234
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
20 HREF="x843.html"></HEAD
231
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
21 ><BODY
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
22 CLASS="SECTION"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
24 TEXT="#000000"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
25 LINK="#0000FF"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
26 VLINK="#840084"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
27 ALINK="#0000FF"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
28 ><DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
29 CLASS="NAVHEADER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
30 ><TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
31 SUMMARY="Header navigation table"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
32 WIDTH="100%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
33 BORDER="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
34 CELLPADDING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
35 CELLSPACING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
36 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
37 ><TH
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
38 COLSPAN="3"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
39 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
40 >LW Tool Chain</TH
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
41 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
42 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
43 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
44 WIDTH="10%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
45 ALIGN="left"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
46 VALIGN="bottom"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
47 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
48 HREF="x781.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
49 ACCESSKEY="P"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
50 >Prev</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
51 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
52 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
53 WIDTH="80%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
54 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
55 VALIGN="bottom"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
56 >Chapter 4. LWLINK</TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
57 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
58 WIDTH="10%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
59 ALIGN="right"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
60 VALIGN="bottom"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
61 ><A
234
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
62 HREF="x843.html"
231
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
63 ACCESSKEY="N"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
64 >Next</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
65 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
66 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
67 ></TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
68 ><HR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
69 ALIGN="LEFT"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
70 WIDTH="100%"></DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
71 ><DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
72 CLASS="SECTION"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
73 ><H1
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
74 CLASS="SECTION"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
75 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
76 NAME="AEN795"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
77 >4.3. Linking Scripts</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
78 ></H1
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
79 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
80 >A linker script is used to instruct the linker about how to assemble the
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
81 various sections into a completed binary. It consists of a series of
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
82 directives which are considered in the order they are encountered.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
83 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
84 >The sections will appear in the resulting binary in the order they are
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
85 specified in the script file. If a referenced section is not found, the linker will behave as though the
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
86 section did exist but had a zero size, no relocations, and no exports.
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
87 A section should only be referenced once. Any subsequent references will have
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
88 an undefined effect.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
89 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
90 >All numbers are in linking scripts are specified in hexadecimal. All directives
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
91 are case sensitive although the hexadecimal numbers are not.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
92 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
93 >A section name can be specified as a "*", then any section not
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
94 already matched by the script will be matched. The "*" can be followed
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
95 by a comma and a flag to narrow the section down slightly, also.
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
96 If the flag is "!bss", then any section that is not flagged as a bss section
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
97 will be matched. If the flag is "bss", then any section that is flagged as
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
98 bss will be matched.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
99 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
100 >The following directives are understood in a linker script.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
101 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
102 ></P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
103 ><DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
104 CLASS="VARIABLELIST"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
105 ><DL
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
106 ><DT
234
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
107 >define basesympat <CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
108 CLASS="PARAMETER"
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
109 >string</CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
110 ></DT
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
111 ><DD
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
112 ><P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
113 >&#13;This causes the linker to define a symbol for the ultimate base address of
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
114 each section using the pattern specified by <CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
115 CLASS="PARAMETER"
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
116 >string</CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
117 >.
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
118 In the string, %s can appear exactly once and will be replaced with the
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
119 section name. The base address is calculated after all instances of each
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
120 section have been collapsed together.&#13;</P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
121 ><P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
122 > If the pattern resolves to the same string for multiple
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
123 sections, the results are undefined.&#13;</P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
124 ></DD
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
125 ><DT
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
126 >define lensympat <CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
127 CLASS="PARAMETER"
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
128 >string</CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
129 ></DT
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
130 ><DD
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
131 ><P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
132 >&#13;This causes the linker to define a symbol for the ultimate length of each
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
133 section using the pattern specified by <CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
134 CLASS="PARAMETER"
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
135 >string</CODE
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
136 >. In
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
137 the string, %s can appear exactly once and will be replaced with the section
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
138 name. The length is calculated after all instances of a section have been
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
139 collapsed together.&#13;</P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
140 ><P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
141 >If the pattern resolves to the same string for multiple
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
142 sections, the results are undefined.&#13;</P
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
143 ></DD
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
144 ><DT
231
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
145 >section <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
146 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
147 >name</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
148 > load <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
149 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
150 >addr</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
151 ></DT
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
152 ><DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
153 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
154 >&#13;This causes the section <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
155 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
156 >name</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
157 > to load at
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
158 <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
159 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
160 >addr</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
161 >. For the raw target, only one "load at" entry is
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
162 allowed for non-bss sections and it must be the first one. For raw targets,
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
163 it affects the addresses the linker assigns to symbols but has no other
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
164 affect on the output. bss sections may all have separate load addresses but
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
165 since they will not appear in the binary anyway, this is okay.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
166 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
167 >For the decb target, each "load" entry will cause a new "block" to be
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
168 output to the binary which will contain the load address. It is legal for
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
169 sections to overlap in this manner - the linker assumes the loader will sort
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
170 everything out.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
171 ></DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
172 ><DT
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
173 >section <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
174 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
175 >name</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
176 ></DT
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
177 ><DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
178 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
179 >&#13;This will cause the section <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
180 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
181 >name</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
182 > to load after the previously listed
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
183 section.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
184 ></DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
185 ><DT
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
186 >entry <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
187 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
188 >addr or sym</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
189 ></DT
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
190 ><DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
191 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
192 >This will cause the execution address (entry point) to be the address
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
193 specified (in hex) or the specified symbol name. The symbol name must
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
194 match a symbol that is exported by one of the object files being linked.
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
195 This has no effect for targets that do not encode the entry point into the
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
196 resulting file. If not specified, the entry point is assumed to be address 0
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
197 which is probably not what you want. The default link scripts for targets
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
198 that support this directive automatically starts at the beginning of the
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
199 first section (usually "init" or "code") that is emitted in the binary.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
200 ></DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
201 ><DT
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
202 >pad <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
203 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
204 >size</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
205 ></DT
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
206 ><DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
207 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
208 >This will cause the output file to be padded with NUL bytes to be exactly
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
209 <CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
210 CLASS="PARAMETER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
211 >size</CODE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
212 > bytes in length. This only makes sense for a raw target.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
213 ></DD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
214 ></DL
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
215 ></DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
216 ></DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
217 ><DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
218 CLASS="NAVFOOTER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
219 ><HR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
220 ALIGN="LEFT"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
221 WIDTH="100%"><TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
222 SUMMARY="Footer navigation table"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
223 WIDTH="100%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
224 BORDER="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
225 CELLPADDING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
226 CELLSPACING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
227 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
228 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
229 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
230 ALIGN="left"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
231 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
232 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
233 HREF="x781.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
234 ACCESSKEY="P"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
235 >Prev</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
236 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
237 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
238 WIDTH="34%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
239 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
240 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
241 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
242 HREF="index.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
243 ACCESSKEY="H"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
244 >Home</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
245 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
246 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
247 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
248 ALIGN="right"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
249 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
250 ><A
234
d389adbcc4ab Added section base and length symbols to lwlink
William Astle <lost@l-w.ca>
parents: 231
diff changeset
251 HREF="x843.html"
231
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
252 ACCESSKEY="N"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
253 >Next</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
254 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
255 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
256 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
257 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
258 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
259 ALIGN="left"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
260 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
261 >Linker Operation</TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
262 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
263 WIDTH="34%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
264 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
265 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
266 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
267 HREF="c681.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
268 ACCESSKEY="U"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
269 >Up</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
270 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
271 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
272 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
273 ALIGN="right"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
274 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
275 >Format Specific Linking Notes</TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
276 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
277 ></TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
278 ></DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
279 ></BODY
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
280 ></HTML
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
281 >