Mercurial > hg > index.cgi
comparison docs/manual/manual.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 | 7da0452512b2 |
children | ce1fdc8d6568 |
comparison
equal
deleted
inserted
replaced
233:7887a48b74df | 234:d389adbcc4ab |
---|---|
196 HREF="#AEN795" | 196 HREF="#AEN795" |
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="#AEN829" | 201 HREF="#AEN843" |
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="#AEN832" | 208 HREF="#AEN846" |
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="#AEN844" | 217 HREF="#AEN858" |
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="#AEN848" | 224 HREF="#AEN862" |
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="#AEN931" | 246 HREF="#AEN945" |
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="#AEN961" | 251 HREF="#AEN975" |
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 |
2518 ></P | 2518 ></P |
2519 ><DIV | 2519 ><DIV |
2520 CLASS="VARIABLELIST" | 2520 CLASS="VARIABLELIST" |
2521 ><DL | 2521 ><DL |
2522 ><DT | 2522 ><DT |
2523 >define basesympat <CODE | |
2524 CLASS="PARAMETER" | |
2525 >string</CODE | |
2526 ></DT | |
2527 ><DD | |
2528 ><P | |
2529 > This causes the linker to define a symbol for the ultimate base address of | |
2530 each section using the pattern specified by <CODE | |
2531 CLASS="PARAMETER" | |
2532 >string</CODE | |
2533 >. | |
2534 In the string, %s can appear exactly once and will be replaced with the | |
2535 section name. The base address is calculated after all instances of each | |
2536 section have been collapsed together. </P | |
2537 ><P | |
2538 > If the pattern resolves to the same string for multiple | |
2539 sections, the results are undefined. </P | |
2540 ></DD | |
2541 ><DT | |
2542 >define lensympat <CODE | |
2543 CLASS="PARAMETER" | |
2544 >string</CODE | |
2545 ></DT | |
2546 ><DD | |
2547 ><P | |
2548 > This causes the linker to define a symbol for the ultimate length of each | |
2549 section using the pattern specified by <CODE | |
2550 CLASS="PARAMETER" | |
2551 >string</CODE | |
2552 >. In | |
2553 the string, %s can appear exactly once and will be replaced with the section | |
2554 name. The length is calculated after all instances of a section have been | |
2555 collapsed together. </P | |
2556 ><P | |
2557 >If the pattern resolves to the same string for multiple | |
2558 sections, the results are undefined. </P | |
2559 ></DD | |
2560 ><DT | |
2523 >section <CODE | 2561 >section <CODE |
2524 CLASS="PARAMETER" | 2562 CLASS="PARAMETER" |
2525 >name</CODE | 2563 >name</CODE |
2526 > load <CODE | 2564 > load <CODE |
2527 CLASS="PARAMETER" | 2565 CLASS="PARAMETER" |
2595 ><DIV | 2633 ><DIV |
2596 CLASS="SECTION" | 2634 CLASS="SECTION" |
2597 ><HR><H2 | 2635 ><HR><H2 |
2598 CLASS="SECTION" | 2636 CLASS="SECTION" |
2599 ><A | 2637 ><A |
2600 NAME="AEN829" | 2638 NAME="AEN843" |
2601 >4.4. Format Specific Linking Notes</A | 2639 >4.4. Format Specific Linking Notes</A |
2602 ></H2 | 2640 ></H2 |
2603 ><P | 2641 ><P |
2604 >Some formats require special information to be able to generate actual | 2642 >Some formats require special information to be able to generate actual |
2605 binaries. If the specific format you are interested in is not listed in | 2643 binaries. If the specific format you are interested in is not listed in |
2608 ><DIV | 2646 ><DIV |
2609 CLASS="SECTION" | 2647 CLASS="SECTION" |
2610 ><HR><H3 | 2648 ><HR><H3 |
2611 CLASS="SECTION" | 2649 CLASS="SECTION" |
2612 ><A | 2650 ><A |
2613 NAME="AEN832" | 2651 NAME="AEN846" |
2614 >4.4.1. OS9 Modules</A | 2652 >4.4.1. OS9 Modules</A |
2615 ></H3 | 2653 ></H3 |
2616 ><P | 2654 ><P |
2617 >OS9 modules need to embed several items into the module header. These | 2655 >OS9 modules need to embed several items into the module header. These |
2618 items are the type of module, the langauge of the module, the module | 2656 items are the type of module, the langauge of the module, the module |
2684 ></DIV | 2722 ></DIV |
2685 ><DIV | 2723 ><DIV |
2686 CLASS="CHAPTER" | 2724 CLASS="CHAPTER" |
2687 ><HR><H1 | 2725 ><HR><H1 |
2688 ><A | 2726 ><A |
2689 NAME="AEN844" | 2727 NAME="AEN858" |
2690 ></A | 2728 ></A |
2691 >Chapter 5. Libraries and LWAR</H1 | 2729 >Chapter 5. Libraries and LWAR</H1 |
2692 ><P | 2730 ><P |
2693 >LWTOOLS also includes a tool for managing libraries. These are analogous to | 2731 >LWTOOLS also includes a tool for managing libraries. These are analogous to |
2694 the static libraries created with the "ar" tool on POSIX systems. Each library | 2732 the static libraries created with the "ar" tool on POSIX systems. Each library |
2703 ><DIV | 2741 ><DIV |
2704 CLASS="SECTION" | 2742 CLASS="SECTION" |
2705 ><HR><H2 | 2743 ><HR><H2 |
2706 CLASS="SECTION" | 2744 CLASS="SECTION" |
2707 ><A | 2745 ><A |
2708 NAME="AEN848" | 2746 NAME="AEN862" |
2709 >5.1. Command Line Options</A | 2747 >5.1. Command Line Options</A |
2710 ></H2 | 2748 ></H2 |
2711 ><P | 2749 ><P |
2712 >The binary for LWAR is called "lwar". Note that the binary is in lower | 2750 >The binary for LWAR is called "lwar". Note that the binary is in lower |
2713 case. The options lwar understands are listed below. For archive manipulation | 2751 case. The options lwar understands are listed below. For archive manipulation |
2904 followed by any data required by the term. Then end of the list is flagged | 2942 followed by any data required by the term. Then end of the list is flagged |
2905 by a NULL expression (only an end of expression term).</P | 2943 by a NULL expression (only an end of expression term).</P |
2906 ><DIV | 2944 ><DIV |
2907 CLASS="TABLE" | 2945 CLASS="TABLE" |
2908 ><A | 2946 ><A |
2909 NAME="AEN931" | 2947 NAME="AEN945" |
2910 ></A | 2948 ></A |
2911 ><P | 2949 ><P |
2912 ><B | 2950 ><B |
2913 >Table 6-1. Object File Term Types</B | 2951 >Table 6-1. Object File Term Types</B |
2914 ></P | 2952 ></P |
2976 allows local symbols that are not exported to have the same names as | 3014 allows local symbols that are not exported to have the same names as |
2977 exported symbols or external references.</P | 3015 exported symbols or external references.</P |
2978 ><DIV | 3016 ><DIV |
2979 CLASS="TABLE" | 3017 CLASS="TABLE" |
2980 ><A | 3018 ><A |
2981 NAME="AEN961" | 3019 NAME="AEN975" |
2982 ></A | 3020 ></A |
2983 ><P | 3021 ><P |
2984 ><B | 3022 ><B |
2985 >Table 6-2. Object File Operator Numbers</B | 3023 >Table 6-2. Object File Operator Numbers</B |
2986 ></P | 3024 ></P |