📄 xscale_be-ld.1
字号:
.IX Item "--dynamic-linker file"Set the name of the dynamic linker. This is only meaningful whengenerating dynamically linked \s-1ELF\s0 executables. The default dynamiclinker is normally correct; don't use this unless you know what you aredoing..IP "\fB\-\-embedded\-relocs\fR" 4.IX Item "--embedded-relocs"This option is only meaningful when linking \s-1MIPS\s0 embedded \s-1PIC\s0 code,generated by the \-membedded\-pic option to the \s-1GNU\s0 compiler andassembler. It causes the linker to create a table which may be used atruntime to relocate any data which was statically initialized to pointervalues. See the code in testsuite/ld\-empic for details..IP "\fB\-\-fatal\-warnings\fR" 4.IX Item "--fatal-warnings"Treat all warnings as errors..IP "\fB\-\-force\-exe\-suffix\fR" 4.IX Item "--force-exe-suffix"Make sure that an output file has a .exe suffix..SpIf a successfully built fully linked output file does not have a\&\f(CW\*(C`.exe\*(C'\fR or \f(CW\*(C`.dll\*(C'\fR suffix, this option forces the linker to copythe output file to one of the same name with a \f(CW\*(C`.exe\*(C'\fR suffix. Thisoption is useful when using unmodified Unix makefiles on a MicrosoftWindows host, since some versions of Windows won't run an image unlessit ends in a \f(CW\*(C`.exe\*(C'\fR suffix..IP "\fB\-\-no\-gc\-sections\fR" 4.IX Item "--no-gc-sections".PD 0.IP "\fB\-\-gc\-sections\fR" 4.IX Item "--gc-sections".PDEnable garbage collection of unused input sections. It is ignored ontargets that do not support this option. This option is not compatiblewith \fB\-r\fR, nor should it be used with dynamic linking. The defaultbehaviour (of not performing this garbage collection) can be restored byspecifying \fB\-\-no\-gc\-sections\fR on the command line..IP "\fB\-\-help\fR" 4.IX Item "--help"Print a summary of the command-line options on the standard output and exit..IP "\fB\-\-target\-help\fR" 4.IX Item "--target-help"Print a summary of all target specific options on the standard output and exit..IP "\fB\-Map\fR \fImapfile\fR" 4.IX Item "-Map mapfile"Print a link map to the file \fImapfile\fR. See the description of the\&\fB\-M\fR option, above..IP "\fB\-\-no\-keep\-memory\fR" 4.IX Item "--no-keep-memory"\&\fBld\fR normally optimizes for speed over memory usage by caching thesymbol tables of input files in memory. This option tells \fBld\fR toinstead optimize for memory usage, by rereading the symbol tables asnecessary. This may be required if \fBld\fR runs out of memory spacewhile linking a large executable..IP "\fB\-\-no\-undefined\fR" 4.IX Item "--no-undefined".PD 0.IP "\fB\-z defs\fR" 4.IX Item "-z defs".PDNormally when creating a non-symbolic shared library, undefined symbolsare allowed and left to be resolved by the runtime loader. These optionsdisallows such undefined symbols..IP "\fB\-\-allow\-shlib\-undefined\fR" 4.IX Item "--allow-shlib-undefined"Allow undefined symbols in shared objects even when \-\-no\-undefined isset. The net result will be that undefined symbols in regular objectswill still trigger an error, but undefined symbols in shared objectswill be ignored. The implementation of no_undefined makes theassumption that the runtime linker will choke on undefined symbols.However there is at least one system (BeOS) where undefined symbols inshared libraries is normal since the kernel patches them at load time toselect which function is most appropriate for the current architecture.I.E. dynamically select an appropriate memset function. Apparently itis also normal for \s-1HPPA\s0 shared libraries to have undefined symbols..IP "\fB\-\-no\-warn\-mismatch\fR" 4.IX Item "--no-warn-mismatch"Normally \fBld\fR will give an error if you try to link together inputfiles that are mismatched for some reason, perhaps because they havebeen compiled for different processors or for different endiannesses.This option tells \fBld\fR that it should silently permit such possibleerrors. This option should only be used with care, in cases when youhave taken some special action that ensures that the linker errors areinappropriate..IP "\fB\-\-no\-whole\-archive\fR" 4.IX Item "--no-whole-archive"Turn off the effect of the \fB\-\-whole\-archive\fR option for subsequentarchive files..IP "\fB\-\-noinhibit\-exec\fR" 4.IX Item "--noinhibit-exec"Retain the executable output file whenever it is still usable.Normally, the linker will not produce an output file if it encounterserrors during the link process; it exits without writing an output filewhen it issues any error whatsoever..IP "\fB\-nostdlib\fR" 4.IX Item "-nostdlib"Only search library directories explicitly specified on thecommand line. Library directories specified in linker scripts(including linker scripts specified on the command line) are ignored..IP "\fB\-\-oformat\fR \fIoutput-format\fR" 4.IX Item "--oformat output-format"\&\fBld\fR may be configured to support more than one kind of objectfile. If your \fBld\fR is configured this way, you can use the\&\fB\-\-oformat\fR option to specify the binary format for the outputobject file. Even when \fBld\fR is configured to support alternativeobject formats, you don't usually need to specify this, as \fBld\fRshould be configured to produce as a default output format the mostusual format on each machine. \fIoutput-format\fR is a text string, thename of a particular format supported by the \s-1BFD\s0 libraries. (You canlist the available binary formats with \fBobjdump \-i\fR.) The scriptcommand \f(CW\*(C`OUTPUT_FORMAT\*(C'\fR can also specify the output format, butthis option overrides it. .IP "\fB\-qmagic\fR" 4.IX Item "-qmagic"This option is ignored for Linux compatibility..IP "\fB\-Qy\fR" 4.IX Item "-Qy"This option is ignored for \s-1SVR4\s0 compatibility..IP "\fB\-\-relax\fR" 4.IX Item "--relax"An option with machine dependent effects.This option is only supported on a few targets..SpOn some platforms, the \fB\-\-relax\fR option performs globaloptimizations that become possible when the linker resolves addressingin the program, such as relaxing address modes and synthesizing newinstructions in the output object file..SpOn some platforms these link time global optimizations may make symbolicdebugging of the resulting executable impossible.This is known to bethe case for the Matsushita \s-1MN10200\s0 and \s-1MN10300\s0 family of processors..SpOn platforms where this is not supported, \fB\-\-relax\fR is accepted,but ignored..IP "\fB\-\-retain\-symbols\-file\fR \fIfilename\fR" 4.IX Item "--retain-symbols-file filename"Retain \fIonly\fR the symbols listed in the file \fIfilename\fR,discarding all others. \fIfilename\fR is simply a flat file, with onesymbol name per line. This option is especially useful in environments(such as VxWorks)where a large global symbol table is accumulated gradually, to conserverun-time memory..Sp\&\fB\-\-retain\-symbols\-file\fR does \fInot\fR discard undefined symbols,or symbols needed for relocations..SpYou may only specify \fB\-\-retain\-symbols\-file\fR once in the commandline. It overrides \fB\-s\fR and \fB\-S\fR..IP "\fB\-rpath\fR \fIdir\fR" 4.IX Item "-rpath dir"Add a directory to the runtime library search path. This is used whenlinking an \s-1ELF\s0 executable with shared objects. All \fB\-rpath\fRarguments are concatenated and passed to the runtime linker, which usesthem to locate shared objects at runtime. The \fB\-rpath\fR option isalso used when locating shared objects which are needed by sharedobjects explicitly included in the link; see the description of the\&\fB\-rpath\-link\fR option. If \fB\-rpath\fR is not used when linking an\&\s-1ELF\s0 executable, the contents of the environment variable\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR will be used if it is defined..SpThe \fB\-rpath\fR option may also be used on SunOS. By default, onSunOS, the linker will form a runtime search patch out of all the\&\fB\-L\fR options it is given. If a \fB\-rpath\fR option is used, theruntime search path will be formed exclusively using the \fB\-rpath\fRoptions, ignoring the \fB\-L\fR options. This can be useful when usinggcc, which adds many \fB\-L\fR options which may be on \s-1NFS\s0 mountedfilesystems..SpFor compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option isfollowed by a directory name, rather than a file name, it is treated asthe \fB\-rpath\fR option..IP "\fB\-rpath\-link\fR \fI\s-1DIR\s0\fR" 4.IX Item "-rpath-link DIR"When using \s-1ELF\s0 or SunOS, one shared library may require another. Thishappens when an \f(CW\*(C`ld \-shared\*(C'\fR link includes a shared library as oneof the input files..SpWhen the linker encounters such a dependency when doing a non\-shared,non-relocatable link, it will automatically try to locate the requiredshared library and include it in the link, if it is not includedexplicitly. In such a case, the \fB\-rpath\-link\fR optionspecifies the first set of directories to search. The\&\fB\-rpath\-link\fR option may specify a sequence of directory nameseither by specifying a list of names separated by colons, or byappearing multiple times..SpThis option should be used with caution as it overrides the search paththat may have been hard compiled into a shared library. In such a case itis possible to use unintentionally a different search path than theruntime linker would do..SpThe linker uses the following search paths to locate required sharedlibraries..RS 4.IP "1." 4Any directories specified by \fB\-rpath\-link\fR options..IP "2." 4Any directories specified by \fB\-rpath\fR options. The differencebetween \fB\-rpath\fR and \fB\-rpath\-link\fR is that directoriesspecified by \fB\-rpath\fR options are included in the executable andused at runtime, whereas the \fB\-rpath\-link\fR option is only effectiveat link time. It is for the native linker only..IP "3." 4On an \s-1ELF\s0 system, if the \fB\-rpath\fR and \f(CW\*(C`rpath\-link\*(C'\fR optionswere not used, search the contents of the environment variable\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR. It is for the native linker only..IP "4." 4On SunOS, if the \fB\-rpath\fR option was not used, search anydirectories specified using \fB\-L\fR options..IP "5." 4For a native linker, the contents of the environment variable\&\f(CW\*(C`LD_LIBRARY_PATH\*(C'\fR..IP "6." 4For a native \s-1ELF\s0 linker, the directories in \f(CW\*(C`DT_RUNPATH\*(C'\fR or\&\f(CW\*(C`DT_RPATH\*(C'\fR of a shared library are searched for sharedlibraries needed by it. The \f(CW\*(C`DT_RPATH\*(C'\fR entries are ignored if\&\f(CW\*(C`DT_RUNPATH\*(C'\fR entries exist..IP "7." 4The default directories, normally \fI/lib\fR and \fI/usr/lib\fR..IP "8." 4For a native linker on an \s-1ELF\s0 system, if the file \fI/etc/ld.so.conf\fRexists, the list of directories found in that file..RE.RS 4.SpIf the required shared library is not found, the linker will issue awarning and continue with the link..RE.IP "\fB\-shared\fR" 4.IX Item "-shared".PD 0.IP "\fB\-Bshareable\fR" 4.IX Item "-Bshareable".PDCreate a shared library. This is currently only supported on \s-1ELF\s0, \s-1XCOFF\s0and SunOS platforms. On SunOS, the linker will automatically create ashared library if the \fB\-e\fR option is not used and there areundefined symbols in the link..IP "\fB\-\-sort\-common\fR" 4.IX Item "--sort-common"This option tells \fBld\fR to sort the common symbols by size when itplaces them in the appropriate output sections. First come all the onebyte symbols, then all the two byte, then all the four byte, and theneverything else. This is to prevent gaps between symbols due toalignment constraints..IP "\fB\-\-split\-by\-file [\fR\fIsize\fR\fB]\fR" 4.IX Item "--split-by-file [size]"Similar to \fB\-\-split\-by\-reloc\fR but creates a new output section foreach input file when \fIsize\fR is reached. \fIsize\fR defaults to asize of 1 if not given..IP "\fB\-\-split\-by\-reloc [\fR\fIcount\fR\fB]\fR" 4.IX Item "--split-by-reloc [count]"Tries to creates extra sections in the output file so that no singleoutput section in the file contains more than \fIcount\fR relocations.This is useful when generating huge relocatable files for downloading intocertain real time kernels with the \s-1COFF\s0 object file format; since \s-1COFF\s0cannot represent more than 65535 relocations in a single section. Notethat this will fail to work with object file formats which do notsupport arbitrary sections. The linker will not split up individualinput sections for redistribution, so if a single input section containsmore than \fIcount\fR relocations one output section will contain thatmany relocations. \fIcount\fR defaults to a value of 32768..IP "\fB\-\-stats\fR" 4.IX Item "--stats"Compute and display statistics about the operation of the linker, suchas execution time and memory usage..IP "\fB\-\-traditional\-format\fR" 4.IX Item "--traditional-format"For some targets, the output of \fBld\fR is different in some ways fromthe output of some existing linker. This switch requests \fBld\fR touse the traditional format instead..SpFor example, on SunOS, \fBld\fR combines duplicate entries in thesymbol string table. This can reduce the size of an output file withfull debugging information by over 30 percent. Unfortunately, the SunOS\&\f(CW\*(C`dbx\*(C'\fR program can not read the resulting program (\f(CW\*(C`gdb\*(C'\fR has notrouble). The \fB\-\-traditional\-format\fR switch tells \fBld\fR to notcombine duplicate entries..IP "\fB\-\-section\-start\fR \fIsectionname\fR\fB=\fR\fIorg\fR" 4.IX Item "--section-start sectionname=org"Locate a section in the output file at the absoluteaddress given by \fIorg\fR. You may use this option as manytimes as necessary to locate multiple sections in the commandline.\&\fIorg\fR must be a single hexadecimal integer;for compatibility with other linkers, you may omit the leading\&\fB0x\fR usually associated with hexadecimal values. \fINote:\fR thereshould be no white space between \fIsectionname\fR, the equalssign (``\fB=\fR''), and \fIorg\fR..IP "\fB\-Tbss\fR \fIorg\fR" 4.IX Item "-Tbss org".PD 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -