455
|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
|
|
2 <HTML
|
|
3 ><HEAD
|
|
4 ><TITLE
|
|
5 >LWLINK</TITLE
|
|
6 ><META
|
|
7 NAME="GENERATOR"
|
|
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
|
|
9 REL="HOME"
|
|
10 TITLE="LW Tool Chain"
|
|
11 HREF="index.html"><LINK
|
|
12 REL="PREVIOUS"
|
|
13 TITLE="Cycle Counts"
|
|
14 HREF="x805.html"><LINK
|
|
15 REL="NEXT"
|
|
16 TITLE="Linker Operation"
|
|
17 HREF="x911.html"></HEAD
|
|
18 ><BODY
|
|
19 CLASS="CHAPTER"
|
|
20 BGCOLOR="#FFFFFF"
|
|
21 TEXT="#000000"
|
|
22 LINK="#0000FF"
|
|
23 VLINK="#840084"
|
|
24 ALINK="#0000FF"
|
|
25 ><DIV
|
|
26 CLASS="NAVHEADER"
|
|
27 ><TABLE
|
|
28 SUMMARY="Header navigation table"
|
|
29 WIDTH="100%"
|
|
30 BORDER="0"
|
|
31 CELLPADDING="0"
|
|
32 CELLSPACING="0"
|
|
33 ><TR
|
|
34 ><TH
|
|
35 COLSPAN="3"
|
|
36 ALIGN="center"
|
|
37 >LW Tool Chain</TH
|
|
38 ></TR
|
|
39 ><TR
|
|
40 ><TD
|
|
41 WIDTH="10%"
|
|
42 ALIGN="left"
|
|
43 VALIGN="bottom"
|
|
44 ><A
|
|
45 HREF="x805.html"
|
|
46 ACCESSKEY="P"
|
|
47 >Prev</A
|
|
48 ></TD
|
|
49 ><TD
|
|
50 WIDTH="80%"
|
|
51 ALIGN="center"
|
|
52 VALIGN="bottom"
|
|
53 ></TD
|
|
54 ><TD
|
|
55 WIDTH="10%"
|
|
56 ALIGN="right"
|
|
57 VALIGN="bottom"
|
|
58 ><A
|
|
59 HREF="x911.html"
|
|
60 ACCESSKEY="N"
|
|
61 >Next</A
|
|
62 ></TD
|
|
63 ></TR
|
|
64 ></TABLE
|
|
65 ><HR
|
|
66 ALIGN="LEFT"
|
|
67 WIDTH="100%"></DIV
|
|
68 ><DIV
|
|
69 CLASS="CHAPTER"
|
|
70 ><H1
|
|
71 ><A
|
|
72 NAME="AEN811"
|
|
73 ></A
|
|
74 >Chapter 4. LWLINK</H1
|
|
75 ><P
|
|
76 >The LWTOOLS linker is called LWLINK. This chapter documents the various features
|
|
77 of the linker.</P
|
|
78 ><DIV
|
|
79 CLASS="SECTION"
|
|
80 ><H1
|
|
81 CLASS="SECTION"
|
|
82 ><A
|
|
83 NAME="AEN814"
|
|
84 >4.1. Command Line Options</A
|
|
85 ></H1
|
|
86 ><P
|
|
87 >The binary for LWLINK is called "lwlink". Note that the binary is in lower
|
|
88 case. lwlink takes the following command line arguments.</P
|
|
89 ><P
|
|
90 ></P
|
|
91 ><DIV
|
|
92 CLASS="VARIABLELIST"
|
|
93 ><DL
|
|
94 ><DT
|
|
95 ><CODE
|
|
96 CLASS="OPTION"
|
|
97 >--decb</CODE
|
|
98 >, <CODE
|
|
99 CLASS="OPTION"
|
|
100 >-b</CODE
|
|
101 ></DT
|
|
102 ><DD
|
|
103 ><P
|
|
104 >Selects the DECB output format target. This is equivalent to <CODE
|
|
105 CLASS="OPTION"
|
|
106 >--format=decb</CODE
|
|
107 ></P
|
|
108 ></DD
|
|
109 ><DT
|
|
110 ><CODE
|
|
111 CLASS="OPTION"
|
|
112 >--output=FILE</CODE
|
|
113 >, <CODE
|
|
114 CLASS="OPTION"
|
|
115 >-o FILE</CODE
|
|
116 ></DT
|
|
117 ><DD
|
|
118 ><P
|
|
119 >This option specifies the name of the output file. If not specified, the
|
|
120 default is <CODE
|
|
121 CLASS="OPTION"
|
|
122 >a.out</CODE
|
|
123 >.</P
|
|
124 ></DD
|
|
125 ><DT
|
|
126 ><CODE
|
|
127 CLASS="OPTION"
|
|
128 >--format=TYPE</CODE
|
|
129 >, <CODE
|
|
130 CLASS="OPTION"
|
|
131 >-f TYPE</CODE
|
|
132 ></DT
|
|
133 ><DD
|
|
134 ><P
|
|
135 >This option specifies the output format. Valid values are <CODE
|
|
136 CLASS="OPTION"
|
|
137 >decb</CODE
|
|
138 >
|
|
139 and <CODE
|
|
140 CLASS="OPTION"
|
|
141 >raw</CODE
|
|
142 ></P
|
|
143 ></DD
|
|
144 ><DT
|
|
145 ><CODE
|
|
146 CLASS="OPTION"
|
|
147 >--raw</CODE
|
|
148 >, <CODE
|
|
149 CLASS="OPTION"
|
|
150 >-r</CODE
|
|
151 ></DT
|
|
152 ><DD
|
|
153 ><P
|
|
154 >This option specifies the raw output format.
|
|
155 It is equivalent to <CODE
|
|
156 CLASS="OPTION"
|
|
157 >--format=raw</CODE
|
|
158 >
|
|
159 and <CODE
|
|
160 CLASS="OPTION"
|
|
161 >-f raw</CODE
|
|
162 ></P
|
|
163 ></DD
|
|
164 ><DT
|
|
165 ><CODE
|
|
166 CLASS="OPTION"
|
|
167 >--script=FILE</CODE
|
|
168 >, <CODE
|
|
169 CLASS="OPTION"
|
|
170 >-s</CODE
|
|
171 ></DT
|
|
172 ><DD
|
|
173 ><P
|
|
174 >This option allows specifying a linking script to override the linker's
|
|
175 built in defaults.</P
|
|
176 ></DD
|
|
177 ><DT
|
|
178 ><CODE
|
|
179 CLASS="OPTION"
|
|
180 >--section-base=SECT=BASE</CODE
|
|
181 ></DT
|
|
182 ><DD
|
|
183 ><P
|
|
184 >Cause section SECT to load at base address BASE. This will be prepended
|
|
185 to the built-in link script. It is ignored if a link script is provided.</P
|
|
186 ></DD
|
|
187 ><DT
|
|
188 ><CODE
|
|
189 CLASS="OPTION"
|
|
190 >--map=FILE</CODE
|
|
191 >, <CODE
|
|
192 CLASS="OPTION"
|
|
193 >-m FILE</CODE
|
|
194 ></DT
|
|
195 ><DD
|
|
196 ><P
|
|
197 >This will output a description of the link result to FILE.</P
|
|
198 ></DD
|
|
199 ><DT
|
|
200 ><CODE
|
|
201 CLASS="OPTION"
|
|
202 >--library=LIBSPEC</CODE
|
|
203 >, <CODE
|
|
204 CLASS="OPTION"
|
|
205 >-l LIBSPEC</CODE
|
|
206 ></DT
|
|
207 ><DD
|
|
208 ><P
|
|
209 >Load a library using the library search path. If LIBSPEC is prefixed with a
|
|
210 colon (":"), then LIBSPEC is the precise filename to be searched for in the
|
|
211 library path. Otherwise, LIBSPEC will have "lib" prepended and ".a" appended.</P
|
|
212 ></DD
|
|
213 ><DT
|
|
214 ><CODE
|
|
215 CLASS="OPTION"
|
|
216 >--library-path=DIR</CODE
|
|
217 >, <CODE
|
|
218 CLASS="OPTION"
|
|
219 >-L DIR</CODE
|
|
220 ></DT
|
|
221 ><DD
|
|
222 ><P
|
|
223 >Add DIR to the library search path.</P
|
|
224 ></DD
|
|
225 ><DT
|
|
226 ><CODE
|
|
227 CLASS="OPTION"
|
|
228 >--debug</CODE
|
|
229 >, <CODE
|
|
230 CLASS="OPTION"
|
|
231 >-d</CODE
|
|
232 ></DT
|
|
233 ><DD
|
|
234 ><P
|
|
235 >This option increases the debugging level. It is only useful for LWTOOLS
|
|
236 developers.</P
|
|
237 ></DD
|
|
238 ><DT
|
|
239 ><CODE
|
|
240 CLASS="OPTION"
|
|
241 >--help</CODE
|
|
242 >, <CODE
|
|
243 CLASS="OPTION"
|
|
244 >-?</CODE
|
|
245 ></DT
|
|
246 ><DD
|
|
247 ><P
|
|
248 >This provides a listing of command line options and a brief description
|
|
249 of each.</P
|
|
250 ></DD
|
|
251 ><DT
|
|
252 ><CODE
|
|
253 CLASS="OPTION"
|
|
254 >--usage</CODE
|
|
255 ></DT
|
|
256 ><DD
|
|
257 ><P
|
|
258 >This will display a usage summary
|
|
259 of each command line option.</P
|
|
260 ></DD
|
|
261 ><DT
|
|
262 ><CODE
|
|
263 CLASS="OPTION"
|
|
264 >--version</CODE
|
|
265 >, <CODE
|
|
266 CLASS="OPTION"
|
|
267 >-V</CODE
|
|
268 ></DT
|
|
269 ><DD
|
|
270 ><P
|
|
271 >This will display the version of LWLINK.</P
|
|
272 ></DD
|
|
273 ></DL
|
|
274 ></DIV
|
|
275 ></DIV
|
|
276 ></DIV
|
|
277 ><DIV
|
|
278 CLASS="NAVFOOTER"
|
|
279 ><HR
|
|
280 ALIGN="LEFT"
|
|
281 WIDTH="100%"><TABLE
|
|
282 SUMMARY="Footer navigation table"
|
|
283 WIDTH="100%"
|
|
284 BORDER="0"
|
|
285 CELLPADDING="0"
|
|
286 CELLSPACING="0"
|
|
287 ><TR
|
|
288 ><TD
|
|
289 WIDTH="33%"
|
|
290 ALIGN="left"
|
|
291 VALIGN="top"
|
|
292 ><A
|
|
293 HREF="x805.html"
|
|
294 ACCESSKEY="P"
|
|
295 >Prev</A
|
|
296 ></TD
|
|
297 ><TD
|
|
298 WIDTH="34%"
|
|
299 ALIGN="center"
|
|
300 VALIGN="top"
|
|
301 ><A
|
|
302 HREF="index.html"
|
|
303 ACCESSKEY="H"
|
|
304 >Home</A
|
|
305 ></TD
|
|
306 ><TD
|
|
307 WIDTH="33%"
|
|
308 ALIGN="right"
|
|
309 VALIGN="top"
|
|
310 ><A
|
|
311 HREF="x911.html"
|
|
312 ACCESSKEY="N"
|
|
313 >Next</A
|
|
314 ></TD
|
|
315 ></TR
|
|
316 ><TR
|
|
317 ><TD
|
|
318 WIDTH="33%"
|
|
319 ALIGN="left"
|
|
320 VALIGN="top"
|
|
321 >Cycle Counts</TD
|
|
322 ><TD
|
|
323 WIDTH="34%"
|
|
324 ALIGN="center"
|
|
325 VALIGN="top"
|
|
326 > </TD
|
|
327 ><TD
|
|
328 WIDTH="33%"
|
|
329 ALIGN="right"
|
|
330 VALIGN="top"
|
|
331 >Linker Operation</TD
|
|
332 ></TR
|
|
333 ></TABLE
|
|
334 ></DIV
|
|
335 ></BODY
|
|
336 ></HTML
|
|
337 > |