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

📄 code-gen-options.html

📁 自己收集的linux入门到学懂高级编程书集 包括linux程序设计第三版
💻 HTML
📖 第 1 页 / 共 2 页
字号:
     <br><dt><code>-fverbose-asm</code>     <dd>Put extra commentary information in the generated assembly code tomake it more readable.  This option is generally only of use to thosewho actually need to read the generated assembly code (perhaps whiledebugging the compiler itself).     <p><code>-fno-verbose-asm</code>, the default, causes theextra information to be omitted and is useful when comparing two assemblerfiles.     <br><dt><code>-fpic</code>     <dd>Generate position-independent code (PIC) suitable for use in a sharedlibrary, if supported for the target machine.  Such code accesses allconstant addresses through a global offset table (GOT).  The dynamicloader resolves the GOT entries when the program starts (the dynamicloader is not part of GCC; it is part of the operating system).  Ifthe GOT size for the linked executable exceeds a machine-specificmaximum size, you get an error message from the linker indicating that<code>-fpic</code> does not work; in that case, recompile with <code>-fPIC</code>instead.  (These maximums are 8k on the SPARC and 32kon the m68k and RS/6000.  The 386 has no such limit.)     <p>Position-independent code requires special support, and therefore worksonly on certain machines.  For the 386, GCC supports PIC for System Vbut not for the Sun 386i.  Code generated for the IBM RS/6000 is alwaysposition-independent.     <br><dt><code>-fPIC</code>     <dd>If supported for the target machine, emit position-independent code,suitable for dynamic linking and avoiding any limit on the size of theglobal offset table.  This option makes a difference on the m68kand the SPARC.     <p>Position-independent code requires special support, and therefore worksonly on certain machines.     <br><dt><code>-fpie</code>     <dd><dt><code>-fPIE</code>     <dd>These options are similar to <code>-fpic</code> and <code>-fPIC</code>, butgenerated position independent code can be only linked into executables. Usually these options are used when <code>-pie</code> GCC option will beused during linking.     <br><dt><code>-ffixed-</code><var>reg</var><code></code>     <dd>Treat the register named <var>reg</var> as a fixed register; generated codeshould never refer to it (except perhaps as a stack pointer, framepointer or in some other fixed role).     <p><var>reg</var> must be the name of a register.  The register names acceptedare machine-specific and are defined in the <code>REGISTER_NAMES</code>macro in the machine description macro file.     <p>This flag does not have a negative form, because it specifies athree-way choice.     <br><dt><code>-fcall-used-</code><var>reg</var><code></code>     <dd>Treat the register named <var>reg</var> as an allocable register that isclobbered by function calls.  It may be allocated for temporaries orvariables that do not live across a call.  Functions compiled this waywill not save and restore the register <var>reg</var>.     <p>It is an error to used this flag with the frame pointer or stack pointer. Use of this flag for other registers that have fixed pervasive roles inthe machine's execution model will produce disastrous results.     <p>This flag does not have a negative form, because it specifies athree-way choice.     <br><dt><code>-fcall-saved-</code><var>reg</var><code></code>     <dd>Treat the register named <var>reg</var> as an allocable register saved byfunctions.  It may be allocated even for temporaries or variables thatlive across a call.  Functions compiled this way will save and restorethe register <var>reg</var> if they use it.     <p>It is an error to used this flag with the frame pointer or stack pointer. Use of this flag for other registers that have fixed pervasive roles inthe machine's execution model will produce disastrous results.     <p>A different sort of disaster will result from the use of this flag fora register in which function values may be returned.     <p>This flag does not have a negative form, because it specifies athree-way choice.     <br><dt><code>-fpack-struct</code>     <dd>Pack all structure members together without holes.     <p><strong>Warning:</strong> the <code>-fpack-struct</code> switch causes GCC to generatecode that is not binary compatible with code generated without that switch. Additionally, it makes the code suboptimal. Use it to conform to a non-default application binary interface.     <br><dt><code>-finstrument-functions</code>     <dd>Generate instrumentation calls for entry and exit to functions.  Justafter function entry and just before function exit, the followingprofiling functions will be called with the address of the currentfunction and its call site.  (On some platforms,<code>__builtin_return_address</code> does not work beyond the currentfunction, so the call site information may not be available to theprofiling functions otherwise.)     <pre class="smallexample">          void __cyg_profile_func_enter (void *this_fn,                                         void *call_site);          void __cyg_profile_func_exit  (void *this_fn,                                         void *call_site);          </pre>     <p>The first argument is the address of the start of the current function,which may be looked up exactly in the symbol table.     <p>This instrumentation is also done for functions expanded inline in otherfunctions.  The profiling calls will indicate where, conceptually, theinline function is entered and exited.  This means that addressableversions of such functions must be available.  If all your uses of afunction are expanded inline, this may mean an additional expansion ofcode size.  If you use <code>extern inline</code> in your C code, anaddressable version of such functions must be provided.  (This isnormally the case anyways, but if you get lucky and the optimizer alwaysexpands the functions inline, you might have gotten away withoutproviding static copies.)     <p>A function may be given the attribute <code>no_instrument_function</code>, inwhich case this instrumentation will not be done.  This can be used, forexample, for the profiling functions listed above, high-priorityinterrupt routines, and any functions from which the profiling functionscannot safely be called (perhaps signal handlers, if the profilingroutines generate output or allocate memory).     <br><dt><code>-fstack-check</code>     <dd>Generate code to verify that you do not go beyond the boundary of thestack.  You should specify this flag if you are running in anenvironment with multiple threads, but only rarely need to specify it ina single-threaded environment since stack overflow is automaticallydetected on nearly all systems if there is only one stack.     <p>Note that this switch does not actually cause checking to be done; theoperating system must do that.  The switch causes generation of codeto ensure that the operating system sees the stack being extended.     <br><dt><code>-fstack-limit-register=</code><var>reg</var><code></code>     <dd><dt><code>-fstack-limit-symbol=</code><var>sym</var><code></code>     <dd><dt><code>-fno-stack-limit</code>     <dd>Generate code to ensure that the stack does not grow beyond a certain value,either the value of a register or the address of a symbol.  If the stackwould grow beyond the value, a signal is raised.  For most targets,the signal is raised before the stack overruns the boundary, soit is possible to catch the signal without taking special precautions.     <p>For instance, if the stack starts at absolute address <code>0x80000000</code>and grows downwards, you can use the flags<code>-fstack-limit-symbol=__stack_limit</code> and<code>-Wl,--defsym,__stack_limit=0x7ffe0000</code> to enforce a stack limitof 128KB.  Note that this may only work with the GNU linker.     <br><dt><code>-fargument-alias</code>     <dd><dt><code>-fargument-noalias</code>     <dd><dt><code>-fargument-noalias-global</code>     <dd>Specify the possible relationships among parameters and betweenparameters and global data.     <p><code>-fargument-alias</code> specifies that arguments (parameters) mayalias each other and may alias global storage.<br><code>-fargument-noalias</code> specifies that arguments do not aliaseach other, but may alias global storage.<br><code>-fargument-noalias-global</code> specifies that arguments do notalias each other and do not alias global storage.     <p>Each language will automatically use whatever option is required bythe language standard.  You should not need to use these options yourself.     <br><dt><code>-fleading-underscore</code>     <dd>This option and its counterpart, <code>-fno-leading-underscore</code>, forciblychange the way C symbols are represented in the object file.  One useis to help link with legacy assembly code.     <p><strong>Warning:</strong> the <code>-fleading-underscore</code> switch causes GCC togenerate code that is not binary compatible with code generated without thatswitch.  Use it to conform to a non-default application binary interface. Not all targets provide complete support for this switch.     <br><dt><code>-ftls-model=</code><var>model</var><code></code>     <dd>Alter the thread-local storage model to be used (see <a href="Thread-Local.html#Thread-Local">Thread-Local</a>). The <var>model</var> argument should be one of <code>global-dynamic</code>,<code>local-dynamic</code>, <code>initial-exec</code> or <code>local-exec</code>.     <p>The default without <code>-fpic</code> is <code>initial-exec</code>; with<code>-fpic</code> the default is <code>global-dynamic</code>. </dl>   </body></html>

⌨️ 快捷键说明

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