Red Hat ENTERPRISE LINUX 3 - USING GCC Using Instructions page 113

Using the gnu compiler collection (gcc)
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING GCC:
Table of Contents

Advertisement

Chapter 4. GCC Command Options
current function and its call site. (On some platforms,
work beyond the current function, so the call site information may not be available to the profiling
functions otherwise.)
void __cyg_profile_func_enter (void *this_fn,
void __cyg_profile_func_exit
The first argument is the address of the start of the current function, which may be looked up
exactly in the symbol table.
This instrumentation is also done for functions expanded inline in other functions. The profiling
calls will indicate where, conceptually, the inline function is entered and exited. This means
that addressable versions of such functions must be available. If all your uses of a function are
expanded inline, this may mean an additional expansion of code size. If you use
in your C code, an addressable version of such functions must be provided. (This is normally the
case anyways, but if you get lucky and the optimizer always expands the functions inline, you
might have gotten away without providing static copies.)
A function may be given the attribute
mentation will not be done. This can be used, for example, for the profiling functions listed
above, high-priority interrupt routines, and any functions from which the profiling functions can-
not safely be called (perhaps signal handlers, if the profiling routines generate output or allocate
memory).
-fstack-check
Generate code to verify that you do not go beyond the boundary of the stack. You should specify
this flag if you are running in an environment with multiple threads, but only rarely need to
specify it in a single-threaded environment since stack overflow is automatically detected on
nearly all systems if there is only one stack.
Note that this switch does not actually cause checking to be done; the operating system must
do that. The switch causes generation of code to ensure that the operating system sees the stack
being extended.
-fstack-limit-register=
-fstack-limit-symbol=
-fno-stack-limit
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 stack would grow beyond the value, a signal is raised.
For most targets, the signal is raised before the stack overruns the boundary, so it is possible to
catch the signal without taking special precautions.
For instance, if the stack starts at absolute
downwards, you can use the flags
-Wl,-defsym,__stack_limit=0x7ffe0000
this may only work with the GNU linker.
-fargument-alias
-fargument-noalias
-fargument-noalias-global
Specify the possible relationships among parameters and between parameters and global data.
-fargument-alias
global storage.
-fargument-noalias
alias global storage.
other and do not alias global storage.
(void *this_fn,
no_instrument_function
reg
sym
specifies that arguments (parameters) may alias each other and may alias
specifies that arguments do not alias each other, but may
-fargument-noalias-global
__builtin_return_address
void *call_site);
void *call_site);
address
-fstack-limit-symbol=__stack_limit
to enforce a stack limit of 128KB. Note that
specifies that arguments do not alias each
does not
extern inline
, in which case this instru-
and grows
0x80000000
107
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents