⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arm-linux-ld.1

📁 arm-linux.rar
💻 1
📖 第 1 页 / 共 5 页
字号:
Generate relocatable output\-\-\-i.e., generate an output file that can inturn serve as input to \fBld\fR.  This is often called \fIpartiallinking\fR.  As a side effect, in environments that support standard Unixmagic numbers, this option also sets the output file's magic number to\&\f(CW\*(C`OMAGIC\*(C'\fR.If this option is not specified, an absolute file is produced.  Whenlinking \*(C+ programs, this option \fIwill not\fR resolve references toconstructors; to do that, use \fB\-Ur\fR..SpWhen an input file does not have the same format as the output file,partial linking is only supported if that input file does not contain anyrelocations.  Different output formats can have further restrictions; forexample some \f(CW\*(C`a.out\*(C'\fR\-based formats do not support partial linkingwith input files in other formats at all..SpThis option does the same thing as \fB\-i\fR..IP "\fB\-R\fR \fIfilename\fR" 4.IX Item "-R filename".PD 0.IP "\fB\-\-just\-symbols=\fR\fIfilename\fR" 4.IX Item "--just-symbols=filename".PDRead symbol names and their addresses from \fIfilename\fR, but do notrelocate it or include it in the output.  This allows your output fileto refer symbolically to absolute locations of memory defined in otherprograms.  You may use this option more than once..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\-s\fR" 4.IX Item "-s".PD 0.IP "\fB\-\-strip\-all\fR" 4.IX Item "--strip-all".PDOmit all symbol information from the output file..IP "\fB\-S\fR" 4.IX Item "-S".PD 0.IP "\fB\-\-strip\-debug\fR" 4.IX Item "--strip-debug".PDOmit debugger symbol information (but not all symbols) from the output file..IP "\fB\-t\fR" 4.IX Item "-t".PD 0.IP "\fB\-\-trace\fR" 4.IX Item "--trace".PDPrint the names of the input files as \fBld\fR processes them..IP "\fB\-T\fR \fIscriptfile\fR" 4.IX Item "-T scriptfile".PD 0.IP "\fB\-\-script=\fR\fIscriptfile\fR" 4.IX Item "--script=scriptfile".PDUse \fIscriptfile\fR as the linker script.  This script replaces\&\fBld\fR's default linker script (rather than adding to it), so\&\fIcommandfile\fR must specify everything necessary to describe theoutput file.    If \fIscriptfile\fR does not exist inthe current directory, \f(CW\*(C`ld\*(C'\fR looks for it in the directoriesspecified by any preceding \fB\-L\fR options.  Multiple \fB\-T\fRoptions accumulate..IP "\fB\-u\fR \fIsymbol\fR" 4.IX Item "-u symbol".PD 0.IP "\fB\-\-undefined=\fR\fIsymbol\fR" 4.IX Item "--undefined=symbol".PDForce \fIsymbol\fR to be entered in the output file as an undefinedsymbol.  Doing this may, for example, trigger linking of additionalmodules from standard libraries.  \fB\-u\fR may be repeated withdifferent option arguments to enter additional undefined symbols.  Thisoption is equivalent to the \f(CW\*(C`EXTERN\*(C'\fR linker script command..IP "\fB\-Ur\fR" 4.IX Item "-Ur"For anything other than \*(C+ programs, this option is equivalent to\&\fB\-r\fR: it generates relocatable output\-\-\-i.e., an output file that can inturn serve as input to \fBld\fR.  When linking \*(C+ programs, \fB\-Ur\fR\&\fIdoes\fR resolve references to constructors, unlike \fB\-r\fR.It does not work to use \fB\-Ur\fR on files that were themselves linkedwith \fB\-Ur\fR; once the constructor table has been built, it cannotbe added to.  Use \fB\-Ur\fR only for the last partial link, and\&\fB\-r\fR for the others..IP "\fB\-\-unique[=\fR\fI\s-1SECTION\s0\fR\fB]\fR" 4.IX Item "--unique[=SECTION]"Creates a separate output section for every input section matching\&\fI\s-1SECTION\s0\fR, or if the optional wildcard \fI\s-1SECTION\s0\fR argument ismissing, for every orphan input section.  An orphan section is one notspecifically mentioned in a linker script.  You may use this optionmultiple times on the command line;  It prevents the normal merging ofinput sections with the same name, overriding output section assignmentsin a linker script..IP "\fB\-v\fR" 4.IX Item "-v".PD 0.IP "\fB\-\-version\fR" 4.IX Item "--version".IP "\fB\-V\fR" 4.IX Item "-V".PDDisplay the version number for \fBld\fR.  The \fB\-V\fR option alsolists the supported emulations..IP "\fB\-x\fR" 4.IX Item "-x".PD 0.IP "\fB\-\-discard\-all\fR" 4.IX Item "--discard-all".PDDelete all local symbols..IP "\fB\-X\fR" 4.IX Item "-X".PD 0.IP "\fB\-\-discard\-locals\fR" 4.IX Item "--discard-locals".PDDelete all temporary local symbols.  For most targets, this is all localsymbols whose names begin with \fBL\fR..IP "\fB\-y\fR \fIsymbol\fR" 4.IX Item "-y symbol".PD 0.IP "\fB\-\-trace\-symbol=\fR\fIsymbol\fR" 4.IX Item "--trace-symbol=symbol".PDPrint the name of each linked file in which \fIsymbol\fR appears.  Thisoption may be given any number of times.  On many systems it is necessaryto prepend an underscore..SpThis option is useful when you have an undefined symbol in your link butdon't know where the reference is coming from..IP "\fB\-Y\fR \fIpath\fR" 4.IX Item "-Y path"Add \fIpath\fR to the default library search path.  This option existsfor Solaris compatibility..IP "\fB\-z\fR \fIkeyword\fR" 4.IX Item "-z keyword"The recognized keywords are:.RS 4.IP "\fBcombreloc\fR" 4.IX Item "combreloc"Combines multiple reloc sections and sorts them to make dynamic symbollookup caching possible..IP "\fBdefs\fR" 4.IX Item "defs"Disallows undefined symbols in object files.  Undefined symbols inshared libraries are still allowed..IP "\fBinitfirst\fR" 4.IX Item "initfirst"This option is only meaningful when building a shared object.It marks the object so that its runtime initialization will occurbefore the runtime initialization of any other objects brought intothe process at the same time.  Similarly the runtime finalization ofthe object will occur after the runtime finalization of any otherobjects..IP "\fBinterpose\fR" 4.IX Item "interpose"Marks the object that its symbol table interposes before all symbolsbut the primary executable..IP "\fBloadfltr\fR" 4.IX Item "loadfltr"Marks  the object that its filters be processed immediately atruntime..IP "\fBmuldefs\fR" 4.IX Item "muldefs"Allows multiple definitions..IP "\fBnocombreloc\fR" 4.IX Item "nocombreloc"Disables multiple reloc sections combining..IP "\fBnocopyreloc\fR" 4.IX Item "nocopyreloc"Disables production of copy relocs..IP "\fBnodefaultlib\fR" 4.IX Item "nodefaultlib"Marks the object that the search for dependencies of this object willignore any default library search paths..IP "\fBnodelete\fR" 4.IX Item "nodelete"Marks the object shouldn't be unloaded at runtime..IP "\fBnodlopen\fR" 4.IX Item "nodlopen"Marks the object not available to \f(CW\*(C`dlopen\*(C'\fR..IP "\fBnodump\fR" 4.IX Item "nodump"Marks the object can not be dumped by \f(CW\*(C`dldump\*(C'\fR..IP "\fBnow\fR" 4.IX Item "now"When generating an executable or shared library, mark it to tell thedynamic linker to resolve all symbols when the program is started, orwhen the shared library is linked to using dlopen, instead ofdeferring function call resolution to the point when the function isfirst called..IP "\fBorigin\fR" 4.IX Item "origin"Marks the object may contain \f(CW$ORIGIN\fR..RE.RS 4.SpOther keywords are ignored for Solaris compatibility.  .RE.IP "\fB\-(\fR \fIarchives\fR \fB\-)\fR" 4.IX Item "-( archives -)".PD 0.IP "\fB\-\-start\-group\fR \fIarchives\fR \fB\-\-end\-group\fR" 4.IX Item "--start-group archives --end-group".PDThe \fIarchives\fR should be a list of archive files.  They may beeither explicit file names, or \fB\-l\fR options..SpThe specified archives are searched repeatedly until no new undefinedreferences are created.  Normally, an archive is searched only once inthe order that it is specified on the command line.  If a symbol in thatarchive is needed to resolve an undefined symbol referred to by anobject in an archive that appears later on the command line, the linkerwould not be able to resolve that reference.  By grouping the archives,they all be searched repeatedly until all possible references areresolved..SpUsing this option has a significant performance cost.  It is best to useit only when there are unavoidable circular references between two ormore archives..IP "\fB\-\-accept\-unknown\-input\-arch\fR" 4.IX Item "--accept-unknown-input-arch".PD 0.IP "\fB\-\-no\-accept\-unknown\-input\-arch\fR" 4.IX Item "--no-accept-unknown-input-arch".PDTells the linker to accept input files whose architecture cannot berecognised.  The assumption is that the user knows what they are doingand deliberately wants to link in these unknown input files.  This wasthe default behaviour of the linker, before release 2.14.  The defaultbehaviour from release 2.14 onwards is to reject such input files, andso the \fB\-\-accept\-unknown\-input\-arch\fR option has been added torestore the old behaviour..IP "\fB\-\-as\-needed\fR" 4.IX Item "--as-needed".PD 0.IP "\fB\-\-no\-as\-needed\fR" 4.IX Item "--no-as-needed".PDThis option affects \s-1ELF\s0 \s-1DT_NEEDED\s0 tags for dynamic libraries mentionedon the command line after the \fB\-\-as\-needed\fR option.  Normally,the linker will add a \s-1DT_NEEDED\s0 tag for each dynamic library mentionedon the command line, regardless of whether the library is actuallyneeded.  \fB\-\-as\-needed\fR causes \s-1DT_NEEDED\s0 tags to only be emittedfor libraries that satisfy some symbol reference from regular objectswhich is undefined at the point that the library was linked.\&\fB\-\-no\-as\-needed\fR restores the default behaviour..IP "\fB\-\-add\-needed\fR" 4.IX Item "--add-needed".PD 0.IP "\fB\-\-no\-add\-needed\fR" 4.IX Item "--no-add-needed".PDThis option affects the treatment of dynamic libraries from \s-1ELF\s0\&\s-1DT_NEEDED\s0 tags in dynamic libraries mentioned on the command line afterthe \fB\-\-no\-add\-needed\fR option.  Normally, the linker will adda \s-1DT_NEEDED\s0 tag for each dynamic library from \s-1DT_NEEDED\s0 tags.\&\fB\-\-no\-add\-needed\fR causes \s-1DT_NEEDED\s0 tags will never be emittedfor those libraries from \s-1DT_NEEDED\s0 tags. \fB\-\-add\-needed\fR restoresthe default behaviour..IP "\fB\-assert\fR \fIkeyword\fR" 4.IX Item "-assert keyword"This option is ignored for SunOS compatibility..IP "\fB\-Bdynamic\fR" 4.IX Item "-Bdynamic".PD 0.IP "\fB\-dy\fR" 4.IX Item "-dy".IP "\fB\-call_shared\fR" 4.IX Item "-call_shared".PDLink against dynamic libraries.  This is only meaningful on platformsfor which shared libraries are supported.  This option is normally thedefault on such platforms.  The different variants of this option arefor compatibility with various systems.  You may use this optionmultiple times on the command line: it affects library searching for\&\fB\-l\fR options which follow it..IP "\fB\-Bgroup\fR" 4.IX Item "-Bgroup"Set the \f(CW\*(C`DF_1_GROUP\*(C'\fR flag in the \f(CW\*(C`DT_FLAGS_1\*(C'\fR entry in the dynamicsection.  This causes the runtime linker to handle lookups in thisobject and its dependencies to be performed only inside the group.\&\fB\-\-unresolved\-symbols=report\-all\fR is implied.  This option isonly meaningful on \s-1ELF\s0 platforms which support shared libraries..IP "\fB\-Bstatic\fR" 4.IX Item "-Bstatic".PD 0.IP "\fB\-dn\fR" 4.IX Item "-dn".IP "\fB\-non_shared\fR" 4.IX Item "-non_shared".IP "\fB\-static\fR" 4.IX Item "-static".PDDo not link against shared libraries.  This is only meaningful onplatforms for which shared libraries are supported.  The differentvariants of this option are for compatibility with various systems.  Youmay use this option multiple times on the command line: it affectslibrary searching for \fB\-l\fR options which follow it.  Thisoption also implies \fB\-\-unresolved\-symbols=report\-all\fR..IP "\fB\-Bsymbolic\fR" 4.IX Item "-Bsymbolic"When creating a shared library, bind references to global symbols to the

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -