Changeset 609 for branches/GNU/src/binutils/ld/ld.info-3
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/ld/ld.info-3
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 This is ld.info, produced by makeinfo version 4. 0from ./ld.texinfo.1 This is ld.info, produced by makeinfo version 4.3 from ./ld.texinfo. 2 2 3 3 START-INFO-DIR-ENTRY … … 5 5 END-INFO-DIR-ENTRY 6 6 7 This file documents the GNU linker LD version 2.1 1.2.8 9 Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free10 Software Foundation, Inc.7 This file documents the GNU linker LD version 2.14. 8 9 Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 10 2002, 2003 Free Software Foundation, Inc. 11 11 12 12 … … 17 17 18 18 You can change the behavior of `ld' with the environment variables 19 `GNUTARGET', `LDEMULATION' ,and `COLLECT_NO_DEMANGLE'.19 `GNUTARGET', `LDEMULATION' and `COLLECT_NO_DEMANGLE'. 20 20 21 21 `GNUTARGET' determines the input-file object format if you don't use … … 255 255 File: ld.info, Node: Entry Point, Next: File Commands, Up: Simple Commands 256 256 257 Setting the entry point257 Setting the Entry Point 258 258 ----------------------- 259 259 … … 279 279 File: ld.info, Node: File Commands, Next: Format Commands, Prev: Entry Point, Up: Simple Commands 280 280 281 Commands dealing with files281 Commands Dealing with Files 282 282 --------------------------- 283 283 … … 303 303 option. 304 304 305 The linker will first try to open the file in the current 306 directory. If it is not found, the linker will search through the 307 archive library search path. See the description of `-L' in *Note 308 Command Line Options: Options. 305 In case a "sysroot prefix" is configured, and the filename starts 306 with the `/' character, and the script being processed was located 307 inside the "sysroot prefix", the filename will be looked for in 308 the "sysroot prefix". Otherwise, the linker will try to open the 309 file in the current directory. If it is not found, the linker 310 will search through the archive library search path. See the 311 description of `-L' in *Note Command Line Options: Options. 309 312 310 313 If you use `INPUT (-lFILE)', `ld' will transform the name to … … 350 353 File: ld.info, Node: Format Commands, Next: Miscellaneous Commands, Prev: File Commands, Up: Simple Commands 351 354 352 Commands dealing with object file formats355 Commands Dealing with Object File Formats 353 356 ----------------------------------------- 354 357 … … 359 362 The `OUTPUT_FORMAT' command names the BFD format to use for the 360 363 output file (*note BFD::). Using `OUTPUT_FORMAT(BFDNAME)' is 361 exactly like using `- oformat BFDNAME' on the command line (*note364 exactly like using `--oformat BFDNAME' on the command line (*note 362 365 Command Line Options: Options.). If both are used, the command 363 366 line option takes precedence. … … 392 395 File: ld.info, Node: Miscellaneous Commands, Prev: Format Commands, Up: Simple Commands 393 396 394 Other linker script commands397 Other Linker Script Commands 395 398 ---------------------------- 396 399 … … 412 415 to make `ld' assign space to common symbols even if a relocatable 413 416 output file is specified (`-r'). 417 418 `INHIBIT_COMMON_ALLOCATION' 419 This command has the same effect as the `--no-define-common' 420 command-line option: to make `ld' omit the assignment of addresses 421 to common symbols even for a non-relocatable output file. 414 422 415 423 `NOCROSSREFS(SECTION SECTION ...)' … … 495 503 _etext = .; 496 504 } 497 _bdata = (. + 3) & ~ 4;505 _bdata = (. + 3) & ~ 3; 498 506 .data : { *(.data) } 499 507 } … … 540 548 File: ld.info, Node: SECTIONS, Next: MEMORY, Prev: Assignments, Up: Scripts 541 549 542 SECTIONS command550 SECTIONS Command 543 551 ================ 544 552 … … 595 603 File: ld.info, Node: Output Section Description, Next: Output Section Name, Up: SECTIONS 596 604 597 Output section description605 Output Section Description 598 606 -------------------------- 599 607 … … 626 634 File: ld.info, Node: Output Section Name, Next: Output Section Address, Prev: Output Section Description, Up: SECTIONS 627 635 628 Output section name636 Output Section Name 629 637 ------------------- 630 638 … … 645 653 File: ld.info, Node: Output Section Address, Next: Input Section, Prev: Output Section Name, Up: SECTIONS 646 654 647 Output section address648 ---------------------- 655 Output Section Description 656 -------------------------- 649 657 650 658 The ADDRESS is an expression for the VMA (the virtual memory … … 687 695 File: ld.info, Node: Input Section, Next: Output Section Data, Prev: Output Section Address, Up: SECTIONS 688 696 689 Input section description697 Input Section Description 690 698 ------------------------- 691 699 … … 709 717 File: ld.info, Node: Input Section Basics, Next: Input Section Wildcards, Up: Input Section 710 718 711 Input section basics719 Input Section Basics 712 720 .................... 713 721 … … 737 745 The difference between these is the order in which the `.text' and 738 746 `.rdata' input sections will appear in the output section. In the 739 first example, they will be intermingled. In the second example, all 740 `.text' input sections will appear first, followed by all `.rdata' 741 input sections. 747 first example, they will be intermingled, appearing in the same order as 748 they are found in the linker input. In the second example, all `.text' 749 input sections will appear first, followed by all `.rdata' input 750 sections. 742 751 743 752 You can specify a file name to include sections from a particular … … 762 771 File: ld.info, Node: Input Section Wildcards, Next: Input Section Common, Prev: Input Section Basics, Up: Input Section 763 772 764 Input section wildcard patterns773 Input Section Wildcard Patterns 765 774 ............................... 766 775 … … 832 841 File: ld.info, Node: Input Section Common, Next: Input Section Keep, Prev: Input Section Wildcards, Up: Input Section 833 842 834 Input section for common symbols843 Input Section for Common Symbols 835 844 ................................ 836 845 … … 864 873 File: ld.info, Node: Input Section Keep, Next: Input Section Example, Prev: Input Section Common, Up: Input Section 865 874 866 Input section and garbage collection875 Input Section and Garbage Collection 867 876 .................................... 868 877 … … 875 884 File: ld.info, Node: Input Section Example, Prev: Input Section Keep, Up: Input Section 876 885 877 Input section example886 Input Section Example 878 887 ..................... 879 888 … … 908 917 File: ld.info, Node: Output Section Data, Next: Output Section Keywords, Prev: Input Section, Up: SECTIONS 909 918 910 Output section data919 Output Section Data 911 920 ------------------- 912 921 … … 938 947 stored in the endianness of the first input object file. 939 948 940 Note -these commands only work inside a section description and not949 Note--these commands only work inside a section description and not 941 950 between them, so the following will produce an error from the linker: 942 951 SECTIONS { .text : { *(.text) } LONG(1) .data : { *(.data) } } … … 948 957 otherwise unspecified regions of memory within the section (for example, 949 958 gaps left due to the required alignment of input sections) are filled 950 with the two least significant bytes of the expression, repeated as951 necessary. A `FILL' statement covers memory locations after the point 952 at which it occurs in the section definition; by including more than 953 one `FILL' statement, you can have different fill patterns in different954 parts of an outputsection.959 with the value of the expression, repeated as necessary. A `FILL' 960 statement covers memory locations after the point at which it occurs in 961 the section definition; by including more than one `FILL' statement, 962 you can have different fill patterns in different parts of an output 963 section. 955 964 956 965 This example shows how to fill unspecified regions of memory with the 957 value `0x90 90':958 FILL(0x9090 )966 value `0x90': 967 FILL(0x90909090) 959 968 960 969 The `FILL' command is similar to the `=FILLEXP' output section 961 attribute (*note Output Section Fill::), but it only affects the part 962 of the section following the `FILL' command, rather than the entire 963 section. If both are used, the `FILL' command takes precedence. 970 attribute, but it only affects the part of the section following the 971 `FILL' command, rather than the entire section. If both are used, the 972 `FILL' command takes precedence. *Note Output Section Fill::, for 973 details on the fill expression. 964 974 965 975 966 976 File: ld.info, Node: Output Section Keywords, Next: Output Section Discarding, Prev: Output Section Data, Up: SECTIONS 967 977 968 Output section keywords978 Output Section Keywords 969 979 ----------------------- 970 980 … … 1039 1049 File: ld.info, Node: Output Section Discarding, Next: Output Section Attributes, Prev: Output Section Keywords, Up: SECTIONS 1040 1050 1041 Output section discarding1051 Output Section Discarding 1042 1052 ------------------------- 1043 1053 … … 1062 1072 File: ld.info, Node: Output Section Attributes, Next: Overlay Description, Prev: Output Section Discarding, Up: SECTIONS 1063 1073 1064 Output section attributes1074 Output Section Attributes 1065 1075 ------------------------- 1066 1076 … … 1088 1098 File: ld.info, Node: Output Section Type, Next: Output Section LMA, Up: Output Section Attributes 1089 1099 1090 Output section type1100 Output Section Type 1091 1101 ................... 1092 1102 … … 1121 1131 File: ld.info, Node: Output Section LMA, Next: Output Section Region, Prev: Output Section Type, Up: Output Section Attributes 1122 1132 1123 Output section LMA1133 Output Section LMA 1124 1134 .................. 1125 1135 … … 1175 1185 File: ld.info, Node: Output Section Region, Next: Output Section Phdr, Prev: Output Section LMA, Up: Output Section Attributes 1176 1186 1177 Output section region1187 Output Section Region 1178 1188 ..................... 1179 1189 … … 1188 1198 File: ld.info, Node: Output Section Phdr, Next: Output Section Fill, Prev: Output Section Region, Up: Output Section Attributes 1189 1199 1190 Output section phdr1200 Output Section Phdr 1191 1201 ................... 1192 1202 … … 1205 1215 File: ld.info, Node: Output Section Fill, Prev: Output Section Phdr, Up: Output Section Attributes 1206 1216 1207 Output section fill1217 Output Section Fill 1208 1218 ................... 1209 1219 … … 1212 1222 otherwise unspecified regions of memory within the output section (for 1213 1223 example, gaps left due to the required alignment of input sections) 1214 will be filled with the two least significant bytes of the value, 1215 repeated as necessary. 1224 will be filled with the value, repeated as necessary. If the fill 1225 expression is a simple hex number, ie. a string of hex digit starting 1226 with `0x' and without a trailing `k' or `M', then an arbitrarily long 1227 sequence of hex digits can be used to specify the fill pattern; 1228 Leading zeros become part of the pattern too. For all other cases, 1229 including extra parentheses or a unary `+', the fill pattern is the 1230 four least significant bytes of the value of the expression. In all 1231 cases, the number is big-endian. 1216 1232 1217 1233 You can also change the fill value with a `FILL' command in the 1218 output section commands; see *Note Output Section Data::.1234 output section commands; (*note Output Section Data::). 1219 1235 1220 1236 Here is a simple example: 1221 SECTIONS { .text : { *(.text) } =0x9090 }1222 1237 SECTIONS { .text : { *(.text) } =0x90909090 } 1238 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.