comparison docs/manual/manual.html @ 168:1e0a0e6cd918

Documentation updates
author lost@l-w.ca
date Mon, 29 Aug 2011 19:15:50 -0600
parents 83b7b4ce3bbd
children 2cc599f1bebf
comparison
equal deleted inserted replaced
167:872fa82680e1 168:1e0a0e6cd918
167 HREF="#AEN520" 167 HREF="#AEN520"
168 >Object Files and Sections</A 168 >Object Files and Sections</A
169 ></DT 169 ></DT
170 ><DT 170 ><DT
171 >3.10. <A 171 >3.10. <A
172 HREF="#AEN583" 172 HREF="#AEN584"
173 >Assembler Modes and Pragmas</A 173 >Assembler Modes and Pragmas</A
174 ></DT 174 ></DT
175 ></DL 175 ></DL
176 ></DD 176 ></DD
177 ><DT 177 ><DT
178 >4. <A 178 >4. <A
179 HREF="#AEN661" 179 HREF="#AEN662"
180 >LWLINK</A 180 >LWLINK</A
181 ></DT 181 ></DT
182 ><DD 182 ><DD
183 ><DL 183 ><DL
184 ><DT 184 ><DT
185 >4.1. <A 185 >4.1. <A
186 HREF="#AEN664" 186 HREF="#AEN665"
187 >Command Line Options</A 187 >Command Line Options</A
188 ></DT 188 ></DT
189 ><DT 189 ><DT
190 >4.2. <A 190 >4.2. <A
191 HREF="#AEN761" 191 HREF="#AEN762"
192 >Linker Operation</A 192 >Linker Operation</A
193 ></DT 193 ></DT
194 ><DT 194 ><DT
195 >4.3. <A 195 >4.3. <A
196 HREF="#AEN775" 196 HREF="#AEN776"
197 >Linking Scripts</A 197 >Linking Scripts</A
198 ></DT 198 ></DT
199 ><DT 199 ><DT
200 >4.4. <A 200 >4.4. <A
201 HREF="#AEN809" 201 HREF="#AEN810"
202 >Format Specific Linking Notes</A 202 >Format Specific Linking Notes</A
203 ></DT 203 ></DT
204 ><DD 204 ><DD
205 ><DL 205 ><DL
206 ><DT 206 ><DT
207 >4.4.1. <A 207 >4.4.1. <A
208 HREF="#AEN812" 208 HREF="#AEN813"
209 >OS9 Modules</A 209 >OS9 Modules</A
210 ></DT 210 ></DT
211 ></DL 211 ></DL
212 ></DD 212 ></DD
213 ></DL 213 ></DL
214 ></DD 214 ></DD
215 ><DT 215 ><DT
216 >5. <A 216 >5. <A
217 HREF="#AEN824" 217 HREF="#AEN825"
218 >Libraries and LWAR</A 218 >Libraries and LWAR</A
219 ></DT 219 ></DT
220 ><DD 220 ><DD
221 ><DL 221 ><DL
222 ><DT 222 ><DT
223 >5.1. <A 223 >5.1. <A
224 HREF="#AEN828" 224 HREF="#AEN829"
225 >Command Line Options</A 225 >Command Line Options</A
226 ></DT 226 ></DT
227 ></DL 227 ></DL
228 ></DD 228 ></DD
229 ><DT 229 ><DT
241 ><B 241 ><B
242 >List of Tables</B 242 >List of Tables</B
243 ></DT 243 ></DT
244 ><DT 244 ><DT
245 >6-1. <A 245 >6-1. <A
246 HREF="#AEN911" 246 HREF="#AEN912"
247 >Object File Term Types</A 247 >Object File Term Types</A
248 ></DT 248 ></DT
249 ><DT 249 ><DT
250 >6-2. <A 250 >6-2. <A
251 HREF="#AEN941" 251 HREF="#AEN942"
252 >Object File Operator Numbers</A 252 >Object File Operator Numbers</A
253 ></DT 253 ></DT
254 ></DL 254 ></DL
255 ></DIV 255 ></DIV
256 ><DIV 256 ><DIV
1826 CLASS="PARAMETER" 1826 CLASS="PARAMETER"
1827 >flags</CODE 1827 >flags</CODE
1828 > may only be specified on the first 1828 > may only be specified on the first
1829 instance of the section.</P 1829 instance of the section.</P
1830 ><P 1830 ><P
1831 >There is a single flag supported in <CODE 1831 ><CODE
1832 CLASS="PARAMETER" 1832 CLASS="PARAMETER"
1833 >flags</CODE 1833 >flags</CODE
1834 >. The 1834 > is a comma separated list of flags. If a
1835 flag <CODE 1835 flag is "bss", the section will be treated as a BSS section and no
1836 CLASS="PARAMETER" 1836 statements that generate output are permitted.</P
1837 >bss</CODE 1837 ><P
1838 > will cause the section to be treated as a BSS 1838 >If the flag is "constant",
1839 section and, thus, no code will be included in the object file nor will any 1839 the same restrictions apply as for BSS sections. Additionally, all symbols
1840 bytes be permitted to be output.</P 1840 defined in a constant section define absolute values and will not be
1841 adjusted by the linker at link time. Constant sections cannot define
1842 complex expressions for symbols; the value must be fully defined at assembly
1843 time. Additionally, multiple instances of a constant section do not
1844 coalesce into a single addressing unit; each instance starts again at offset
1845 0.</P
1841 ><P 1846 ><P
1842 >If the section name is "bss" or ".bss" in any combination of upper and 1847 >If the section name is "bss" or ".bss" in any combination of upper and
1843 lower case, the section is assumed to be a BSS section. In that case, 1848 lower case, the section is assumed to be a BSS section. In that case,
1844 the flag <CODE 1849 the flag <CODE
1845 CLASS="PARAMETER" 1850 CLASS="PARAMETER"
1846 >!bss</CODE 1851 >!bss</CODE
1847 > can be used to override this assumption.</P 1852 > can be used to override this assumption.</P
1853 ><P
1854 > If the section name is "_constants" or "_constant", in any
1855 combination of upper and lower case, the section is assumed to be a constant
1856 section. This assumption can be overridden with the "!constant"
1857 flag.</P
1848 ><P 1858 ><P
1849 >If assembly is already happening within a section, the section is implicitly 1859 >If assembly is already happening within a section, the section is implicitly
1850 ended and the new section started. This is not considered an error although 1860 ended and the new section started. This is not considered an error although
1851 it is recommended that all sections be explicitly closed.</P 1861 it is recommended that all sections be explicitly closed.</P
1852 ></DD 1862 ></DD
1933 ><DIV 1943 ><DIV
1934 CLASS="SECTION" 1944 CLASS="SECTION"
1935 ><HR><H2 1945 ><HR><H2
1936 CLASS="SECTION" 1946 CLASS="SECTION"
1937 ><A 1947 ><A
1938 NAME="AEN583" 1948 NAME="AEN584"
1939 >3.10. Assembler Modes and Pragmas</A 1949 >3.10. Assembler Modes and Pragmas</A
1940 ></H2 1950 ></H2
1941 ><P 1951 ><P
1942 >There are a number of options that affect the way assembly is performed. 1952 >There are a number of options that affect the way assembly is performed.
1943 Some of these options can only be specified on the command line because 1953 Some of these options can only be specified on the command line because
2166 ></DIV 2176 ></DIV
2167 ><DIV 2177 ><DIV
2168 CLASS="CHAPTER" 2178 CLASS="CHAPTER"
2169 ><HR><H1 2179 ><HR><H1
2170 ><A 2180 ><A
2171 NAME="AEN661" 2181 NAME="AEN662"
2172 ></A 2182 ></A
2173 >Chapter 4. LWLINK</H1 2183 >Chapter 4. LWLINK</H1
2174 ><P 2184 ><P
2175 >The LWTOOLS linker is called LWLINK. This chapter documents the various features 2185 >The LWTOOLS linker is called LWLINK. This chapter documents the various features
2176 of the linker.</P 2186 of the linker.</P
2177 ><DIV 2187 ><DIV
2178 CLASS="SECTION" 2188 CLASS="SECTION"
2179 ><HR><H2 2189 ><HR><H2
2180 CLASS="SECTION" 2190 CLASS="SECTION"
2181 ><A 2191 ><A
2182 NAME="AEN664" 2192 NAME="AEN665"
2183 >4.1. Command Line Options</A 2193 >4.1. Command Line Options</A
2184 ></H2 2194 ></H2
2185 ><P 2195 ><P
2186 >The binary for LWLINK is called "lwlink". Note that the binary is in lower 2196 >The binary for LWLINK is called "lwlink". Note that the binary is in lower
2187 case. lwlink takes the following command line arguments.</P 2197 case. lwlink takes the following command line arguments.</P
2374 ><DIV 2384 ><DIV
2375 CLASS="SECTION" 2385 CLASS="SECTION"
2376 ><HR><H2 2386 ><HR><H2
2377 CLASS="SECTION" 2387 CLASS="SECTION"
2378 ><A 2388 ><A
2379 NAME="AEN761" 2389 NAME="AEN762"
2380 >4.2. Linker Operation</A 2390 >4.2. Linker Operation</A
2381 ></H2 2391 ></H2
2382 ><P 2392 ><P
2383 >&#13;LWLINK takes one or more files in supported input formats and links them 2393 >&#13;LWLINK takes one or more files in supported input formats and links them
2384 into a single binary. Currently supported formats are the LWTOOLS object 2394 into a single binary. Currently supported formats are the LWTOOLS object
2430 ><DIV 2440 ><DIV
2431 CLASS="SECTION" 2441 CLASS="SECTION"
2432 ><HR><H2 2442 ><HR><H2
2433 CLASS="SECTION" 2443 CLASS="SECTION"
2434 ><A 2444 ><A
2435 NAME="AEN775" 2445 NAME="AEN776"
2436 >4.3. Linking Scripts</A 2446 >4.3. Linking Scripts</A
2437 ></H2 2447 ></H2
2438 ><P 2448 ><P
2439 >A linker script is used to instruct the linker about how to assemble the 2449 >A linker script is used to instruct the linker about how to assemble the
2440 various sections into a completed binary. It consists of a series of 2450 various sections into a completed binary. It consists of a series of
2538 ><DIV 2548 ><DIV
2539 CLASS="SECTION" 2549 CLASS="SECTION"
2540 ><HR><H2 2550 ><HR><H2
2541 CLASS="SECTION" 2551 CLASS="SECTION"
2542 ><A 2552 ><A
2543 NAME="AEN809" 2553 NAME="AEN810"
2544 >4.4. Format Specific Linking Notes</A 2554 >4.4. Format Specific Linking Notes</A
2545 ></H2 2555 ></H2
2546 ><P 2556 ><P
2547 >Some formats require special information to be able to generate actual 2557 >Some formats require special information to be able to generate actual
2548 binaries. If the specific format you are interested in is not listed in 2558 binaries. If the specific format you are interested in is not listed in
2551 ><DIV 2561 ><DIV
2552 CLASS="SECTION" 2562 CLASS="SECTION"
2553 ><HR><H3 2563 ><HR><H3
2554 CLASS="SECTION" 2564 CLASS="SECTION"
2555 ><A 2565 ><A
2556 NAME="AEN812" 2566 NAME="AEN813"
2557 >4.4.1. OS9 Modules</A 2567 >4.4.1. OS9 Modules</A
2558 ></H3 2568 ></H3
2559 ><P 2569 ><P
2560 >OS9 modules need to embed several items into the module header. These 2570 >OS9 modules need to embed several items into the module header. These
2561 items are the type of module, the langauge of the module, the module 2571 items are the type of module, the langauge of the module, the module
2627 ></DIV 2637 ></DIV
2628 ><DIV 2638 ><DIV
2629 CLASS="CHAPTER" 2639 CLASS="CHAPTER"
2630 ><HR><H1 2640 ><HR><H1
2631 ><A 2641 ><A
2632 NAME="AEN824" 2642 NAME="AEN825"
2633 ></A 2643 ></A
2634 >Chapter 5. Libraries and LWAR</H1 2644 >Chapter 5. Libraries and LWAR</H1
2635 ><P 2645 ><P
2636 >LWTOOLS also includes a tool for managing libraries. These are analogous to 2646 >LWTOOLS also includes a tool for managing libraries. These are analogous to
2637 the static libraries created with the "ar" tool on POSIX systems. Each library 2647 the static libraries created with the "ar" tool on POSIX systems. Each library
2646 ><DIV 2656 ><DIV
2647 CLASS="SECTION" 2657 CLASS="SECTION"
2648 ><HR><H2 2658 ><HR><H2
2649 CLASS="SECTION" 2659 CLASS="SECTION"
2650 ><A 2660 ><A
2651 NAME="AEN828" 2661 NAME="AEN829"
2652 >5.1. Command Line Options</A 2662 >5.1. Command Line Options</A
2653 ></H2 2663 ></H2
2654 ><P 2664 ><P
2655 >The binary for LWAR is called "lwar". Note that the binary is in lower 2665 >The binary for LWAR is called "lwar". Note that the binary is in lower
2656 case. The options lwar understands are listed below. For archive manipulation 2666 case. The options lwar understands are listed below. For archive manipulation
2847 followed by any data required by the term. Then end of the list is flagged 2857 followed by any data required by the term. Then end of the list is flagged
2848 by a NULL expression (only an end of expression term).</P 2858 by a NULL expression (only an end of expression term).</P
2849 ><DIV 2859 ><DIV
2850 CLASS="TABLE" 2860 CLASS="TABLE"
2851 ><A 2861 ><A
2852 NAME="AEN911" 2862 NAME="AEN912"
2853 ></A 2863 ></A
2854 ><P 2864 ><P
2855 ><B 2865 ><B
2856 >Table 6-1. Object File Term Types</B 2866 >Table 6-1. Object File Term Types</B
2857 ></P 2867 ></P
2919 allows local symbols that are not exported to have the same names as 2929 allows local symbols that are not exported to have the same names as
2920 exported symbols or external references.</P 2930 exported symbols or external references.</P
2921 ><DIV 2931 ><DIV
2922 CLASS="TABLE" 2932 CLASS="TABLE"
2923 ><A 2933 ><A
2924 NAME="AEN941" 2934 NAME="AEN942"
2925 ></A 2935 ></A
2926 ><P 2936 ><P
2927 ><B 2937 ><B
2928 >Table 6-2. Object File Operator Numbers</B 2938 >Table 6-2. Object File Operator Numbers</B
2929 ></P 2939 ></P