This option creates a file containing a static callgraph of functions. The callgraph gives definition and reference information for all functions in the image.
Note
If you use the --partial
option to create
a partially linked object, then no callgraph file is created.
Note
Not supported for AArch64 state.
The callgraph file:
Is saved in the same directory as the generated image.
Has the same name as the linked image, and a file extension that depends on the value specified for the
--callgraph_output=
option. Use thefmt
--callgraph_file=
option to specify a different callgraph filename.filename
Has a default output format of HTML. Use the
--callgraph_output=
option to control the output format.fmt
Note
If the linker is to calculate the function stack usage, any functions defined in the assembler files must have the appropriate:
PROC
andENDP
directivesFRAME PUSH
andFRAME POP
directives.
For each function func
the linker lists
the:
Instruction set state for which the function is compiled (A32 or T32).
Set of functions that call
func
.Set of functions that are called by
func
.Number of times the address of
func
is used in the image.
In addition, the callgraph identifies functions that are:
Called through interworking veneers.
Defined outside the image.
Permitted to remain undefined (weak references).
Called through a Procedure Linkage Table (PLT).
Not called but still exist in the image.
The static callgraph also gives information about stack usage. It lists the:
Size of the stack frame used by each function.
Maximum size of the stack used by the function over any call sequence, that is, over any acyclic chain of function calls.
If there is a cycle, or if the linker detects a function with
no stack size information in the call chain, + Unknown
is
added to the stack usage. A reason is added to indicate why stack
usage is unknown.
The linker reports missing stack frame information if there is no debug frame information for the function.
For indirect functions, the linker cannot reliably determine which function made the indirect call. This might affect how the maximum stack usage is calculated for a call chain. The linker lists all function pointers used in the image.
Use frame directives in assembly language code to describe how your code uses the stack. These directives ensure that debug frame information is present for debuggers to perform stack unwinding or profiling.
- Reference