annotate docs/manual/x925.html @ 473:8181ddd707f1

Add "nooutput" pragma Add the "nooutput" pragma which causes assembly to proceed as normal for code with the exception that no output is generated for any instructions under this pragma. The current address is increased as usual and the symbol table is still constructed. However, no actual output is generated for lines operating under this pragma.
author William Astle <lost@l-w.ca>
date Thu, 01 Nov 2018 23:07:03 -0600
parents cad5937314cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
455
cad5937314cb Add operandsizewarning pragma
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">
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
2 <HTML
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
3 ><HEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
4 ><TITLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
5 >Linking Scripts</TITLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
6 ><META
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
7 NAME="GENERATOR"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
9 REL="HOME"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
10 TITLE="LW Tool Chain"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
11 HREF="index.html"><LINK
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
12 REL="UP"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
13 TITLE="LWLINK"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
14 HREF="c811.html"><LINK
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
15 REL="PREVIOUS"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
16 TITLE="Linker Operation"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
17 HREF="x911.html"><LINK
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
18 REL="NEXT"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
19 TITLE="Format Specific Linking Notes"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
20 HREF="x991.html"></HEAD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
21 ><BODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
22 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
24 TEXT="#000000"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
25 LINK="#0000FF"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
26 VLINK="#840084"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
27 ALINK="#0000FF"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
28 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
29 CLASS="NAVHEADER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
30 ><TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
31 SUMMARY="Header navigation table"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
32 WIDTH="100%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
33 BORDER="0"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
34 CELLPADDING="0"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
35 CELLSPACING="0"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
36 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
37 ><TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
38 COLSPAN="3"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
39 ALIGN="center"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
40 >LW Tool Chain</TH
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
41 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
42 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
43 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
44 WIDTH="10%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
45 ALIGN="left"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
46 VALIGN="bottom"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
47 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
48 HREF="x911.html"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
49 ACCESSKEY="P"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
50 >Prev</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
51 ></TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
52 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
53 WIDTH="80%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
54 ALIGN="center"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
55 VALIGN="bottom"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
56 >Chapter 4. LWLINK</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
57 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
58 WIDTH="10%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
59 ALIGN="right"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
60 VALIGN="bottom"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
61 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
62 HREF="x991.html"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
63 ACCESSKEY="N"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
64 >Next</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
65 ></TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
66 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
67 ></TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
68 ><HR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
69 ALIGN="LEFT"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
70 WIDTH="100%"></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
71 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
72 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
73 ><H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
74 CLASS="SECTION"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
75 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
76 NAME="AEN925"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
77 >4.3. Linking Scripts</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
78 ></H1
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
79 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
80 >A linker script is used to instruct the linker about how to assemble the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
81 various sections into a completed binary. It consists of a series of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
82 directives which are considered in the order they are encountered.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
83 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
84 >The sections will appear in the resulting binary in the order they are
cad5937314cb Add operandsizewarning pragma
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
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
86 section did exist but had a zero size, no relocations, and no exports.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
87 A section should only be referenced once. Any subsequent references will have
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
88 an undefined effect.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
89 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
90 >All numbers are in linking scripts are specified in hexadecimal. All directives
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
91 are case sensitive although the hexadecimal numbers are not.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
92 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
93 >A section name can be specified as a "*", then any section not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
94 already matched by the script will be matched. The "*" can be followed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
95 by a comma and a flag to narrow the section down slightly, also.
cad5937314cb Add operandsizewarning pragma
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
cad5937314cb Add operandsizewarning pragma
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
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
98 bss will be matched.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
99 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
100 >The following directives are understood in a linker script.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
101 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
102 ></P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
103 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
104 CLASS="VARIABLELIST"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
105 ><DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
106 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
107 >sectopt <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
108 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
109 >section</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
110 > padafter <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
111 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
112 >byte,...</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
113 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
114 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
115 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
116 >&#13;This will cause the linker to append the specified list of byte values
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
117 (specified in hexadecimal separated by commas) to the end of the named
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
118 section. This is done once all instances of the specified section are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
119 collected together. This has no effect if the specified section does not
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
120 appear anywhere in any of the objects specified for linking. &#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
121 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
122 >&#13;If code depends on the presence of this padding somewhere, it is sufficient
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
123 to include an empty section of the specified name in the object that depends
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
124 on it.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
125 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
126 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
127 >define basesympat <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
128 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
129 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
130 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
131 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
132 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
133 >&#13;This causes the linker to define a symbol for the ultimate base address of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
134 each section using the pattern specified by <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
135 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
136 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
137 >.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
138 In the string, %s can appear exactly once and will be replaced with the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
139 section name. The base address is calculated after all instances of each
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
140 section have been collapsed together.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
141 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
142 >&#13;It should be noted that if none of the objects to be linked contains a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
143 particular section name, there will be no base symbol defined for it, even
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
144 if it is listed explicitly in the link script. If code depends on the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
145 presence of these symbols, it is sufficient to include an empty section of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
146 the specified name in the object that depends on it.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
147 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
148 > If the pattern resolves to the same string for multiple
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
149 sections, the results are undefined.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
150 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
151 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
152 >define lensympat <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
153 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
154 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
155 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
156 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
157 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
158 >&#13;This causes the linker to define a symbol for the ultimate length of each
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
159 section using the pattern specified by <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
160 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
161 >string</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
162 >. In
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
163 the string, %s can appear exactly once and will be replaced with the section
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
164 name. The length is calculated after all instances of a section have been
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
165 collapsed together.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
166 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
167 >&#13;It should be noted that if none of the objects to be linked contains a
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
168 particular section name, there will be no length symbol defined for it, even
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
169 if it is listed explicitly in the link script. If code depends on the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
170 presence of these symbols, it is sufficient to include an empty section of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
171 the specified name in the object that depends on it.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
172 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
173 >If the pattern resolves to the same string for multiple
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
174 sections, the results are undefined.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
175 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
176 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
177 >section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
178 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
179 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
180 > load <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
181 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
182 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
183 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
184 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
185 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
186 >&#13;This causes the section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
187 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
188 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
189 > to load at
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
190 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
191 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
192 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
193 >. For the raw target, only one "load at" entry is
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
194 allowed for non-bss sections and it must be the first one. For raw targets,
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
195 it affects the addresses the linker assigns to symbols but has no other
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
196 affect on the output. bss sections may all have separate load addresses but
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
197 since they will not appear in the binary anyway, this is okay.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
198 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
199 >For the decb target, each "load" entry will cause a new "block" to be
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
200 output to the binary which will contain the load address. It is legal for
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
201 sections to overlap in this manner - the linker assumes the loader will sort
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
202 everything out.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
203 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
204 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
205 >section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
206 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
207 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
208 > high <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
209 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
210 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
211 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
212 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
213 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
214 >&#13;This causes the section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
215 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
216 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
217 > to load with its end
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
218 address just below <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
219 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
220 >addr</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
221 >. Subsequent sections are
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
222 loaded at progressively lower addresses. This may lead to inefficient file
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
223 encoding for some targets. As of this writing, it will also almost
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
224 certainly do the wrong thing for a raw target.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
225 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
226 >&#13;This is useful for aligning a block of code with high memory. As an
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
227 example, if the total size of a section is $100 bytes and a high address of
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
228 $FE00 is specified, the section will actually load at $FD00.&#13;</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
229 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
230 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
231 >section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
232 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
233 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
234 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
235 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
236 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
237 >&#13;This will cause the section <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
238 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
239 >name</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
240 > to load after the previously listed
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
241 section.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
242 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
243 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
244 >entry <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
245 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
246 >addr or sym</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
247 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
248 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
249 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
250 >This will cause the execution address (entry point) to be the address
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
251 specified (in hex) or the specified symbol name. The symbol name must
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
252 match a symbol that is exported by one of the object files being linked.
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
253 This has no effect for targets that do not encode the entry point into the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
254 resulting file. If not specified, the entry point is assumed to be address 0
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
255 which is probably not what you want. The default link scripts for targets
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
256 that support this directive automatically starts at the beginning of the
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
257 first section (usually "init" or "code") that is emitted in the binary.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
258 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
259 ><DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
260 >pad <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
261 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
262 >size</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
263 ></DT
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
264 ><DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
265 ><P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
266 >This will cause the output file to be padded with NUL bytes to be exactly
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
267 <CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
268 CLASS="PARAMETER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
269 >size</CODE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
270 > bytes in length. This only makes sense for a raw target.</P
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
271 ></DD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
272 ></DL
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
273 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
274 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
275 ><DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
276 CLASS="NAVFOOTER"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
277 ><HR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
278 ALIGN="LEFT"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
279 WIDTH="100%"><TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
280 SUMMARY="Footer navigation table"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
281 WIDTH="100%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
282 BORDER="0"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
283 CELLPADDING="0"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
284 CELLSPACING="0"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
285 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
286 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
287 WIDTH="33%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
288 ALIGN="left"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
289 VALIGN="top"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
290 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
291 HREF="x911.html"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
292 ACCESSKEY="P"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
293 >Prev</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
294 ></TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
295 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
296 WIDTH="34%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
297 ALIGN="center"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
298 VALIGN="top"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
299 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
300 HREF="index.html"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
301 ACCESSKEY="H"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
302 >Home</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
303 ></TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
304 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
305 WIDTH="33%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
306 ALIGN="right"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
307 VALIGN="top"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
308 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
309 HREF="x991.html"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
310 ACCESSKEY="N"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
311 >Next</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
312 ></TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
313 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
314 ><TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
315 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
316 WIDTH="33%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
317 ALIGN="left"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
318 VALIGN="top"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
319 >Linker Operation</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
320 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
321 WIDTH="34%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
322 ALIGN="center"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
323 VALIGN="top"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
324 ><A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
325 HREF="c811.html"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
326 ACCESSKEY="U"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
327 >Up</A
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
328 ></TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
329 ><TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
330 WIDTH="33%"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
331 ALIGN="right"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
332 VALIGN="top"
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
333 >Format Specific Linking Notes</TD
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
334 ></TR
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
335 ></TABLE
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
336 ></DIV
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
337 ></BODY
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
338 ></HTML
cad5937314cb Add operandsizewarning pragma
William Astle <lost@l-w.ca>
parents:
diff changeset
339 >