📄 00000004.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>LINKER OPTIONS <BR> These options come into play when the compiler links ob- <BR> ject files into an executable output file. They are mean- <BR> ingless if the compiler is not doing a link step. <BR> <BR> object-file-name <BR> A file name that does not end in a special recog- <BR> nized suffix is considered to name an object file <BR> or library. (Object files are distinguished from <BR> libraries by the linker according to the file con- <BR> tents.) If GCC does a link step, these object <BR> files are used as input to the linker. <BR> <BR> -llibrary <BR> Use the library named library when linking. <BR> <BR> The linker searches a standard list of directories <BR> for the library, which is actually a file named <BR> `liblibrary.a'. The linker then uses this file as <BR> if it had been specified precisely by name. <BR> <BR> The directories searched include several standard <BR> system directories plus any that you specify with <BR> `-L'. <BR> <BR> Normally the files found this way are library <BR> files--archive files whose members are object <BR> files. The linker handles an archive file by scan- <BR> ning through it for members which define symbols <BR> that have so far been referenced but not defined. <BR> However, if the linker finds an ordinary object <BR> file rather than a library, the object file is <BR> linked in the usual fashion. The only difference <BR> between using an `-l' option and specifying a file <BR> name is that `-l' surrounds library with `lib' and <BR> `.a' and searches several directories. <BR> <BR> -lobjc You need this special case of the -l option in or- <BR> der to link an Objective C program. <BR> <BR> -nostartfiles <BR> Do not use the standard system startup files when <BR> linking. The standard libraries are used normally. <BR> <BR> -nostdlib <BR> Don't use the standard system libraries and startup <BR> files when linking. Only the files you specify <BR> will be passed to the linker. <BR> <BR> -static <BR> On systems that support dynamic linking, this pre- <BR> vents linking with the shared libraries. On other <BR> systems, this option has no effect. <BR> <BR> -shared <BR> Produce a shared object which can then be linked <BR> with other objects to form an executable. Only a <BR> few systems support this option. <BR> <BR> -symbolic <BR> Bind references to global symbols when building a <BR> shared object. Warn about any unresolved refer- <BR> ences (unless overridden by the link editor option <BR> `-Xlinker -z -Xlinker defs'). Only a few systems <BR> support this option. <BR> <BR> -Xlinker option <BR> Pass option as an option to the linker. You can <BR> use this to supply system-specific linker options <BR> which GNU CC does not know how to recognize. <BR> <BR> If you want to pass an option that takes an argu- <BR> ment, you must use `-Xlinker' twice, once for the <BR> option and once for the argument. For example, to <BR> pass `-assert definitions', you must write `-Xlink- <BR> er -assert -Xlinker definitions'. It does not work <BR> to write `-Xlinker "-assert definitions"', because <BR> this passes the entire string as a single argument, <BR> which is not what the linker expects. <BR> <BR> -Wl,option <BR> Pass option as an option to the linker. If option <BR> contains commas, it is split into multiple options <BR> at the commas. <BR> <BR> -u symbol <BR> Pretend the symbol symbol is undefined, to force <BR> linking of library modules to define it. You can <BR> use `-u' multiple times with different symbols to <BR> force loading of additional library modules. <BR> <BR> <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -