comparison docs/manual/x795.html @ 236:ce1fdc8d6568

Added ability to add padding after a section when linking. Added the ability for lwlink to automatically append padding bytes to the end of a section (once the section instances are merged). This behaviour is controlled by the link script. See the updated documentation for more information.
author William Astle <lost@l-w.ca>
date Sat, 11 Aug 2012 23:29:57 -0600
parents d389adbcc4ab
children
comparison
equal deleted inserted replaced
235:e3741cf53e00 236:ce1fdc8d6568
15 REL="PREVIOUS" 15 REL="PREVIOUS"
16 TITLE="Linker Operation" 16 TITLE="Linker Operation"
17 HREF="x781.html"><LINK 17 HREF="x781.html"><LINK
18 REL="NEXT" 18 REL="NEXT"
19 TITLE="Format Specific Linking Notes" 19 TITLE="Format Specific Linking Notes"
20 HREF="x843.html"></HEAD 20 HREF="x852.html"></HEAD
21 ><BODY 21 ><BODY
22 CLASS="SECTION" 22 CLASS="SECTION"
23 BGCOLOR="#FFFFFF" 23 BGCOLOR="#FFFFFF"
24 TEXT="#000000" 24 TEXT="#000000"
25 LINK="#0000FF" 25 LINK="#0000FF"
57 ><TD 57 ><TD
58 WIDTH="10%" 58 WIDTH="10%"
59 ALIGN="right" 59 ALIGN="right"
60 VALIGN="bottom" 60 VALIGN="bottom"
61 ><A 61 ><A
62 HREF="x843.html" 62 HREF="x852.html"
63 ACCESSKEY="N" 63 ACCESSKEY="N"
64 >Next</A 64 >Next</A
65 ></TD 65 ></TD
66 ></TR 66 ></TR
67 ></TABLE 67 ></TABLE
102 ></P 102 ></P
103 ><DIV 103 ><DIV
104 CLASS="VARIABLELIST" 104 CLASS="VARIABLELIST"
105 ><DL 105 ><DL
106 ><DT 106 ><DT
107 >sectopt <CODE
108 CLASS="PARAMETER"
109 >section</CODE
110 > padafter <CODE
111 CLASS="PARAMETER"
112 >byte,...</CODE
113 ></DT
114 ><DD
115 ><P
116 >&#13;This will cause the linker to append the specified list of byte values
117 (specified in hexadecimal separated by commas) to the end of the named
118 section. This is done once all instances of the specified section are
119 collected together. This has no effect if the specified section does not
120 appear anywhere in any of the objects specified for linking. &#13;</P
121 ><P
122 >&#13;If code depends on the presence of this padding somewhere, it is sufficient
123 to include an empty section of the specified name in the object that depends
124 on it.&#13;</P
125 ></DD
126 ><DT
107 >define basesympat <CODE 127 >define basesympat <CODE
108 CLASS="PARAMETER" 128 CLASS="PARAMETER"
109 >string</CODE 129 >string</CODE
110 ></DT 130 ></DT
111 ><DD 131 ><DD
117 >. 137 >.
118 In the string, %s can appear exactly once and will be replaced with the 138 In the string, %s can appear exactly once and will be replaced with the
119 section name. The base address is calculated after all instances of each 139 section name. The base address is calculated after all instances of each
120 section have been collapsed together.&#13;</P 140 section have been collapsed together.&#13;</P
121 ><P 141 ><P
142 >&#13;It should be noted that if none of the objects to be linked contains a
143 particular section name, there will be no base symbol defined for it, even
144 if it is listed explicitly in the link script. If code depends on the
145 presence of these symbols, it is sufficient to include an empty section of
146 the specified name in the object that depends on it.&#13;</P
147 ><P
122 > If the pattern resolves to the same string for multiple 148 > If the pattern resolves to the same string for multiple
123 sections, the results are undefined.&#13;</P 149 sections, the results are undefined.&#13;</P
124 ></DD 150 ></DD
125 ><DT 151 ><DT
126 >define lensympat <CODE 152 >define lensympat <CODE
135 >string</CODE 161 >string</CODE
136 >. In 162 >. In
137 the string, %s can appear exactly once and will be replaced with the section 163 the string, %s can appear exactly once and will be replaced with the section
138 name. The length is calculated after all instances of a section have been 164 name. The length is calculated after all instances of a section have been
139 collapsed together.&#13;</P 165 collapsed together.&#13;</P
166 ><P
167 >&#13;It should be noted that if none of the objects to be linked contains a
168 particular section name, there will be no length symbol defined for it, even
169 if it is listed explicitly in the link script. If code depends on the
170 presence of these symbols, it is sufficient to include an empty section of
171 the specified name in the object that depends on it.&#13;</P
140 ><P 172 ><P
141 >If the pattern resolves to the same string for multiple 173 >If the pattern resolves to the same string for multiple
142 sections, the results are undefined.&#13;</P 174 sections, the results are undefined.&#13;</P
143 ></DD 175 ></DD
144 ><DT 176 ><DT
246 ><TD 278 ><TD
247 WIDTH="33%" 279 WIDTH="33%"
248 ALIGN="right" 280 ALIGN="right"
249 VALIGN="top" 281 VALIGN="top"
250 ><A 282 ><A
251 HREF="x843.html" 283 HREF="x852.html"
252 ACCESSKEY="N" 284 ACCESSKEY="N"
253 >Next</A 285 >Next</A
254 ></TD 286 ></TD
255 ></TR 287 ></TR
256 ><TR 288 ><TR